/dpt/ - Daily Programming Thread

Old thread: What are you working on Sup Forums?

Other urls found in this thread:

youtube.com/watch?v=6zXDo4dL7SU
docs.hylang.org/en/latest/
twitter.com/NSFWRedditVideo

D

I

Thank you for using an anime image

Thank you for using anime images

Does dressing like an Anime girl improve my programming skills?

No. You must dress like an anime boy dressing like an anime girl.

>>Sup Forums

...

Should I watch the Evangelion remake?

not if you like good movies. otherwise go ahead

...

This should do it.

Thank you for using a submissive cat-girl anime image.

It does weird things to my penises.

Fucking go back to /o/ already goddamn

YOU GO BACK TO /O/ AND STAY THERE!

*unsheathes katana*

How can I write code quickly if I'm a snek?

explain yourself
reptilians aren't allowed on this board

I want to learn a language other than Python...

Invest in a snek-friendly keyboard

youtube.com/watch?v=6zXDo4dL7SU

You can always learn ASP.

I laughed and now I need to realign my jaw you funny fucker

i think the damage might be permanent.

Hey are you here, emacs q4 browser guy?

I tried out the new reply browser, and it works well for me.

One thing - would it be possible to force SSL for all connections?
I did a search and replace in q4.el, changing all instances of "" to "", and all browsing seemed to work fine.

Also, do you have any plans to support making posts? Emacs 25 has a thing called "xwidgets", which allows you to embed a full webkit browser into emacs, so there might be a way to embed the captcha into a buffer.

anyone have a good list of projects to do? Or the roulette image?

make a HolyC interpreter or compiler

be creative you worthless hmong

...

I working on Project Euler. Commenting all my code properly and drawing out a draft of my solution on paper is harder than I thought it would be.

rolling

Don't you mean ASP.NET Core?

hi

>"" to "", and all browsing seemed to work fine

Ooooh, thats neat. I should have been doing that anyways. I'll give it a shot and push it with the next change if it doesn't fuck stuff up.

>do you have any plans to support making posts?

I fiddled a little bit with the captcha widget in a local HTML file...I'm not very good with javascript but when I got all the right components and the auth key in the new file, the widget would complain that this domain was not authorized.

I find the U-key thing to work really well for me and since the captcha requires the mouse anyway, it seems like it wouldn't be of much use to bring it into emacs. I'm not opposed to sticking it in emacs itself, i don't know if its really worth the trouble though.

>Emacs 25 has a thing called "xwidgets"

I'm aware, but the emacs builds I've tried didn't have it compiled in =/

no

Parametricity for induction. The eta rule is the missing link.
Eq : [A] A => A => U
Eq a a' = [F] F a => F a'

refl : [a] Eq a a
refl b = b


Bool : U
Bool = [A] A => A => A

false : Bool
false h _ = h

true : Bool
true _ h = h

ind' : [F] F false => F true => (x : Bool) => F (x false true)
ind' h-false h-true x @ i = x (h-false @ i) (h-true @ i)

eta : (x : Bool) => Eq (x false true) x

ind : [F] F false => F true => (x : Bool) => F x
ind h-false h-true x = eta x (ind' h-false h-true x)

just made minutes to hour converter

we're all gonna make it lads

print . (/ 60.0) =

it's in c

Good to see you again Mr. iDontGetIt.

git commit dptsmom.code "fucked her"
git push origin master

I wrote a script that scans a certain streaming site for new users and then records them for a few hours.

If they get banned it saves the video.

You can guess what its for.

I'm writing the code for a smart urine sample cup that automatically detects diseases and pregnancy

It's called the iCup

very vicarious of you

You fucked OSGTP?

>iCup
Could you spell that for us?

have any videos you'd like to share?

Mostly teen girls doing stupid shit like changing their shirts on cam or doing lewd gymastics in booty shorts.

It has a built in camera

>having videos of naked teen girls
we got one dave prepare the van

userFilter = filterM ((*> readLn) . print)

example usage:

userFilter [1..4]
...

1
>True
2
>False
3
>False
4
>True

result is [1, 4]

>tripfag is actually a pedo

wow, color me surprised (not really)

Implying u record hours of video for the each of the hundreds of new users on streaming sights.

He's obviously talking about 18/19 year old girls. Geez, get your mind out of the gutter.

>Asuka
>submissive
Let's hope you're not Shinji

uguu

Is there a faster way to do
for(int j = 0; j < N; j++){
x[i-1][j]++;
x[i+1][j]++;
x[i][j-1]++;
x[i][j+1]++;
}

Faster? thats pretty simple.
Less code? probably. Doesnt mean its faster.

for(int j = 0; j < N; ++j) {
x[i-1][j]++;
x[i+1][j]++;
x[i][j-1]++;
x[i][j+1]++;
}

Faster meaning less potential cache misses

Won't that just lead to this sort of result?
0111110
1444441
0111110

Do that directly.

I'm iterating over i too and there is a condition to the body, I just forgot to put that in.

To that guy who just left the BasicTV IRC, there's one more thing I forgot to mention that it can do which is pretty dank. It would be possible to upload uncut and cut versions of something (i'm thinking podcasts) and allow opting in to the uncut version.

