/dpt/ - Daily Programming Thread

Old thread: What are you working on, Jow Forums?

Attached: 1537603076722.png (640x800, 378K)

Other urls found in this thread:

web.archive.org/web/20120122082554/http://weblogs.java.net/blog/kgh/archive/2004/10/multithreaded_t.html
x64dbg.com/#start
twitter.com/NSFWRedditImage

first for the Haskell programming language

Attached: whereyunobelongs.png (500x500, 110K)

A hentai neural network tagger. So far disappointing. Can't distinguish between snuff and mind break.

I've been interested in machine learning for a while. Any good place to start?

Attached: Software Dev.jpg (1440x1620, 210K)

Making a vuetify front end for a asp.net core back end, trying to see how much of asp I can use, so far I can't get forms to play nice, which would mean I basically can't use anything from asp.

Also im still debating if I should go with a multi page site, or a single page site. Multi page played better with the asp I have, but if I can't get forms to work with asp validation and authentication, I might as well just ignore it and go full vue with the asp back end a pure web api.

learning django to create an API for an interpals style site. Maybe I'll write an app too. Should give me something to do for a few months.

If I want to get experience so I can work for a BigCorp should i replace python backend with something java?

We should really take this to /wdg/ but a 100% js front end is a lot nicer, but a lot more work.

But wdg is shit.

You should develop your own business plan and do whatever it takes to achieve it.

find a book that does it in your favorite language

Hey, total noob here
I wanted to know if there were some ides i could use on a tablet(android), do they exist?

There are sites where you can run small scripts in a bunch of languages, python and c# has some. I don't think you get anything close to an ide though.

Looking for something that supports java and c++, i'll see if i find anything like you said, thanks

hibernate is awful, is there a good alternative?

static void
debugprint(const wchar_t *fmt, ...)
{
#ifdef _DEBUG
va_list ap1, ap2;
va_start(ap1, fmt);
va_copy(ap2, ap1);

int num = _vsnwprintf(NULL, 0, fmt, ap1);
auto buf = (wchar_t *)_alloca((num + 1) * sizeof(wchar_t));
_vsnwprintf(buf, num + 1, fmt, ap2);
OutputDebugStringW(buf);

va_end(ap1);
va_end(ap2);
#endif
}

is there a win32 function that already does this?

use a library

Attached: 1463930928711.jpg (807x659, 42K)

lol no

Bugfixes so the software I help develop at work runs stable instead of crashing or freezing all the fucking time. Meanwhile, customers are all up in my shit bitching about features not having been added that marketing shilled to them with no regard for developer capacities.

>function name on newline
>ifdef inside a function
eww

Which is better, C or C++?

It depends.

C++, after all it is the greatest language

c++ will be a shitlang until it gets native purity and totality enforcement

its not multi platform so macro conditional hygiene isnt that big of a deal

also bsd knf r0xx my s0xx

sorry pls explain why c++ has no purity and totality seems to be a concept that would be completely retarded in a language like c++

you can get a pure function in C++ with GNU shit
[[gnu::pure]]
And how can objective performance improvements and making sure your program can properly terminate not be vital in any language?

autism

if my program terminates or not is determined by my programming and the hardware it runs on and not some made up restrictions that shut my algorithm down when it feels like it
if I want a gazillion stacks I get a gazillion stacks, not for any compiler to decide

What is it about sepples that gives its users terminal brain damage?

if it was terminal we wouldn't be talking you dunce

the virgin Cperg

the chad++

>Cperg
/dpt/ - reading comprehension

a GUI-de-multithreader for Haiku.

BeOS was written in the 90s when everybody thought multithreading was the shit, would be a great idea for a GUI, etc. actually it's a stupid fucking idea and there's a reason every other GUI in the world eventually settled on single-threaded.

it's kind of simple in retrospect but it took a lot of experimentation to finally get right, because I haven't written any explicitly threaded code in like 20 years. and thank goodness for that.

I get a problem opening a python file in Jupiter notebook on another computer than my original computer, the code works on my original pc but with my other computer I get the error 'numpy.float64' object is not iterable. But I don't get this error at all on my other pc.

Could anyone help?

i dont care about whatever gay no-uptake research language you worship

Check your Python version and numpy version first. Perhaps iterable floats are something that was added in a version newer or removed in a version older than the one you have?

I thought the whole thing was a great idea. Nice message queue implementation too. I always find it frustrating when a lot of other gui toolkits seem to throw hissy fits when you try and update things from other threads.

Might be easier to work with using C++17 and beyond features though.

>>function name on newline
that's a good style you don't know what the fuck you're talking about

Nah

