/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

beej.us/guide/bgipc/output/html/singlepage/bgipc.html
stackoverflow.com/insights/survey/2017/#developer-profile
imgur.com/a/AO1e0'
hackaday.com/2016/09/13/microlisp-lisp-for-the-avr/
api.imgur.com/endpoints
twitter.com/SFWRedditImages

nth for what are you working on Sup Forums

nth - 1 for Lisp is the most powerful programming language.

Programming colony.

I'm doing C# stuff but I think g will laugh at me for it

were right here lad

show me what you're working on user!

When is it ever required to have three levels of pointer in any software writte. in C?

Whenever you need a pointer to a pointer to a pointer.

Three star programming is the bedrock of C.

Three dimensions data structure
But that's a stretch

taking a clients existing infrastructure and refactoring it for docker in AWS. We're using saltstack for config management and I'm still researching the best way to implement a discovery layer in ECS. Eventually I think the application itself is a suite of financial analyst tools.

What are essential datatypes?

you can easily have 5 or 6 levels deep in C++ OOP
pointer to an object which has an array of pointers that point to other objects that have their own pointers to things, etc

How much of an issue is email spam via SMTP these days? Surely not anywhere near as bad as the 90s, right?

what does OOP have to do with this

because it's easy with OOP to have the situation I just described

I'm making a ping pong game out of 3 programs that send signals to each other.
2 programs, ping.c and pong.c, send each other signals SIGUSR1 and SIGUSR2, and a different program pingpong.c will receive a second SIGUSR1&2 to create the "ping!" and "pong!" sound, think of this program as a pingpong table. My problem is finding the pid of the three programs so the signals can be properly be sent to each other.

OOP doesn't seem to have anything to do with this

every IP range that has sent out spam email now appears on a blacklist
the big email companies filter out emails coming from those IPs

every provider that has IPs not on the blacklist make damn sure that you don't spam with their IPs
so yeah, it's not as big an issue as it once was

I used to work for an email filter company. it's still the same bullshit it's always been in great quantities. It just gets ignored more heavily.

You ppl never attended college did you?
Instead of giving straight example you are all bragging about it.

it does, because you have to go through 5 objects to get to the data you want

you could be doing that with just structs

Read /proc, parse the information and look for the name of your second process.

sure, but C programmers don't use the design patterns that appear in the OOP paradigm that results in such scenarios so often

Linked lists :)

Makes sense why the IT company for the place I work at said no to my boss for this project, then. I work for a small finance company and had to send out a bunch of emails to business associates with attachments, so I figured it would be fine since it was controlled. Guess not, though, didn't know how deep the email filtering game went.

why is C so f*cking comfy lads? Q_Q

I was considering some sort of pipe that sends the pid of the processes to the other two programs, but I worry it will get too complex.

seems like the whole point of doing something like that would be interprocess communication so pipes seem like a natural thing to use..

rolling

rolling ? ? ??

too easy

3D array of char (which would be a 2D array of strings).

cancerous swine

this is a useful post

> He uses for loops instead of tail recursion

if you want some shady options, what you can do is take a chapter from a book, and put it in the html of the email in a way that doesn't make it readily visible to the reader. this will help defeat/poison bayesian text filters they might have. If you go through the time to create proper DNS records for all your stuff (SPF, TXT, DKIM, etc) then your emails will be 'weighted' less likely to just be spam--even if they are marketing. If you wanna do it successfully and legit just look up the laws and standards for 'politely' sending email.

>his hardware doesn't support tail recursion

To preface, this is one of those awful posts where someone (you) says "I'm doing something like this, how do I solve X problem" and someone else (me), instead of solving problem X, says "have you tried doing this other thing instead?". So:

Why are you using signals for inter-process communication in this case? It seems like sockets would be a better fit.

Here is an incredibly useful document for the (more general) problem you are trying to solve:
beej.us/guide/bgipc/output/html/singlepage/bgipc.html

Not that guy, but I was doing some research and wanted to collect process data using taskstats structs, and my god getting that netlink socket to work correctly was a pain in the ass. Maybe it was due to how little I use IPC in general, but correctly filling out headers, subheaders, data, ect was a headache.

