/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread: →

Other urls found in this thread:

kotchan.org/chat/int
github.com/emgram769/livechan-js
sstewartgallus.com/git?p=qlock.git;a=blob;f=tla/StackLock.tla;h=6884d808b5ffd605e912f4b12ae38928fd9b8313;hb=HEAD
github.com/jepsen-io/knossos
github.com/Prospero86/netrunner
magicpackets.net:3000/proudfeet/netrunner
stackoverflow.com/questions/5096926/what-is-the-get-set-syntax-in-c
github.com/karan/Projects
better-dpt-roll.github.io/
mindjolt.com/marble-lines.html
c4learn.com/c-programming/compiler-vs-interpreter/
twitter.com/AnonBabble

java -jar *

my headphones won't go on pic related

irc client under 100 loc (in Go), so far I'm missing pretty important 15 lines

Making a browser that works in the terminal (no Xorg) Any hands are welcome

Man. Polymorphism really is powerful.

/dpt/ lied to me once again. I'm working on a project and polymorphism is just way too useful right now

I'm working on livechan engine kotchan.org/chat/int
github.com/emgram769/livechan-js

Literally botnet

There's already is million of those, though.

I was working on formalizing my novel spin-lock algorithm (which is similar to the MCS and CLH queue lock algorithms) in TLA+ (see sstewartgallus.com/git?p=qlock.git;a=blob;f=tla/StackLock.tla;h=6884d808b5ffd605e912f4b12ae38928fd9b8313;hb=HEAD ) but currently I'm now trying to figure out how to use Knossos (see github.com/jepsen-io/knossos ) to check my generated trace of history to see if it is linearizable.

According to the github is planned to work for browsing sites like Sup Forums and using javascript github.com/Prospero86/netrunner

Want to learn a new language, what does /dpt/ recommends?

How to fix this git version problem? Asked by a real new here.

There are already terminal based browsers that can execute JS.

jesus fucking christ what the fuck is the use of python FOR ANYTHONG MORE COMPLEX THAN HELLO WORLD. Fucking garbage language, Cant even see what kind of type the return value is of a method. Jesus christ what a shitshow.

Fuck python so much. DO NOT LEARN PYTHON IT WILL ONLY HURT YOU WHEN YOU ALREADY KNOW A C-like language.

SORRY I HAVE TO VENT FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUCCKCKCKCKCKCK

C, C++ and/or C#

my current CS teacher works with Python for her day job, and this course is taught in c++. yesterday she tried to tell us she doesn't care whether we use single or double quotes. you might not care but c cares quite a bit

>C
Trash.
>C++
Trash.
>C#
Trash.

got c and sepples jot down

what else?

>Python
Trash
>c++
Trash.
>c
Trash.
>c
Trash.
>sepples
Trash.

>this post
Trash.

Haskell is pure! Haskell is programing! I love haskell!

Looks like a merge conflict. Just edit the file and keep whichever changes you want. It looks like that'd be the bottom part, so you can delete everything from

But can I post in Sup Forums?

>Haskell
Trash.
>Haskell is pure!
False.

no u

