/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Previous thread:

Other urls found in this thread:

crypto.stackexchange.com/questions/1025/can-one-generalize-the-diffie-hellman-key-exchange-to-three-or-more-parties
tornadofx.io/
pastebin.com/QxikmuGm
golang.org/doc/faq#generics
success.outsystems.com/Evaluation/Getting_Started_With_OutSystems/05_Does_OutSystems_help_customers_build_applications/40_Expert_Services
github.com/puddly/android-otp-extractor
twitter.com/AnonBabble

java

web
assembly

pls no

Im currently trying to build open scene graph. or should I say I built it except like 4 or 5 plugins.

I made the project with cmake and all dependencies are provided and basically everything works. except I get those problems when I compile it.

I already fixed a bunch if other problems by compiling the dependencies in question myself. but there seems to be a deeper problem that it doesnt work out of the box as it should. anyone some ideas?

first for nim!

last for crystal

Second for nim. Currently porting my game engine from Rust.

If you used C you would have been first

but I did use C, in the long run at least, after compiling

Not if you include development time

>If you used C you would have been first
in highest bug count? Definitely
/samefag

I'm working on a java app. Why a java app in 2018 you may ask? Because our group of 7 people is too uncoordinated to be able to setup a database and a PHP server so we're just hardcoding the data in

...

My latest act of artistic genius, a la Fortran:

C Uses Newton's Method to find the square root

PROGRAM SQRT
REAL NUM
REAL NEWTON ! Not including this caused a type mismatch error.
REAL X
WRITE(UNIT=*,FMT=*) "Enter a number: "
READ(UNIT=*,FMT=*) NUM
X = NEWTON( NUM )
IF( MOD( X, 1.0 ) .LT. 0.01 ) THEN
WRITE(UNIT=*,FMT='(1X,I9)') INT( X )
ELSE
WRITE(UNIT=*,FMT='(1X,F13.9)') X
ENDIF
END

FUNCTION NEWTON( NUM )
REAL NUM
REAL NEWTON ! Guess
REAL DIV ! Relative reciprocal of guess
NEWTON = 1.0
50 DIV = NUM / NEWTON
NEWTON = (NEWTON + DIV) / 2
IF( ABS( NUM - (NEWTON * NEWTON) ) .GT. 0.001 ) THEN
GOTO 50
ENDIF
END

No.
C Uses Newtons Method to find the square root

PROGRAM SQRT
REAL NUM
REAL NEWTON ! Not including this caused a type mismatch error.
REAL X
WRITE(UNIT=*,FMT=*) "Enter a number: "
READ(UNIT=*,FMT=*) NUM
X = NEWTON( NUM )
IF( MOD( X, 1.0 ) .LT. 0.01 ) THEN
WRITE(UNIT=*,FMT='(1X,I9)') INT( X )
ELSE
WRITE(UNIT=*,FMT='(1X,F13.9)') X
ENDIF
END

FUNCTION NEWTON( NUM )
REAL NUM
REAL NEWTON ! Guess
REAL DIV ! Relative reciprocal of guess
NEWTON = 1.0
50 DIV = NUM / NEWTON
NEWTON = (NEWTON + DIV) / 2
IF( ABS( NUM - (NEWTON * NEWTON) ) .GT. 0.001 ) THEN
GOTO 50
ENDIF
END

...

C on suicide watch

Re-learn javascript
Learn NoSQL DB

>implying any amount of money can compensate for the hours of your life lost being a webmonkey

What do you guys think about round-robin DH using RSA private keys as the DH private exponent? If I use that system, I could also use the private key to verify identities, killing two birds with one stone.

>RoR
>Obj-C

Wrong.

Speak English, doc

Isn't that how it's done already? I did an implementation a while back but can't remember exact details

crypto.stackexchange.com/questions/1025/can-one-generalize-the-diffie-hellman-key-exchange-to-three-or-more-parties

Ah fuck you're right, SSL uses asymmetric keys.
I need to think before I post.

For one of my classes we're doing an engineering project and my group wants to make a mockup of the app. I got stuck with that part. How would i even go about learning this? I have four weeks and i took a java class. It doesn't have to do anything. I just want to make it look good and have some clickable buttons. And maybe a loading screen when the app opens up.

You could be a nonce and embed a webpage in the app, rendered with JavaFX.

Powerpoint. Not even joking.

Kotlin + TornadoFX
tornadofx.io/
- boilerplate-free (picrel)
- screencasts
- well-supported (Google!) language by the makers of the most used JVM IDE
/shill

>Visual Basic
Hahahahah fucking why

any questions?

does anyone here have a simple C/C++ example of libxml getting data out of xml document with the said document attached?
i only found tutorials (in jargon) that work on god knows what and in the end i have no idea what's going on

One of our clients has a Pajeet-made VB.NET project that we've been ordained by the gods of cruelty to rescue. It's been two years, and we're still working on it.
I fucking hate VB.

Nice job, Pig Fucker.

I know even less web development than i know java
I was thinking of uploading it to the play store so my class could download it. We have to present this thing so i wanted to ham it up

You have to do it for Android? That won't be bad, there are plenty of ways to mockup apps.

You Can Write FORTRAN in any Language

What exactly uses x86 still? How are these platforms still relevant? And do i need to care if i'm building for newer software/hardware?