Writing a thread spammer in elixir that creates copies of an image with a pixel changed to bypass duplicate filter

Will test it on /dpt/ soon

roll!!!

pls no

what about captcha?

i've been getting interested in AI but I never coded anything and never saw examples, how would a small miner AI would work for example? a miner knows he has to pick rocks, gives priorities to each kind of rock and then transport them to a location?

>he is a special snowflake

stackoverflow.com/insights/survey/2017/#developer-profile

and captcha?

Sup Forums pass

Is there one with just number crunching? I fucking hate designing GUIs

>2017
>using an unsound language

I'll report you so you get you pass taken and lose however much they cost :^)

niqqas i just got a budget of 2000$ from work to spend on a laptop i'll be using.
any recs?

why do you think I didn't put it on yet?
catch up :^)

@59719584
@59719645
>:^)

That's true. I'll look up piping
It's an assignment, and I think it would be a nice test to see how I can programmatically set up two processes to handle interactions between each other.

How do I convert
unsigned long long
to char array in C?

Lisp Machine

Read up on fsm and pathfinding, this should be enough for this.

>Turing complete garbage
No.

Unions.

use union with a char pointer

i maed a script to download imgur albums
$ curl -s 'imgur.com/a/AO1e0' | egrep -o '"hash":"[^\"]*","title":"","[a-z]*":null,"width":[0-9]*,"height":[0-9]*,"size":[0-9]*,"ext":"[^\"]*' | sed 's/^.*sh...\([^\"]*\)\".*ext...\(.*\)$/https:\/\/i.imgur.com\/\1\2/g' | xargs -n 1 -P 16 wget -q -nc

lisp machine you say?

hackaday.com/2016/09/13/microlisp-lisp-for-the-avr/

never really used unions, but I guess that's the point where I should try it.

...

?
:3

>hackaday.com/2016/09/13/microlisp-lisp-for-the-avr/
fuck i'm trying this. TY M8

Union with char ARRAY, not pointer.

a cute!

it's a good script it just makes me sad.

api.imgur.com/endpoints

use API's they are there for you, they let you do things like be polite with your requests.

actually pointer will work just as good, even give him the ability to use array indices (*p[0] and so forward), you should read more on how C handles memory

If you deference a pointer in a union with an integer type, you are not grabbing the nth byte of the integer. You are adding n to the integer and dereferencing it, no matter what garbage it points to.

actually famalam the square brackets dereference the pointer so *p[0] would not give you the first element in the array, but whatever is in the memory address of p[0]

yeah looks like I was wrong, carry on

Did they really expect you to calculate your own hex bitmasks by hand before GCC added binary literals?

Do you have any problems with hexbin conversion?

What (good) language should I learn?

>Why do people not like Pascal?
Because they learned it in school and they hate being reminded of school

what is your use case? I wouldn't recommend R to somebody building infrastructure.

not rust

am i supposed to convert to dec and then to hex?

C

I just want to learn something interesting.

Considering that binary -> hex is a trivial operation, and is more readable... yes.

No. Convert straight from bin to hex and vice versa. Every 4 bits maps perfectly to one hex character.

>not being able to reasonably calculate a value in hex in your head

KYS. Here's each bit in a hex mask:

1, 2, 4, 8, 10, 20, 40, 80

Is there a free realtime-ish stock trading API available?

a lot of people here are saying C which is fine (I started with C in highschool) but if it's your first time getting into programming languages in general I'd recommend Python. It's probably the lowest barrier to entry that you can actually do useful things with in a production setting. rapid dev, lots of stable libs, lots of good docs and examples and such.

Got a question, any interested in helping?

Javascript if you want a job

Why would they hand out that information for free?
All the free ones are delayed 20 minutes on purpose.

Still working on my imageboard:
4kev.org
Send banners!

Yahoo has a finance API which changes from minute to minute I think

maybe in India

Lua

(You)
C# .Net

A 20 minute delay is acceptable.
I'll look into that, thanks.

He said a good language.