/dpt/ - Daily Programming Thread

old thread: What are you working on, Sup Forums?

Other urls found in this thread:

cnc-club.ru/forum/download/file.php?id=10096
pastebin.com/EB0tjceK
bell-labs.com/usr/dmr/www/btut.html
darlinghq.org/
twitter.com/NSFWRedditVideo

Wondering if SMT is enough for most useful static verification or if I have to go full Curry-Howard. The former would greatly simplify, well, everything.

Fuck off

@56312907
Never fucking reply to me again unless you are contributing to the thread.

Take your bait with you and kill yourself.

You don't @ someone on Sup Forums newfag

#56312929
>bait
I was being serious.

$56312935
>what is (You) denial

sixth for kabbalistic imagery

I'm not going to contribute to this thread because you didn't post an anime picture. Hope you'll learn your lesson next time.

56312935
Does this work?

>I was being serious.
I know FP bait when I see it, especially when it fucked the last thread over.

Ritchie is anime tho, bwaaka.

haskell is betteer

There's a benefit from working at an office. Not many distractions, and Im slowly starting to value the work productive mindset.

%56312963
That was a Haskell fanboy issue.

This.

> haskell and lisp
> not PROgramming in LOGic

I've dropped SICP, seems like it will take too much effort to go through it and learn Scheme. Also the fucking tools sucks so much, I don't wanna learn an editor like Edwin, I just wanted to program in Lisp and compile/interpret that shit in the CLI.
Maybe I'll give it a try once I have a job.

+56312935
}being this dumb

>baww but it wasn't me
No one cares, fuck off you troll.

Who are you quoting?

fig sameton

>that sigil
c-can i summon a qt trap succubus bf with prolog?

shart in mart

janitor pls

Thank you for nor posting anime

I`m trying to implement a feed rate modulation algorithm in my CNC machine controller project, I just can`t get my head around how interpolation periods work? The paper says that T is "the interpolation period" (in seconds?), n1 is one less than the number of interpolation periods of the accelerated acceleration region and n2 denotes the number of interpolation periods of the constant acceleration region. When I calculate the displacement of acceleration process and deceleration process, what is T? Do I add up the total time of all interpolation periods in the acceleration region? Or do I recalculate for every individual interpolation period and let T = duration of that period? I`m confused...

Link to algorithm paper:
cnc-club.ru/forum/download/file.php?id=10096

*gf

this is too advanced for this thread, user

try

Wrote a floating point comparison function and then decided to update everything instead of continuing to work on my project

i secretly feel like killing myself when i get stuck on problems

I've got an idea for a project.... a B compiler. B, the language Ken Thompson made just before he made C. It only had one type, and was just a shittier language overall. So B's pretty much a dead language except in a few small places. But it'd be cool to make a compiler for it anyways with Flex, Yacc, and LLVM.

/wdg/ is ded thread

Anyone here using Angular2?

for what?

what can you do with it?

>what can you do with it?
Pretend to be a real programmer.

Angular2 (AngularJS's successor) is a single page application framework, i'm looking for people that have used it for a bit now to see where they get the majority of their information.

Its pretty fast, one of the more popular web frameworks (React, Knockout, Ember, if you're familiar). Allows you to have two way binding between your data (so any change in a text box changes your model in the back view model) - a ton of features.

It is in RC5 now so a lot of the resources available for it is stretched thin and out of date.

>When I calculate the displacement of acceleration process and deceleration process, what is T?

T would be the time spent in a period of constant velocity. E.g. When the feedrate is constant.

T_4 appears to be what you want if I'm understanding your question correctly.

>Do I add up the total time of all interpolation periods in the acceleration region?

Pretty sure you don't add the total of all interpolation periods if you only want the constant velocity portion.

> Or do I recalculate for every individual interpolation period and let T = duration of that period

Isn't there only one interpolation period for the total amount of time of constant velocity (feedrate).

n2 (should) == 1 during the T_4 period.

Roses are red,

Violets are blue,

I’d give up my wifi,

To spend time with you

good fucking riddance

kys

I'm just getting into using JSON for my personal webpage in lieu of a CMS (moving towards the MEAN stack). The developer I work with wants to use JSON for everything and I can't wait to set that up.

How long do the you think a person with 0 programming experience or understanding could learn and get a job? Any language and any type of development. In genuinely curious.

Read a couple books, build a few projects, contribute to some real projects.

6-9 months

Depends on your capabilities and the field you're aiming, giving a specific time it's nonsense.

...

You're over thinking this. Just assume it's an average person with average intelligence. The field doesn't matter to a certain extent. It could be web, game, embedded systems, mobile.

>The field doesn't matter to a certain exten
Of course it does, just think about the things you'll need to learn if you wanna be a game developer, and then think about the things a webdev should learn.

Unity is easy

All that means is it will take longer. Doesn't mean it can't be done though. Obviously embedded system programming is much harder than web development.

I`m talking about T_2 (constant acceleration), but yeah in this case n2 == 1.

In the Lth(V1, V2, Nm) function used to calculate acceleration process displacement and in equations 1 && 2 (pic related), which interpolation period do I use for T? That`s what I`m confused about...

Aaaaaanndd... nevermind my idea about making a B compiler. From what I can find out about the language, a lot of how things like strings and "characters" were arranged in memory seemed to revolve around the fact that it was intended to be run on a 36-bit machine. Adapting it to 32 bits or 64 bits might be a bit awkward if one wanted to make it properly conform to the language spec... well, if you could even say there was a language spec. At best I have a couple of references.

I heard that Go is a better version of Ruby, so I'm learning that while making a Web applications to track weight lifting progress.

Is Go just a meme language?