I was thinking about tying this to one linked list of frames, but that would be too complicated (and no audio or video format uses that sort of system, so importing would be hard).

learn to macro

So I decided to do some math on the value of Obama's presidency. To evaluate this, I am using the average decrease in the budget deficit generated by Obama's policies per time quantum. That is, how much he stopped from being added to the debt for each unit of time he worked in office.

The last budget proposed by President Bush for Fiscal Year 2009 was 1.16 trillion dollars. Adjusted for inflation in constant 2017 dollars, this would be 1.305 trillion dollars.

The last budget proposed by President Obama for Fiscal Year 2017 was 441 billion dollars, using constant 2017 dollars.

The difference between these two values is 864 billion dollars. Not too shabby. Divided across 8 years, Obama has decreased the burden of the taxpayer 108 billion dollars per year.

Dividing this up into seconds, we note that the number of seconds in a year is (365.25 * 60 * 60 * 24 = 31,557,600). Dividing the yearly savings in taxpayer burden, Obama has been saving us a grand total of $3,422.31 per second over the past 8 years.

Now remember, when Trump decides to spend about 16 minutes (3:27 AM - 3:43 AM, January 9th), writing 3 tweets to complain about Meryl Streep, that time could have been better spent hunkering down, crunching the numbers, and figuring out a way to decrease the budget by a whopping total of $3,285,417.60 in Obama's time.

back to Sup Forums faggot

lets see how well the numbers are in 8 (not 4) years ;)

And on a more related post, how about DPT invents a programming language?

it sounds like ruby is pro obama and against trump

>Now remember, when Trump decides to spend about 16 minutes writing 3 tweets to complain about Meryl Streep

ya well not all times is president doing number crunching you realize presidents hire nerds like you to do the work for them?

It would be shit.

BACK

TO

/o/

GAYBOY

Don't hold your breath. Now that the GOP has finished obstructing the fuck out of Obama, they're raising the debt ceiling again without so much as a peep.

The world doesnt need another one.

But let's do it anyways? I mean, you made up that Saturn++ shit...

What does Sup Forums think of hy?

docs.hylang.org/en/latest/

>lisp
>python
>at the same time
>has macros
>100% compatibility with python libs and data structures, it just compiles to python and runs as normal after being read

Is this our best bet at getting PHYTHONISTAS™® to learn a real language?

What does need have to do with anything? Can't you just make a thing for the sake of making a thing?

Let me explain, when a normal human rejects an idea, and they give a reason.
Although that reason may not objectively correct.
That reason is enough for that person to reject that idea, and do something else with their time.

>I mean, you made up that Saturn++ shit...

Yeah, and it was trash, just like my Not-Lisp and everything else.

Sorry, Obama lover! He's out!

>Since Hy transforms its Lisp code into the Python Abstract Syntax Tree, you have the whole beautiful world of Python at your fingertips, in Lisp form!
>doubt.jpg

I remember a joke image about Sup Forums's programming language, does anyone has it? It had a lot of meme arrows.

I've been writing a toy programming language myself, lately.
At this point, I've only gotten to a very simple parse tree, and still can't parse simple expressions.

Tried using Flex/Yacc to make the job easier?

I wanted to do it by hand for the sake of it.
If it wasn't just me fucking around, I probably would have used those.

it actually works though. I haven't done anything non-trivial with it, but I use it to manage a file lock on a shared server so users cat edit a graffiti page. The syntax is pretty ugly sometimes but its pretty comfortable to use from an elisp/common lisp user.

I've also fiddled with BeautifulSoup in it.

Doing an intro to python workshop and I have a quick question:
Why does float('123')

Work? Is there a string -> int -> float conversion?

Also, why do you need raw_input() to pass input to a variable in Python 2.7?

>Sorry, Obama lover...

Man, you are in for a rough couple of years...

>someone tells me not to be clever in my code because i wrote | |

Fair enough. You might want to consider generating a proper AST though, instead of just a parse tree.

>Is there a string -> int -> float conversion?
No. float() accepts a Number or String as an argument and converts accordingly.

You are welcome to test this by supplying it with 'nan' or 'inf' which will be converted correctly to floating point despite lack of int support for them.

Were you using it for a clever purpose, instead of just doing regular boolean arithmetic?

Holy fuck, don't write clever code, I bet you even use negations!.

We are in the greatest timeline right now. Things are going great!

What are those chink sluts doing

paya paya

What are basic datatypes which any programming language should support?

I'm getting good at this folding shit

how do I monitor a text file for changes in python?

I'm having serious issues with the c++ stl map.

For some odd reason, EVERY key is the same when I iterate over it. All mapped values are the same as well. I have absolutely zero idea what the fuck is going on here, and I can confirm that the values are being mapped correctly.

stop programming in an oop

Is that just regular emacs??

can't you just let a program run in the background that like every 20 minutes or something checks the file against the last known one to determine a change if no change keep the last known copy if a change make the last known copy the new version then just loop infinitely.