/dpt/ - Paily Drogramming Thread

What are you working on, Jow Forums?

Last thread:

Attached: budgerigars.jpg (1280x720, 126K)

Other urls found in this thread:

cs.cmu.edu/~charlie/courses/17-214/2018-fall/index.html#schedule
wiki.sei.cmu.edu/confluence/display/java/SEI CERT Oracle Coding Standard for Java
zeit.co/docs/api#endpoints/oauth2/authorization
zeit.co/pricing
edx.org/course/software-construction-data-abstraction-ubcx-softconst1x
github.com/purcell/elm-life
medium.com/@MadOverlord/conways-game-of-life-in-elm-4ef8f58a6ab0
github.com/jackfranklin/elm-game-of-life
discourse.elm-lang.org/t/elm-is-totally-total/800
youtube.com/watch?v=jw8K460vx1c
twitter.com/NSFWRedditGif

Stayed up for way too long writing a PNG loader for my operating system. It's not too fast and the code is pretty ugly, but it loads images and they look correct, so it's a start.

Attached: Screenshot at 2019-03-21 05-23-08.png (1920x1080, 882K)

When did hello world loose its comma? Just checked the first manual that had a hello world example and it was 'Hello, world'.

Is there any reason to use Haskell or agda over idris?

I don't think I appreciated how versatile these threed64 controls would be. Custom scrollbars, &c. All possible.

Attached: threed64scrollbar.png (47x198, 664)

Very comfy threedanon

Thanks, when I'm done tinkering, it'll be BSD licensed. It's time for a threed comeback.

Oh, and Xamarin compatible, btw.

Mainly the ecosystem and to take advantage of GHC's maturity.
Or, for some headfucked reason, you actually like Haskell's default laziness.

Trying to figure out how to create a bare-minimum server to use for Oauth2 URIs.

I want to create a severely reworked JavaScript with types. Typescript doesn't do enough
Imagine if you will

>a compiled
>with static, gradual, and duck typing
>and C types (char, short, int, int32, int64, float, double)
>as well as built in data structures (arraylists, object, string)
>that's focused on readability
>and functional programming paradigm
Pretty sure I just described kotlin though.

Wanting to get into JAVA.

How the fuck do i start? should i go for the latest versions? why some job offers ask for an old version? is there any big difference? should i go for JDK or JEE?

>pseudo-random

Attached: neckbeard.jpg (1280x720, 67K)

Now this is the kind of high-quality post we need in /dpt/. Thank you for enlightening me.

Attached: 1460899891386.gif (2034x1491, 48K)

You mean it works on Linux distros, OSX and mobile? That would be really awesome!

>want to get into Java
cs.cmu.edu/~charlie/courses/17-214/2018-fall/index.html#schedule

Skim through the book recommendations too, Effective Java by Bloch is a list of best practices. Also look at the 'secure Java' checklist shit wiki.sei.cmu.edu/confluence/display/java/SEI CERT Oracle Coding Standard for Java

>Versions
That's covered in the devops/tools slide under 'configuration management' there's a billion different products out there all using old/new versions of Java, they use these devops junky tools as an example but think of a typical big corp with a million customers all running different environments and why they can't easily update to latest features of whatever shitcrap is in the latest JDK/JEE so sometimes will note a specific version, but it's not like you can't just look up the changelog or anything.

this is hot good job user

Is there any C++ IDE on both Windows and Linux comparable to Visual Studio in terms of debugging and profiling? VS also doesn't really allow you to use gcc.

literally install Elm.
You even get totality.

QtCreator. debugging is not better than in VS but it'll do.

Learning Java as my second language. (The first is python btw.)

so uh, how do I like make a program that has one of those menu bars, you know the ones with File Edit View and stuff
is it some winapi?

Thank you very much, it really did help me a lot user!

I'm about to jump into Java too, my first language was C# so it doesn't seem like that much

I really hated the syntax of Python but there's a lot of cool stuff made in it, I just feel more comfortable with others

same, js (node) here and learning java.