That's how Microsoft does it after all.

"Legacy" hardware. Until everyone stops using shitty compuers, you'll have to support it.

Ok some of the hard problems should be super hard

Taking this challenge now that stomach is full, going for at least 3 of the 5 gets.

well shit

Euler's in C++.

I know. That's why I like the direction of WebAssembly and things like that. The less build targets you as a developer have to hit, the easier it is to maintain.

Aren't modern API's designed to support both versions in one source code?

You still have to compile your code twice

>sataniaposting
Cancer, begone.

If you compile to x86, depending on the language, it is supported in 64-bit as well. Just depends. But like said, you still have to compile it twice.

>still supporting x86 when, even some of the major distros stopped supporting it
sasuga, /dpt/

I don't have to but i'm pretty sure you have to have a developer by to create apple apps, right? And i wouldn't be able to test it on my own phone

I remember jokes being made about how dilapidated VB was in the fucking 90's, the fact that anyone could still be using it 10 years after the plug was pulled makes me believe those same users enjoy fucking corpses

If you turn on USB debugging on your phone (developer mode setting), and allow to install apps from untrusted sources, you can certainly test it on your own phone.
But you do need to have a developer license to publish to the Play Store.

That project makes me want to convert to Islam, nuke the entire planet, and rape every person that I find in Heaven. VB.NET WinForms + DataSets + SQL Server, its like a glitch in the fucking Matrix.

(÷∘2÷+⊢)⍣=

Sure, I will leave but only if you can make something better than what I make.

>currency converter
>venford's law
>graphic analog clock
>draw a spinning 3d cube
>tcp chat program with basic encryption
>create a hsv color representation

I'll be making at least 3 of these.

>tcp chat program with basic encryption
>not making a WebRTC DataChannel voice + video + chat app with RSA-4096 encryption
You really do belong in

That was what the challenge said, literally.
>implying I'm not making the encryption algorithm as well.

Now that I think about it, what does the "create" in
>create a hsv color representation
even mean? And wouldn't CIELAB or CIELUV (or to keep the hue component, CIELCh) be more interesting anyway?

WS1S will save systems programming.

post screenshots of your code

>if you can make something better than what I make.
>better than what i make
Anything is better than nothing.

i use vsc too, it's pretty comfy

...

Nothing interesting yet.

...

anyone here ever used java swing? How does a nigga go from one form to another?

>Perl
>le currant jahr
shiggy

I imagine they meant something like this.

Can a kind soul explain to me what are "generics" and it is a problem that Golang doesn't have them?
[/NotAProgrammer]

I had to write a script to deploy the database project for this project, since I can't use VS2017 in Debian. Ignore the spaghetti code.

>() => console.log(...)

instead of a simple

>console.log(...)

why

It's a chain of promises that resolves sequentially.

I could've easily just put them inside the next block, but this was at about four thirty last night, so I wasn't at my best. I'm just happy it deploys!

What would be the problem if you didn't use async keyword?

I'm someone else, but he couldn't have used await, I think?

The mssql package isn't synchronous, so I'd have to either do async/await or a bunch of callbacks.

>java

Is exercise 8.7 expecting me to use the sieve method I made in 8.5?
Cos I'm trying to write a method that doesn't call other methods and I can't get it to work.

There are different kinds of numbers, like whole numbers and fractions.
Say you want some code that adds up all the numbers in a list.
With generics you can write a single add function that applies to a list of whole numbers, a list of fractions, a list of real numbers or whatever.
Without them you must either copypaste your code into multiple functions, or lose type safety (i.e. the knowledge of what kind of number is being added) in order to do this.

But what's nice is since I am doing things asynchronously, this is all I have to do to run things sequentially: pastebin.com/QxikmuGm

my man. How's it going? have you found any problems to be particularly interesting?

Ok thanks, I see it.

And is these a good reason why Golang doesn't add this?

and the one in 8.6 i assume. that's one line of code though

Not same person, but see golang.org/doc/faq#generics

Adjust your autism.
8.5,6,7 are clearly laid out in such a progression that they blatantly invite you to reuse the code written in the previous exercise.
This is called reading between the lines. Useful for interacting with actual human beings too.
/shitpost
Srsly tho, do it via the expected approach -
reusing the code. Only then, if you're in the mood, do your own shit as an alternative implementation alongside the expected one.

What is a OutSystems Expert?

>I just want to make it look good and have some clickable buttons.
matlab gui
>look good
lower your expectations on that point though

Cuz go is Google's tard-proof language, meant to be simple enough that it minimizes fuckups by its pajeets and SJW koders.

>OutSystems Expert
success.outsystems.com/Evaluation/Getting_Started_With_OutSystems/05_Does_OutSystems_help_customers_build_applications/40_Expert_Services

fuck off, shill

?

Thanks

What are you talking about? I did a Google search, I didn't even read the link.

Made some contributions to a python script that extracts 2fa codes from your android, still waiting for google to receive my PR.

post link

Thanks. I've been away from general learning for some time now.

github.com/puddly/android-otp-extractor
My "real" PR hasn't been accepted but hopefully will be soon, I guess he just merged the second one and that broke the first.

#include
using std::vector;
vector sieve(int n){
if(n

res[0] = res[1] = 0;