/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: 1407703380370.png (1207x1060, 508K)

Other urls found in this thread:

youtube.com/watch?v=2LPboySOSvo
jobs.amd.com/job/Markham-Linux-Developer-Open-Source-Graphics-73812-ON/553331800/
pastebin.com/c3a5SQm8
twitter.com/NSFWRedditImage

Is there anything wrong with using the HTTPS protocol for non-web shit?

How do I make a good LinkedIn and why don't these count as tools and technologies?

Attached: Screen Shot 2019-06-03 at 6.23.04 PM.png (476x146, 14K)

does gitlab have a markdown editor/preview?

>Skills
>Emacs

Attached: 1469656490556.png (166x166, 14K)

I mean, if Word counts...

>emacs
kys yourself.
but seriously, using an IDE is not a skill.

first for Erlang

Attached: 2079.jpg (1240x744, 41K)

RIP

It's okay, user. I don't mind that your JavaScript project isn't finished yet. Maybe we could finish it together?

Attached: 476f968cb99a4a08fe75496ece0a3a25.jpg (900x1200, 194K)

kill yourself tranny

nth for learn numerical methods

youtube.com/watch?v=2LPboySOSvo

RK4 is all I need.

I know a little bit of Java but I know it’s a shitty language.
I want to make an app for my sister-in-law’s business that is supposed to handle a database. Would C# be a decent language to learn for this?

Emacs definitely counts as a skill.
You don't just become adept at emacs overnight, and being familiar with it gives you access to a very wide range of development tools.

Stick with java, its better than c#

assuming windows and assuming app you mean GUI based application
As I understand it, WPF is a lot better than that swing nonsense, and C# is good with databases, so go for it.
not that i use it too often myself

imagine fucking a heart

I ran C code on a Raspberry Pi(Cortex-A53) and a PC with a i7 3770K processor. It consists of 2 tests, each looped 1000 times to give an average execution time.

