/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Previous thread:

Attached: 46029687505506.jpg (600x788, 87K)

Other urls found in this thread:

javascript.info/
foolfuuka.readthedocs.io/en/latest/code_guide/documentation/api.html#search
pypi.org/project/moesearch/
desuarchive.org/_/api/chan/search/?board=int&subject=nederdraad
desuarchive.org/_/api/chan/search/?board=int&subject=/lang/&page=5
twitter.com/NSFWRedditVideo

the traveling salesman problem

JavaScript rocks!

Attached: js-rocks.png (1000x494, 286K)

Attached: fag.jpg (512x512, 45K)

i'm an oldfag learning css and js by auditing a few coursera classes. Hoping to get into web dev after a few years in private equity and corp finance.

Please use an anime image next time. And at least wait until the old thread is past the bump limit.

Fuck off

why tho

noice

Attached: 979809896964580127.gif (420x420, 713K)

Programming is increidbly boring

nth for nim!

Attached: faggot01.gif (390x373, 2.54M)

Please use some dumb anime girl holding a programming book image next time instead of gay old memes, thank you.

Please stop treating anime girls as an ironic meme that you love to share with your friends on twitter

For JS javascript.info/ is practically the only reliably kept up-to-date intro to JS, everything else in comparison is either garbage or just plain outdated as fuck.

No.

no

Attached: some dumb sicp image.png (441x421, 176K)

Someone help me understand how class type objects are allocated in memory in C#/Java. For example, the following code:
RadioButton previousRdo = obsEpisodes[currentEpIndex].Children[5] as RadioButton;

obsEpisodes is just an observable collection. This code just retrieves the 5th element of one of the objects in this collection and assigns it to previousRdo.
Changing previousRdo will also change the original object inside one of the objects in obsEpisodes, that happens because class types in these languages are passed by reference and not by value.

Does that mean that previousRdo was implicitly converted to a reference? If that's the case why can I reassign values to previousRdo when technically speaking you shouldn't be able to reassign references?
Does previousRdo occupy the same amount of memory that a RadioButton object would or does it occupy the same amount of memory that a reference would?

Attached: 7135889.jpg (818x720, 78K)

>retrieves the 6th
My bad

It's boring as fuck and not fun at all.

Then fuck off

I'm 22 (nearly 23) and going back to uni in Computer Engineering. I've started studying programming on my own before I go so I can keep the habit, but I'm very much a novice still. I'm currently learning C++ and Javascript; should I replace one with something else? I know the school will be teaching Javascript the first two years, and I have some previous novice experience with C and Python.

Also, if I want to make an income programming, should I switch to Electrical Engineering and learn how to program on the side? I've heard that I'm too old to get a good job programming since I'll be on the other side of 25 by the time I have a degree, but if I go with EE I can still try to make my own money programming on the side without banking my livelihood in being employable as a programmer.

All class types are actually references.
Foo foo;
foo holds a reference. foo.bar dereferences foo at the same time as accessing a member of the object.

25 is not too old for programming jobs.
If you want EE, just do it.
I will not force you or shill you to CE/CS degree/ dev jobs

Is a bezier curve a nice way to emulate human mouse movement on the screen?

Not even close.

>foo.bar dereferences foo at the same time as accessing a member of the object
I see.

In C++ I would do something like:
for(Element &e : collection)
{
foo(e);
}

So doing the following in C#/Java has the exact same effect I assume?
foreach (Element e in collection)
{
foo(e);
}

I'm not with a proper compiler/IDE at hand, so that's why I'm asking these retarded questions

Lisp is the most powerful programming language.

Same effect but Java calls them pointers and C# calls them references

Think of it this way.
If Element is a class type then a C# declaration of Element e; corresponds to a C++ declaration of Element *e; and e.SomeMethod() corresponds to e->someMethod()

I get it now. Thanks senpaitachi

Attached: 766655571.png (1165x1075, 728K)

Its a bot or retard who spams this image to annoy people and make them angry, just ignore him.

Working on my terminal-based histogram drawing library written in C. Currently wrote the code for the basic operations of creating & deleting histogram objects.
Also wrote the function for adding data points to a histogram. I implemented it with a struct data type that has a char string, an integer value and pointer to the next struct. A simple linked list.

Attached: histogram.png (947x500, 38K)

That's not a histogram.

Attached: Example_histogram.png (300x350, 12K)

...

>>>/reddit/

Attached: some dumb yuno gif.gif (600x308, 68K)

In java it would also be
for(Element e : collection)
{
foo(e);
}

In java they are also called references.

Ironic weebs GET THE FUCK OUT

Attached: 1518135386708.jpg (622x815, 397K)

How can somebody be a weeb ironically? Either you wish you were japanese or not, there is no in between.

Just a dabble of the program structure

I want to develop a linux application without messing things on my system. Should I use a VM?

What on earth are you going to mess up on your system by simply developing software?

yes or try that crappy WSL thing.

Install lot of useless dependencies and libraries mostly.
Isn't that for Windows?

>Install lot of useless dependencies and libraries mostly.
I don't see why that's an issue.

I only post anime girls to mock the retards who like them.

Oh I misunderstood, I thought you meant that you weren't using linux and you wanted a VM to develop linux applications.

Then you're not weeb, just some dumb shitposter.