Go has a lot more in common with C than it does with Ruby. It is almost nothing like Ruby.

Go is pretty much the best language for anything that uses concurrency/async (web apps).

Some faggot will try to say Erlang is better but that person is probably unemployed.

There is always BCPL, which influenced B.

>Go is a better version of Ruby
Not Ruby specifically, but is pretty much the best language for writing servers and related tooling.

Just emulate 36-bit desu

I have a Python script that downloads purchased ebooks from a list. If the account doesn't have an ebook, it just moves onto the next one.

How can I write the failed download attempts to a log? I don't know how to have the script recognize that an account doesn't have a book on it. Does it have to do with requests.text?

Here's the relevant part.

pastebin.com/EB0tjceK

use this lambda function:

for i in range(40):
functionlist.append(lambda i=i: function(i))

then call functionlist at your position and supply your function with an input
if I understand you correctly

in this way you can call functions from array pointers like functionlist[6] will execute function(6) which I've found can be very useful for GUIs that don't allow you to supply positional arguments

if you're just asking for how to define a set of points then just put them in an array with a 'for' loop

if it throws an error that has your specific code then write that to console. If it doesn't return any values in whatever array say if len(object) == 0 throw an error to console

saw one on github sort of recently actually, I think I might've even starred it so I'll see if I can find it

tips for starting to figure out a FOSS project so you can contribute to/fork it?

I'm looking at a program written in c++, it's not crazily large or complex but still sizeable, I've never tried looking a such a project written by others before, how the fuck do I start chipping away and learning how it works?

I tried looking at what doxygen generated but it's pretty sparse and shitty and I'm not super familiar with that either.

I think I'll go desconstructing the program, that meaning seeing the program's flow and commenting each function to remember what actually does, then keep this branch with commented code aside the one you're actually contributing.

I usually start at main() and follow the call stack to see how data changes through the program.

...

Excellent JPEG compression you've got there.

That's gross, user.

Just use 64 bit values and have 28 padding bits.

only 90s kids will understand

Jesus, I just read the B tutorial on bell-labs.com/usr/dmr/www/btut.html
You can definitely see the "C-ness" in it, but there is some really weird shit in there.
>typeless
>36-bits
>x =-10 vs x = -10
>putchar('hi!*n')
>printf to -1 executes command
>ASCII EOT (0x4) as end of string

Oh, and don't forget that "characters" are 36-bit words that are "zero padded and right justified". The string "Hi" could also be a character with bits 0x000004869. But most computers these days are little endian, so the same integer representing that would be 0x694800000. So the putchar() function on a modern Intel or ARM machine would have to store and print the string backwards for consistency.

>wanted to post something stupid
>hesitated before clicking post
>gave it a second thought
>deleted it
People like me should be worshiped here.

Alright buh-bye. Don't come back any time soon, pedophile

Threadly reminder that haskell is unsuitable for actual software development

I've been writing software since 1990 and I cannot think of a single project that's interesting anymore. I don't give a shit... what do? Any projects out there that would really benefit society if they had another hand working on them?

>embedded
I wonder how many people fucking around with arduinos and rpis got a job out of that.

work on GNU Hurd

Make the next big language

Work on AI

Start a business

This looks interesting.
darlinghq.org/

It's bait, dummy.

This, but those would have be really intense, insanely exhausting months in which user would have to work as hard as he probably had never worked in his life.
Moreover he would need to know what he's actually doing, which is an impossible requirement for someone with 0 experience. So user would either have to pay for some sort of a school or boot camp or spend two, three times as much time on self-didactic.

Bluetooth keyboard for AR

>web dev
>real programming

pick one

Can I be a programmer if I'm female?

Write a web crawler that analyzes posts on image boards like Sup Forums for certain words or symptoms characteristic for people on spectrum of autism, that automatically offers them help and contact information for the nearest specialist.

How can C++ be regarded as fast when it does so much copying? Its standard library is absolutely full of it, especially the collections.

So I've been trying to learn networking for the past couple weeks. I've gone through Beej's guide 4 or 5 times now but I just keep on not really learning much from it - I need some sort of an interesting project to keep my interest up.

So I thought of writing a simple MUD server or something of the like, but have no idea what the architecture of a typical "game" server looks like. Any pointers to where I could start reading about that sort of stuff?

You don't need to use it. Take game programmers for example, to whom its all about performance - they usually avoid the standard library like the plague. The STL is not the language.

There are other features to the language that can have implications for performance, like constructors, but you can play around them.

What does this have to do with anything though

No you would just be a meme

C literally came from the worst of the worst

Nice rhapsody bro.

But I cringed
> region inside of a method
> that much code in a catch block
> mutating the object in a catch block
> ex is declared but never used

1. Pick a random classic profession
2. Create an IoT for it
3. ???

I think your approach is the problem itsefl

Using the STL, you need to copy exactly twice - once pulling the data from file/wire/whatever and once again for putting it back out to wherever its destined. Everything else you should be using rvalues, references, or smart pointers. Combine that with compiler optimizations on templatization and you can often turn a huge swath of indirection and abstraction into a single machine instruction.

i forgot this short lived meme and i really liked it

I'm trying out envelop budgeting so on payday I go to the bank, draw my cash and budget it in to categories e.g rent $300, groceries $200, etc. It is more helpful to have smaller bill notes in some categories because I can be more precise when taking out money that I need.

So, I wrote a small console app that will brake the category in to bill note sizes and calculate total of each bill note for every category.

It reads from a config file and I can place max bill note size for categories etc.

Took me a day to do this, and this is my first project that is not some tutorial assignment from some site.

Care to explain?

Making a distress dongle for prostitutes mite b cool

What language, user?

C# with .NET