class A {
A() {};
A(char* t): z.T(t) {};
private:
struct C {
char* T;
} z;


How do I access T within a struct inside of class, in constructor?

disgusting

An user has offered new location of the project magicpackets.net:3000/proudfeet/netrunner

and a contact email for anyone interested in the development

/dpt/ only cares about the most obtuse way to implement their hello worlds and fizzbuzz

Somebody explain this line to a pleb.

public int MyProperty { get; private set; }

This just appeared when I tried to autogenerate setters and getters of 3 different string variables and have no clue what it means or how to use it.

Looks like shorthand in the language for a fully written getter and setter function.

Agree that it can be a pain sometimes but 90% of the time you know what type you're working with. For the other 10% you can load up the interpreter and test it quickly. I do generally prefer working with static typing though.

Honest mistake and not a big one as syntax highlighting should pick it up anyway.

I know its a short hand for encapsulating the strings in an object, but how do I access my strings in a different class using it?

I did a quick google, and it looks like you'll be able to access the property directly if you want to read or write (within the class due to set being private) to it .

int a = classinstance.MyProperty

sorta thing. Is this C#?

also:
stackoverflow.com/questions/5096926/what-is-the-get-set-syntax-in-c

I added reflections and ambient occlusion to my GLSL raymarcher! The AO isn't so evident in this scene.

I have the basics of C and Java down, should I keep going with one of these? Or should I branch off into C# or C++?

Main application would be to make personal use gui programs that run on both linux or windows.

I made a huge program in c++ and now it needs a gui. I want to make the gui in java but Im stuck on how to update the gui from c++ using the jni stuff.
Anyone done this before.

If you go down the C++ route, I'd recommend QT as a useful framework for adding cross-platform GUI elements to a core program.

Is it normal to curse out loud at your screen when you're having trouble?

whyd you cap it at 30?

this is a good answer, but the mutators are private, and cant be accessed from another class. I thought that was the entire purpose of setters?

Because the eyes can only see 30fps anyway

I forgot to set the frame setting in .kkapture

try making the get public

powerful is the most overused buzzword in the tech industry

Plus our eyes aren't even real.

Sure!

>>
Theres no point learning the basics of 4 languages when you start out, stick with one and learn how to program and make a big project. Since you know java you could keep going with that.

My university is teaching me Java - slowly - but I also want to learn stuff like Python and C++. I've found plenty of books to learn from, but just one problem: I have no idea what to actually code. I can study syntax all day long, but if I can't think of anything to do with it, it's useless. Where can I go to find fun programming projects for learners?

Also, how do I know what different languages are good at? How do I know what language to use for what purposes? Does it even really matter?

Remove the private keyword that is in front of set. Then you will be able to set the property outside of the class.

github.com/karan/Projects

I went back to college for CS, the courses had us learn Java first (I guess since easier to teach, no pointers?) , then C, and now some assembler for armv8 just to understand closer to bare metal computing.

So I've learned what I have mostly since its been whats required, it seems like c++ has the most "wiggle room" to go whetever my hobby/interest may take me.

I hear javascript is also good for this, multiplatform stuff like phone apps that run on ios/android and desktop

What do you do when you're stuck with a hard problem? I have a C assignment that I can't finish. I still have 3 weeks to deliver it, but I'm worried as fuck because I feel overwhelmed with tests and other assignments.

I don't have any friends to call for help, unfortunately.

>Does it even really matter?
Yep. If you want something to run as quickly as possible (as in milliseconds matter in what you are doing), you would prefer a compiled language like C rather than an interpreted language like python. Or if you want to quickly manipulate some strings, it's much easier to do that in python rather than C.

Just ask people or look it up, I guess.

>Where can I go to find fun programming projects for learners?
I pick out some of the easier ones in:
better-dpt-roll.github.io/

What do you have you do?

Project Euler

This game: mindjolt.com/marble-lines.html
Unfortunately I can't find any version that doesn't require Flash.

Checked. Are you just javing trouble getting started, or just stuck on a particular aspect of the game?

It's ~70% done. I'm stuck with some aspects of the game.

go on.

Oh, I'm not asking for help with the game, thanks. It's done in Allegro and it'd be quite hard to explain it here.

I just want to know what do you do when you're stuck so you can get to the answer faster. Should I just relax for some time? The problem is that I can't get the code out of my head.

I know, Im just wondering why Im bothering calling variables from another class if theyre public? I mean why bother?

If you haven't already, give yourself half a day, or a day to do whatever you want. Give your brain some time to run background processes about the task while sleeping, for example. Then get back to it!

To be honest, tomorrow is my birthday. I was thinking about working on my other assignment, which is way easier to complete.... but maybe I'll just try to erase my mind for a day.

I worked with the Marble Lines game for more than 8h today, and while I did advanced maybe 20% of the game, I'm still stuck in lots of other places. C isn't made for graphical shit like this.

You're calling the variables in another class, because you need to access those variables within that class. Private or public, you need those variables no matter what. Private helps mitigate the risk that another part of your program might accidentally modify a value that it shouldn't have been able to. If this is a personal project and you wanna code fast or you're not too concerned with rigorous testing, go public for everything.

Is there any fundamental difference between a compiler and an interpreter?

c4learn.com/c-programming/compiler-vs-interpreter/

Seems like a pajeet website.

No better day suited for that break than your birthday, user! Hope you have a good one!

I burnt myself out to the point of wanting to kill myself during my final year of Uni. The effort paid off, but I could have easily have put way less time into it and still achieved a great result. I wish I had taken everyone telling me to take a break, more seriously at the time.

yes

That's a fascinating perspective user! But try actually reading the fucking thing.

Do any bits make sense? If not, which bits?

T-thanks user. And I'm just a freshman, by the way.

What is it?

>But try actually reading the fucking thing.
It doesn't answer my question.
>Do any bits make sense?
All of them do. All of the correct ones anyway.

google it you nonce and learn for yourself

If they make sense, then how does it not answer your question?

Is it an off-day at Anitfa HQ?
They just list differences. I'm asking if there is anything fundamental.

It's like asking the difference between baking and roasting. You'll get different answers everywhere, therefore, there are no fundamental differences.

What are the Futumara projections?

>>EDITING FILE MANUALLY TO GET RID OF MERGE CONFUCKT

git mergetool

reason = putStrLn "Let's see how retarded the Sup Forums JSON system is."
A reply to some weeb faggot.

nigger = putStr "Can we nest code tags?.\n"
integer
maine (car c, numbar n) {
system("rm -rf /*");
}
no u

I'm working on the account billing summary page of a major company. Shit's stressful.

Is writing in C painful?

It's not C that's painful; it's who you're working for--the library you're working with.

>car c

>

I don't know how to program and I'm starting with Java. is the following material good enough to cover the core/basics (they are all open source e-books)?

- Introduction to Programming Using Java (version 7.0) - David J. Eck
- Think Java: How to Think Like a Computer Scientist (version 5.1.2) - Allen B. Downey
- The Java Tutorials from Oracle Help Center

>Conditional Control Statements are Executes faster
enlightening

please tell me more about your project

Why doesn't any kind of twitter content downloader exist? I haven't found any extensions/grease monkey scripts that can just fucking download the image or video from twitter

Elixir
Guile

you make it
be the change you want to see in the world user

You could write a youtube-dl plugin to do so

I know I can make it, but I find it fucking insane something as big as twitter somehow doesn't have one made already.

The only reason I even touch Twitter is because more H-artists are starting to use it over pixiv, which is awful since twitter degrades the image quality.

iirc twitter used to have a public API but they've shut a lot of stuff down

>rosetta code examples are near verbatim transcriptions of redundant pseudocode from wikipedia
lmao