Code 1:
unsigned int a[1000];
unsigned int i;
for(i=0;i

Attached: 6454363.jpg (236x265, 9K)

Look into Entity Framework if you're going with C#

well Windows and probably iOS if possible, although I have no idea what kind of process I need to go through to make it work on her iToddlerphone. It would be a good exercise though
>assuming app you mean GUI based application
indeed. It's just to keep track of her inventory, where it updates the database for each transaction.

RPi has slower memory access and a smaller cache.

I'm not really familiar with hardware, but couldn't it be the malloc?

That's one of my theories, but it can't be all.
But would Code 1 likely only be done in cache? And as the other user said, the use of malloc() would allocate space in the RAM which is quite slower on the Pi?

Actually, that could be. I had another test program which demonstrated the use of structs. That too ran slower, but not as slow, only by a magnitude of 12
Code for reference. Not a serious program
typedef struct
{
char *name;
int var_id;
}Object;

Object *create_object(char *name, int var_id)
{
Object *obj=malloc(sizeof(Object));
obj->name=strdup(name);
obj->var_id=var_id;
return obj;
}

int main()
{
int i;
for(i=0;i

Windows'd be fine, read up on the windows presentation framework for the UI, and I've heard of being used in the context of databases so maybe that too.
>IOS
Unfortunately if you want to get it working on fruitshit, going the webdev route is basically your only option.
It's simply not worth jumping through all of apple's inane hoops and completely Arbitrary restrictions.
From what I've read it's a massive pain in the ass, and they might not even allow applications like that. They just ban random things for no good reason.

unironically Ruby on Rails

What happened to that user writing a C interpreter in Scheme?

Will look

allright, I think it would be fine to just implement the programs on each POS in each of her stores and have one program that allows full overview of all the stores on her own home PC.
She has like 5 stores, and instead of churning out thousands on pajeet devs, she can just get one simple system for free which at the same time gives me some coding experience that I can put on my github.
Just need to figure out how I can run it in the background and read from the input buffer from the scanner and figure out if a transaction has gone through.
I'll see, I haven't really made any plans yet. Thanks

>swing
the new thing is javafx. it's pretty good.

>>
.>>

anyonre here wathc google tech lead?

Is your sister-in-law cute?

setup VS2019 with xamarin forms or use VS for mac if you own a mac. It is much better than xcode + swift.

this. provide pics user.

[spoiler]yes/spoiler]

who's dick is bigger, hers or yours?

>implying that apple’s tight grip over app store isn’t good

Alright since you’ve been good bois
Her on the left. cba to rotate pic
No, I’m not a third-worlder

Attached: 42D9156F-5BB3-4EA9-A27E-75806DE37A23.jpg (1280x722, 130K)

oh fuck he actually delivered
post your github and ill contribute m8(if you go w/ C#)

amd is hiring c/c++ linux programmers for their open source graphic driver.

jobs.amd.com/job/Markham-Linux-Developer-Open-Source-Graphics-73812-ON/553331800/

remote working accepted.

and you are posting this on an african turtle-breeding forum because?

wtf a chink among us

i have been here for a long time, i know several anons who are lurking here that are skilled enough and could be interested.

i bet you think rust is a good thing
total freedom, even if a few irrelevant people get hurt along the way, is always better

Is that the equivalent to Spring Framework (java)?

>x86 assembly
Well that's just bullshit. That's clearly relevant to the tools section.

I'm not familiar with Spring. Entity Framework allows you to not have any manual interaction with the DB. You're simply dealing with objects that automatically get pulled from and saved to a database.

unsafe

Trying to make an array of objects in Java, but it keeps giving a NullPointerException error:


Account[] accounts = new Account[10];

for(int j = 0; i

Attached: 1541927109346.jpg (573x572, 117K)

Don't listen to this girl.Entity Framework is for overengineered enterprise shit and it will transform your code completely. just stick to dapper and postgre.
no, maybe hibernate?

I'm going to write a renderer

what for?

you're not initializing any of the values in the array user(ex: accounts[j] = new Account()). also, make sure you're changing i or your loop will never stop.

use vulkan
it's fun

>Entity Framework is for overengineered enterprise shit
lmao what? did you ever use it?

a bit

Initializing seems to have fixed it, but it's printing values like "Account@55f96302" which I assume is an address?

Why is it doing this if the setter has Math.random between 0 and 5000?

You're printing the account, which triggers the ToString method(I think, not really familiar with Java). You should instead System.out.println(accounts[j].getBalance())

Do people here actually program?

some girls here do

You were right, although now it's only printing 0.0. Gonna keep fiddling with things.

Did you actually call setBalance?

Yes

The setter does not get called automatically when you create an object.
What does get called is the constructor so you need to put that random initialisation line in constructor.
Just like another user said when you print an object it uses the toString(), the random numbers thing is a hashcode, not address

im gonna quote my very good question here thanks

In languages with forced OOP (like Java and C#) the base class typically has a ToString method. The default behavior is just to print out the object type. Someone has to write their own definition if they want to it to return a meaningful string based on the value.

Putting the Math.random into the arg-constructor still had it printing 0.0.

I had the Math.random() in setBalance. I just replaced that with this.balance = balance and then made getBalance return the Math.random() and now it works.

Is this a bad idea logically even if it works?

You understand python is duck typed right?
it doesn't matter what type anything is, only that it has the variables/functions you call
all you've done is define a function with a parameter named person

you're probably not doing what you think you're doing. the getBalance will be random each time you call it, as you're not storing the Math.random's result. You should have your setter and getter look like:
void setBalance(double balance) {
this.balance = balance;
}
double getBalance() {
return this.balance;
}

What this does is store a new balance in the Account's balance field when you call setBalance. To use, call account.setBalance(newBalance), then you can retrieve it with account.getBalance()

Lisp is the most powerful programming language.

>but it can't be all
It absolutely can. Simply rewriting the access patterns in a naive triple-for loop matrix-matrix multiply can yield 10x speedups. 16x speedup from cache increases alone is absolutely possible.

also
>But would Code 1 likely only be done in cache
100%, the memory prefetcher is constantly guessing at what you want next so streaming 1000 values in doesn't confuse it.
>the use of malloc() would allocate space in the RAM which is quite slower on the Pi?
While slower, malloc() ALWAYS puts shit in RAM. You can't allocate into cache.
Making that call may or may not make things significantly slower, it's more about the time it takes to draw things out of ram than it is to make the actual allocation (then again, you're testing a $30 piece of shit, they probably skimped real hard on the memory controller)

There's also the huge difference in instruction sets and compilation optimizations. ARM is relatively new and uses a RISC-style instruction set, which means its instruction cache is exhausted much more rapidly and things like GCC aren't as competent at applying optimizations. You're just generally going to get much slower performance no matter what.

They probably gave up as soon as they realized C isn't expressible as a context free grammar, and thus a gigantic pain in the dick to JIT

A) It's only case-sensitive within a scope
B) What is your question, exactly? That looks like it does what you'd expect.

duck typing is a stupid and irrelevant concept, don't bring it up, it'll just confuse him.

Still seems to be printing 0.0, which I can only assume is because it's just using the default value. It is simply not using my arg constructor despite the getter and setter being as you've posted.

Is there something missing with this?
Account(int id, double balance) {
balance = Math.random() * 5000;
}

You're assigning the value to the input parameter, not the member variable.

can you put the whole thing on pastehub?
missing this. before balance

You're setting the copied value balance to some random value.
You need to set the objects balance value to something, not the parameter.
this.balance = Math.random() * sizeOf(my_butthole)

Overhead I guess. But as long your software doesnt have issues performance nor latency go ahead user

>pastehub
pastebin*

>implying the size of your butthole could fit in a 64bit size_t

oh, it can't. It's a 512bit AVX op

pastebin.com/c3a5SQm8

The value's specifically meant to be between 0 and 5000.

this.balance = Math.random() * sizeOf(my_dick) * 5000

>preferred skills
>Linux

What does this mean for a junior front end job

means you have austism

Means superior taste in operating system.

bash isn't scary
you don't cd.. cd.. cd.. code
package management is fine
in other words: You can run a linux box without crying poo poo pants every 3 seconds

>you don't cd.. cd.. cd.. code
Uh... of course not.

Attached: 1557186676502.gif (650x890, 149K)

now I vim $(find .. -name "code.js")

you don't seem to understand scopes. you should read up on that a bit. basically, braces define a scope. variables are only available within the scope they were defined in and any scopes inside that scope.
im retarded and cant explain it well so just read up on it to get a better understanding.

Is something involving the scope interfering with acquiring the balance value?

how many queries can a terminal history save?

not exactly, but i can see you don't understand scopes(or you didn't finish the withdraw+deposit methods). in your constructor, you have
Account(int id, double balance) {
double balance = Math.random() * 5000;
}

should be
Account(int id, double balance) {
this.balance = Math.random() * 5000;
}

as you're trying to set the balance field, not create a new variable in the constructor.

ah, so the person in question doesn't have anything to do with the class name, I get it now. I actually considered that but for some I thought that wouldn't be the case. thanks frens

Ah, that was an error. Before I pasted the code, I was trying with a totally new variable and forgot to remove the double. I haven't even begun to implement deposit and withdraw yet, as I'm working on getting the balance done first.

Appreciate your trying to help me though.

I bet you wear your seatbelt when you drive a car, and you don't even speed

yes. You create an object of Type Person, it has nothing to do with what you name that object.

>objectifying people
OOP has gone too far

>System.Random not in standard library
>have to use a separate package manager to even install it
>"lol we're deprecating this command syntax, use this new one"
>use the new syntax
>"user error"

Fuck you, Haskell

>I bet you wear your seatbelt when you drive a car,
Damn straight, the seatbelt has kept me from eating the windshield in a past crash.
>and you don't even speed
Oh I speed, but where I live 30 over is a felony, so I try to keep it 25 over at most.