/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Previous Thread:

Attached: -g-animeC.png (2560x1440, 703K)

Other urls found in this thread:

en.wikipedia.org/wiki/Lorenz_system
stackoverflow.com/questions/351733/can-you-write-object-oriented-code-in-c
ldeniau.web.cern.ch/ldeniau/html/oopc.html
ooc-coding.sourceforge.net/
ooc-lang.org/
github.com/CObjectSystem/COS
colinhowe.co.uk/general/2018/05/30/technical-interview-exercises/
jd.benow.ca/
benf.org/other/cfr/
github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine
twitter.com/SFWRedditImages

>mental illness
fuck off

I need to move out so I can be true tech nerd and just work on stuff right when I wake up and never shower or wake up at a good hour

Setting up my pleroma instance and doing various customization. It's such a comfy project, I'm in love.

Attached: 1419301492357.jpg (409x409, 75K)

I'm learning to use GLUT and OpenGL, but I have a dumb question: Why won't this draw a circle?
void drawCircle(float centerX, float centerY, float radius)
{
const int NUM_PTS = 720;
glBegin(GL_LINE_LOOP);
for(int i = 0; i < NUM_PTS; i++)
{
float deg = (float(i) / NUM_PTS) * 360; //Gives degrees along the circle we're at
float rad = deg * M_PI/180.0;
std::cout

Attached: Screen Shot 2018-05-31 at 10.52.06 AM.png (1574x770, 161K)

anime website

thank you for using a shiina pic

Attached: vlcsnap-2018-01-06-00h52m30s468.png (1280x720, 728K)

Fixing bugs on tracker I'm at 2/12 at the moment. Deadline for a team is weekend.

Otherwise im messing with emacs+clojure, its pretty comfy. I love all things lispy

is this a good anime cause the manga kinda bored me

You know, it's strange. I know programming in lisp is powerful, but whenever I need to do something quick and dirty, I resort to python, and every time I want to do a larger project, I resort to C/C++

I've been debating whether or not to take the deep plunge into lisp, and if it's worth it seeing as though I can do most things in either of the two/three langs I already know.

Note, I wasn't scaling correctly. It should have been
glVertex2f(newX/Width, newY/Height);

leaving your comfort zone is hard, and that's natural.

To be honest i never did anything with lisp but i love just playing with it and doing some little things. I start doing something then i mess with elisp then i want to see how to do this thing then the other and in the end i do nothing. But its fun and it for sure beats vidya as thing to play with

Making a note-taking desktop application with Electron. Fully cross platform with cloud sync!

finally figured out how to "install" opengl. anyone have ideas for a first project using it?

Implement simulation of lorenz attractor. You literally have to only put pixels at specifix (x,y,z) so its simple. And you get to learn something fun

en.wikipedia.org/wiki/Lorenz_system

You lost me at Electron. As noble as your motives are, running a chrome instance for a single program is horrible.

i had a friend making procedural art with opengl. he'd take a couple particles, give them physical properties like gravity, and then they'd zip around each other changing color with velocity and interaction. usually looked dope

Exactly, and all that user needs for solving system is runge-kutta of some order which is trivial to implement. And it simulates chaos so its cool

simple and awesome, cant beat that

>glClear() and glEnd()
Wat?

My b.. Mean `glBegin(GL_POLYGON)` and `glEnd()`

It's working now, so yay for that.

What anime is she come from?

Friendly reminder than C can do object-oriented programming.

>Can you write object-oriented code in C?
stackoverflow.com/questions/351733/can-you-write-object-oriented-code-in-c
>Object Oriented Programming in C
ldeniau.web.cern.ch/ldeniau/html/oopc.html
>Object Oriented C
ooc-coding.sourceforge.net/
>The ooc programming language
ooc-lang.org/
>C Object System
github.com/CObjectSystem/COS

Attached: 20180226fadwp7si05evaoz.rect2100.jpg (1290x1075, 155K)

wtf i hate C now

so I started learning C recently, and I'm using headers for the first time today. how do I get headers to work with Visual Studio code? when I open the folder containing the source code and the header there's no errors, but when I try to compile with GCC it says no file found for the header. I've tried editing the c_cpp_properties.json but when I add the filepath to includepath it tells me it failed to parse.

>tfw you recognize that line of office equipment

What's the problem here?

Attached: ss.png (1241x613, 54K)

Employed Haskell programmer reporting in

Attached: dunecat.jpg (439x392, 30K)

I feel like this is missing some context, because I don't see anything immediately wrong, just a few things that might possibly be wrong

>Employed Haskell programmer
are you employed to write dank Fibonaccis?

Unemployed Haskell programmer reporting in

Attached: 1453657295316.jpg (1920x1080, 112K)

unemployed smalltalk programmer checking in, has anybody seen my grandson?

Attached: 1527187651762.png (500x500, 404K)

Attached: bglisp.jpg (500x225, 42K)

bill gates was right
the correct way to fib your naccis is corecursively
fibs = 1 : 1 : zipWith (+) fibs (tail fibs)
fib = (fibs !!)

>404 KB

Attached: ol.png (500x500, 67K)

this is bullshit made to feel you dumb. Don't listen to them, user.

Attached: 1505419229144.jpg (326x450, 14K)

Friendly reminder that C can do slightly impure functional programming

it's from here

colinhowe.co.uk/general/2018/05/30/technical-interview-exercises/

"I was nervous when I first added this exercise to my standard set. It’s a bit naughty. I normally write a simple program that has no bugs in it and then I tinker with some underlying library, or OS configuration (for devops roles), and introduce a bug (e.g. I tweaked the MySQL driver to only ever return odd numbers when doing a count). This exercise is introduced as being a simple program that has been written and then a bug has been created somewhere in the system."

Attached: 1508182008353 (1).jpg (432x444, 196K)

The for loop is around the string and not the insert so it only inserts 1? Idk what else could be wrong

That is a list comprehension and thus valid Python code.

Attached: 22070885_148116545793368_3011879892590526464_n (1).jpg (477x477, 30K)

What's the best currently available Java decompiler?

>putting a bug in a library to test code comprehension

retarded

Why do people spam Haskell stuff all day instead of programming?

jd.benow.ca/

benf.org/other/cfr/

github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine

Because that's the only useful thing you can do with haskell, talk about it.

Do cookies violate HTTP statelessness?

Attached: 1527503184082.jpg (1600x1200, 403K)

Is there a better way to make this "snake" move?

#include
#include

#define CLEAR (std::cout