it's a terrible style and it ignores how C syntax actually works, for the same reason that int* ptr is terrible style

declare a function that returns a function pointer and see what happens

C++. Even C compilers are written in it. C is deprecated.

i personally find it lot easier to read at glance even though the original motivation was making jumping to functions w/ regex easier. also function return value declarations can get super lengthy esp if ur using compiler extensions.

the c syntax isnt _that_ great and above all

wrt func ptr just use a typedef unless you want to show off ur big e dick

Hello all. I currently have a part time job working in VBA for access, excel etc while studying a comp sci degree. How would I best market this experience to get another job?

no this is the exception because we want to keep lines short when writing static int everywhere

I agree, C syntax has problems. But it's better to roll with it than pretend it works a different way.

fucken folk evangelizing baggage from BCPL

guess i just weight my subjective sense of readability over meta syntatic purity (which i honest totally get)

Been creating a Windows kernel driver to do some packet inspection. Networking stuff is complex.

Attached: 110319-1232.png (2554x966, 209K)

I just don't even see what problem it's supposed to solve. why would I need *windows* to act and behave independently, sending messages back and forth? a gui thread and a worker thread? OK, that makes sense. but what exactly is the benefit of per-window threads that are desynchronized by default? that alone doesn't confer any great user experience, in fact probably the opposite because now the very human programmer is saddled with trying to coordinate all the UI threads (which we know humans are terrible at) to avoid races and deadlocks.

I suspect there's a reason all the native BeOS/Haiku apps are incredibly simplistic, and everything really useful is a port with a non-native GUI (Qt, etc).

I don't think this assessment has been improved:
web.archive.org/web/20120122082554/http://weblogs.java.net/blog/kgh/archive/2004/10/multithreaded_t.html

It's not terrible style. A lot of projects that enforce strict 80 char limits often use it, so you don't have annoying shit like
static const struct my_long_struct_name *a_very_long_function_name(int no_space_for_arguments,
int continutations_are_all_the_way_over_here);
and can be more cleanly written like
static const struct my_long_struct_name *
a_very_long_function_name(int lots_of_space_for_arguments,
int continutations_are_sensible);

>C is deprecated.
unfortunately its replacement is terrible

If your declarations are too long that they're breaking an 80 character limit then your problem is that your declarations are too complex, but that your style is bad.

I get your point, friend
but why would you not just use shorter names

imagine worshiping an arbitrary number that just goes back to hardware limitations.
It's amusing how irrational programmers can be.

idk id rather have a longer explicit declarations over the "simplified" macro hell

large projects often require very specific symbol names and ten kinds of platform specific fidgetry

You typically want to be very descriptive with global names, or more generally, the larger the scope, the more descriptive your identifiers should be.
You also have "normal" shit like the static const which will eat into your 80 chars quite a bit. It's even worse if you have some attribute shit like __attribute__((visibility(("default"))) (even if behind a macro).

C++ does not have any of these problems btw

yea im getting into windows c"++" rn and its p sweet desu

I'm gonna learn JAVA, right now I know R matlab and python

good luck!! hope you succeed

Attached: 1552161703192.jpg (1000x800, 61K)

I always heard of how bad Linux Mint was with proprietary stuff, but I thought it was just an overreaction
But holy shit, even as a windowsfag it feels like a chinese android phone

Is there something that's equally as easy to install, but is actually free?

stupid frogposter

Attached: 1551962531717.png (583x482, 119K)

openSUSE tumbleweed
or pick literally any arch wrapper distro
or stop being a faggot and just install vanilla arch and never worry about distrohopping again

get over yourself and install fedora

Mint is fine, don't install the proprietary software if you don't want them.

Attached: fedora.jpg (480x600, 22K)

ibm red hate sconix

trying to program a legally binding will to trigger when I finally end it all.

Update: still getting NTRed

Attached: IMPORTANT_IMAGE.png (530x533, 455K)

What are the advantages of using Vue in addition to an ASP.NET Core backend?

>VBA
Learn a real language

This is a bit aggressive, but it's not bad advice. You'll have trouble getting a job with just VBA. C#, at the very least, should be an easy transition for you. (Warning: you may also get memed regarding C#)

>NTR
filtered

Any ASM wizards here?
With this Cheat Table that I have for a game I am playing, you can see the last 5 bullets that your character shot. I wanted to upgrade that to 20. Now, I only know the basics of programming in any language, but I saw a clear pattern, so I followed it and increased the addresses along with the entries in the script. At 20 entries, I was getting nothing in regards to the bullets I was shooting and if I did fire after I activated this script, my game would crash.
So, I started adding entries to the script on by one and got up to 8 bullets. I was convinced I did something wrong, so I went up to 20 without testing. Sure enough, when I activated the script, the same thing happened.
After this, I started removing entries one by one. I got down to 12 entries and the table seemed to be functioning like normal. Well, almost. For whatever reason, Bullet 1 and Bullet 12 are the same. I would really like to be able to see the last 20 bullets shot by my character.
Any ideas?
>pic related