If you are going to make it compile to JS(numbers are all double and chars are just a single letter string), the 'compiled' requirement is already done for and all those types are pointless just like kotlin's unsigned or kotlin in general.
TS and JS are not lacking in data structures like array, object and string so I have no idea what you're on about.
I also doubt that scala's rape babby with Java's class library is a good example of readability.

>Even get totality
So it's not Turing complete? So basically useless then.

Why the fuck does a front end need to be turing complete?
Sometimes i think you people just latch on to terms you don't actually understand.
But why shouldn't a front end be total?

You mean just for auth redirects?
>After a user successfully authorizes an application, the authorization server will redirect the user back to the application with either an authorization code or access token in the URL

In that case use Zeit for this zeit.co/docs/api#endpoints/oauth2/authorization it's free zeit.co/pricing since you don't want to spend a minute having to dick around maintaining patches to a server or that pile of shit OAuth2

My laundry.

That's a gun, not a phone.
YOUSE CANT FOOL ME.

Attached: 1531136801284.jpg (387x358, 33K)

because I am too much of a brainlet to understand what total means so I'll hide behind what my subpar babby duck lang has to offer just to blind myself and feel safe from all the better things out there. they're probably just bloat and subpar anyways! java rocks!

You just described bucklescript, which is what OCaml and ReasonML use to compile to javascript so shelve your idea until web assembly gets out of 'MVP' stage, then Reason and OCaml will both compile direct to webasm

I have tried out over a dozen languages and I still can't pick one to use for daily personal projects

Lisp - dead repositories everywhere, too dumb to use emacs
Haskell - I don't like static typing
OCaml - I don't like GIL
Elixir - it's great, but fuck structs
Clojure - it's great, but fuck the jvm
Rust - it's great, but too verbose for daily use
Python - it's great, but GIL and it's not fun anymore
Erlang - it's great, but fuck records


I like lists that can have multiple types in them, without having to think about type systems. So Haskell goes out the window.

>I like lists that can have multiple types in them, without having to think about type systems.
quit shitposting

Because by definition, there are programs that you won't be able to ever write in it. It's basically a toy language like agda and coq.

For example?
Also keep in mind, you're writing FRONT-ENDS or games.

I should also mention that elixir and erlang aren't suitable for desktop level applications, so that sucks. Basically only for server use, especially if you want to distribute it to users.

There's also this course edx.org/course/software-construction-data-abstraction-ubcx-softconst1x
It's free but they walk through editors like intelliJ it's really the only intro to Java you need then just read all the software construction advice from that course.

Could anyone look at my tic tac toe code please

You can't write Conway's game of life in it for example.

next
github.com/purcell/elm-life
medium.com/@MadOverlord/conways-game-of-life-in-elm-4ef8f58a6ab0
github.com/jackfranklin/elm-game-of-life

I just looked into it, and turns out elm is Turing complete, your claim that elm is total was the thing that was wrong. Only a small subset of elm is total, even equality isn't total.

>Only a small subset of elm is total, even equality isn't total.
source?

discourse.elm-lang.org/t/elm-is-totally-total/800

that was for 0.18, 0.19 changed a lot with JS.

Thanks. I can't really check right now, do you know if it is light enough to run on a 32-bit windows tablet with 2GB of memory (not massive projects)?

>that was for 0.18, 0.19 changed a lot with JS.
Well either that game of life has bugs, or its not total. It's mathematical impossible otherwise.

well regardless, I'm not really seeing a valid reason you have against it in the first place. It covers all points and more.

I just realized today that C functions commonly return pointers to their arguments so you can compose them.

#define salloc(str) strcpy(calloc(strlen(str), 1), str)

Attached: 1551079143903.png (600x600, 477K)

Is there a good book for learning about the history programming?

I don't mean learning how to program, but stuff like the history around the first programming language, how unix happened, how linux happened, how things progressed from assembly up to basic, C, etc...up to as modern as possible.

All good until some function returns NULL and your program crashes.

First time doing C/CPP via JNI for crypto crap.
It’s weird.
I hate openCL-C and uint/int16 and 8.
Blog over. Please sub and comment.

Help Jow Forums
I need to learn DevC++ , why is it so hard to me?