Why in God's name do you want to fuck with memory management in those languages?

making a compiler so I can write roms for my chip-8 emulator.

it pretty neat desu

Attached: 569941.jpg (600x426, 34K)

I never said I wanted to change the natural behavior of those languages, I was just curious about how much memory class type objects were taking up in memory. Read nigga, read!

Will it support threading?

If it's not Lisp, it's shit.

He is not me.

I hope it's assembly, otherwise kys

Attached: 9767576173030866.jpg (567x567, 39K)

You're a huge LARPing faggot.

Alright niggas, I'm familiar with programming desktop software, now I'd like to get started on bots. Specifically, internet crawlers. I figure, there are probably bot frameworks or IDEs or whatever. Anyone can comment on those?

Attached: 48398292_1063127447219617_8349766729546596352_n.jpg (480x638, 55K)

Attached: index.png (256x256, 136K)

Learn Lisp.

I'm not sure if I've ever heard of an IDE that was made for creating a specific kind of application, except maybe for embedded where manufacturers will spit out garbage extended versions of eclipse for retards who don't understand how to set up a toolchain properly.
Either way, you'll probably just need an HTML parser and some code for doing matrix manipulation.

might be obvious for some but I can't figure out for the life of me why the results of REST API queries is limited to 25 when using the requests lib in Python

I'm trying to search for all threads matching a subject and no matter what I do I only get the last 25
I've tried with moesearch too and still get the same shit
the date_start and date_end don't seem to work with any combination I've tried (yyy-mm-dd, yyyymmdd, ddmmyyy)

anyone has experience with this? I tried adding limit=100 in there but again nothing

available fields: foolfuuka.readthedocs.io/en/latest/code_guide/documentation/api.html#search
moesearch: pypi.org/project/moesearch/
example: requests.get("desuarchive.org/_/api/chan/thread/?board=int&subject=nederdraad")

>make them angry
nah, I like it.

Post your enigmatic asm projects.

Im a different poster than the asm guy, I just wanted to post this retarded anime face.

Attached: index2.png (256x256, 136K)

I'm going to write printf in assembly one day and it's probably going to make me want to kill myself. Please come to my funeral, Anons.

>retarded anime face
Well, it suits you.

no

pasted the wrong url wups
but pic related is for
desuarchive.org/_/api/chan/search/?board=int&subject=nederdraad

any idea how to get more than just 25?

Attached: file.png (531x658, 11K)

Is there any reason to embed scripting language in a project if it compiles in a few seconds?

What?

no, embedded scripting langs / DSLs are a relic.

scripting languages are easier to write code in at the expense of being less organized

>DSLs are a relic
definitely not

pages or a certain search result offset?

tell me where they're actually useful.

I don't want to continue my most successful project that for some reason has gained some attention on github. It's useless shit full of shitty code written in a shitty language using shitty libraries and each person who uses it is a retarded piece of shit. I should delete it and kill myself.

Attached: 14353545459520.jpg (288x223, 6K)

You could accept pull requests

This post is comically wrong.

everywhere? Regex is basically a DSL, the domain being string parsing. There's countless specialized tasks that can be made easier to work with by giving them their own smaller language

Are you using postman?

Just put a notice saying that it's unmaintained and you're willing to allow someone to take ownership or tell them to fork it.

like I said, I've tried everything I could think of, including limit, pages, offset
you can also try it yourself in the browser if you find something that works

I was hoping it'd be some obvious python-related thing, but i can't find anything related by googling around for limited results; only get stuff about salesforce and atlassian...

There are none. Only issues, bugs and feature requests hurr durr do this do that.

I think my code is too convoluted for people to digest it.

I don't really know what postman is so no

Project url? I wanna know why it could gather so much attention.

I meant as a drop in scripting lang
see

Is chrome addons that let you test api request before you write code for it.

Again, comically wrong.
DSLs are used extensively in almost every single non-CS STEM field where domain scientists need to do computations. Entire projects are centered around building them. If you think theyre antiques you're ridiculously out of touch.

as I already posted, dynamic langs are easier to program in at the expense of being less organized, it's completely viable to use a drop-in scripting language for top layer code

Damn I hate C++ so much.

>where domain scientists need to do computations
why would you need a DSL for computations?
>easier to program in
that's not really an argument or a valid reason. And just makes for bloated projects.

>hat's not really an argument or a valid reason
of course it's an argument you retard
if we didn't care about making things easier to program we'd still be using assembly

But modern langs are as easy as Python and nearly as fast as C.
There's really no reason for scripting langs to exist.

Python IS a scripting language

that's my point you mong.

oh I misread
There's no language that is as performant as C and as easy to use as Python

what? I'm merely trying to use the existing API's of the various archives of Jow Forums like desuarchive

anyway, I think I found it
it wanted "&page-" added to it...
because why document this shit instead of leaving it to poor fuckers like me to figure it out and reverse engineer *sigh*
this works for example desuarchive.org/_/api/chan/search/?board=int&subject=/lang/&page=5

Literally Nim.

Holy shit, give that shit up, autist.

GCC AND CLANG TAKE SO FUCKING LONG TO BUILD AAAAAAAAAAAAAAAH

>no argument

you might be right, but it's still statically typed, dynamic typing makes it very easy to slap shit together