Attached: lastbullet20.png (1885x679, 98K)

Here is the code that I wrote going all the way up to 20 bullets. In the version that goes to 12 but duplicates 1 on 12, I stopped at
>mov [newmem+158],rax
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
aobscanmodule(LastBullet20, game.exe, 8B 38 48 8B CE E8 ?? ?? ?? ?? 84)
registersymbol(LastBullet20)
alloc(newmem, 512, LastBullet20)
label(return)
label(jumphere)
label(lastfired)

newmem:
cmp [newmem+100],rax
je jumphere
push rax
mov rax,[newmem+190]
mov [newmem+198],rax
mov rax,[newmem+188]
mov [newmem+190],rax
mov rax,[newmem+180]
mov [newmem+188],rax
mov rax,[newmem+178]
mov [newmem+180],rax
mov rax,[newmem+170]
mov [newmem+178],rax
mov rax,[newmem+168]
mov [newmem+170],rax
mov rax,[newmem+160]
mov [newmem+168],rax
mov rax,[newmem+158]
mov [newmem+160],rax
mov rax,[newmem+150]
mov [newmem+158],rax
mov rax,[newmem+148]
mov [newmem+150],rax
mov rax,[newmem+140]
mov [newmem+148],rax
mov rax,[newmem+138]
mov [newmem+140],rax
mov rax,[newmem+130]
mov [newmem+138],rax
mov rax,[newmem+128]
mov [newmem+130],rax
mov rax,[newmem+120]
mov [newmem+128],rax
mov rax,[newmem+118]
mov [newmem+120],rax
mov rax,[newmem+110]
mov [newmem+118],rax
mov rax,[newmem+108]
mov [newmem+110],rax
mov rax,[newmem+100]
mov [newmem+108],rax
pop rax
mov [newmem+100],rax
jumphere:
mov edi,[rax]
mov rcx,rsi
jmp return

LastBullet20:
jmp newmem
return:

registersymbol(lastfired)

newmem+100:
lastfired:

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
LastBullet20:
mov edi,[rax]
mov rcx,rsi

dealloc(newmem)
unregistersymbol(LastBullet20)
unregistersymbol(lastfired)

In the original script that I added to, it stopped at
>mov rax,[newmem+118]
Or rather started at? I'm not sure how to phrase it.

The game might simply not be storing that many entries. I'd recommend you try to decompile the game and check the source code to see what it's actually storing.

if I google "C split string" , is this cheating?

should I do it myself?

how do the pros do it?

it's either impossible or much easier than you think
you have to look upstream at what's setting the addresses and subsequently at what's firing those memset

The pros copy-paste from StackOverflow. You should know how to do this, though.

I was going to use IDA but I think I need a paid version of that to work with 64-bit programs. So, I haven't tried any sort of decompiling yet. Is there any free decompiler that you would recommend?

what happens if stackoverflow is down?

do they just stop working in the office?

bruh, just google "free 64 bit disassembler"

ida pro
>but i think i need a paid version
who says you need to pay for it?

x64dbg.com/#start

It's the thinking man's fetish

>disassemble the disassembler

Lol. Welcome to the industry, kid.

>what happens if stackoverflow is down?
They are pretending C++ is compiling

I mean I have to do

int main ()
{
char str[] ="- This, a sample string.";
char * pch;
printf ("Splitting string \"%s\" into tokens:\n",str);
pch = strtok (str," ,.-");
while (pch != NULL)
{
printf ("%s\n",pch);
pch = strtok (NULL, " ,.-");
}
return 0;
}


instead of

"This, a sample string".split()

Or you can move that into a function and then just call split("This, a sample string")?

>realize I have like 10 versions of python installed
>uninstall all the older versions
>none of my scripts targeting 3.7.2 will run anymore

Attached: 1538925209978.png (461x660, 62K)

As someone with zero experience programming in any meaningful way (I took a single course in college as a mandatory pre-req for my Network Admin degree) is C++ a good language to start with?

C++ is fine to start with. That's the language used in my college's intro to programming.

Javascript better at the beginning

C++ is relatively difficult to learn, and not really for any good reason. If you're taking a course on C++ it'll be fine but you'll have an easier time learning C, Java or Python without missing out on much.

What/who are you talking about