>why is it so hard to me?
how the fuck would we know

Attached: 1550450796951.png (314x278, 129K)

did you try googling it?

Attached: bwahaha.png (231x218, 10K)

Passing a null pointer is already UB. You have to check for it before doing anything regardless.
#define salloc(str) !str ? 0 : strcpy(calloc(strlen(str), 1), str)

Would fix that, but will produce less efficient code.
The harder problem is if calloc fails. I don't know if there is any way around that without writing an inline function.

>JNI
kek. you're already killing yourself so nevermind

video book youtube.com/watch?v=jw8K460vx1c

I have but it is different from what my teacher tells us
For example, she dismiss the cout command and when y try to compile some algorithm I always forget some ";" or I put it where it's not supposed to be, I don't know if it's the theacher's way to teach or me that I don't learn to her way, I am desperate I'm not going to pass the asignature

It's written in C++ and Qt so it'll probably be fine.

seems to be a problem with you learning C++ as oppose to some IDE

>Paily Drogramming Thread
what

Attached: 1552511568984.gif (380x270, 318K)

its to save memory

How so?
Serious here.

Java itself is shit and then you go as far as using another programming language with a different build system plus the esoteric JCrap to get a perf boost with overhead
10000% not worth it. drop the javeet crap if you need perf or decent FFI or decent anything really considering Java doesn't even have unsigned types, templates or even first class functions (hurr functional interfaces durr)

It all started with
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle or the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/**
* The HelloWorldApp class implements an application that
* simply prints "Hello World!" to standard output.
*/
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
}
}

Attached: 1552732329377.jpg (570x570, 29K)

I fucking hate how in some projects each file has fuck huge license at start but no documentation what the file implements.

Stop being so based you're making me feel extremely bad

i wish google make their own java standard and compiler
oracle creates so much not very well though out garbage

Attached: confess.png (1229x1160, 58K)

I know, right? We should bend over those lazy ass non-documenting programmers and castrate the fuck out of them

Google already has go, why would it try to remake java?

wtf

>slowly developing my project in private
>too afraid to push it to public repo before its complete

should I do it
what if they bully me
what if they ignore me

what is openjdk

>needing documentation when the source is right in front of you

Brainlet.

It’s not that it’s because my boss wants to use the old Cryptoshit for credit cards we used in old terminals and unga bunga cobble it into an android app.
It’s weird.

Oracle sued Google ages ago for using Java, I don't think they want anything to do with them

you block them and cry about it on twitter. Try to be as passive aggressive as you can.

its not a different standard thats for sure

>20kloc file
>dude just read the source
It's all so tiresome

what is it

He fell for the Java meme

Attached: haha.gif (500x384, 290K)

Brainlet

Is using push_back while iterating through a vector undefined behaviour?

i only come here daily to find ur post

what if they ignore me

a l-library

Attached: 1552954111664.jpg (2335x2507, 685K)

We should have a twitter for real good dpt posts. Ah who am I kidding the osfag should make his own twitter

>what if they ignore me
They already ignore you, what can you lose?

I'm having a lot of trouble reasoning about JavaScript code. Knowing what functions take what as parameters, what objects have what fields,theres so many built in or library functions that seem to have multiple ways it can fail that you have to compensate for. I find myself writing comments all over the place trying to document what's going on, and have to google every single thing I use. I'm used to c# which is pretty self documenting, and all the documentation is built into the ide, everything is strictly constrained as well. Writing JavaScript that works as I expect is so much harder than writing c#.

Brainlet.

you get used to it

TS was created by the same guy who made Delphi and C#. It is worth a try

>delphi

dropped

Delphi is based. fucking zoomer.

stfu boomer. had a friend in school who was all about this delphi bullshit. biggest code monkey i ever met. hung out on edgy warez forums worshipping his betters.

Attached: 1552866469572.jpg (200x313, 10K)

What does that have to do wtih Delphi you Imbecile?

Bet y'all brainlets drop everything to fap every time some slut gets posted.

Attached: 1553042738585.png (622x396, 304K)

Lookup iterator invalidation

Btw, Rust doesn't have this problem ;)