/dpt/ - Daily Programming Thread

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

Attached: pic.jpg (659x317, 38K)

Other urls found in this thread:

youtube.com/watch?v=VqB1uoDTdKM
diveintopython3.net/
automatetheboringstuff.com/
pyformat.info/
rszalski.github.io/magicmethods/
google.github.io/styleguide/pyguide.html
sebastianraschka.com/Articles/2014_python_2_3_key_diff.html
cs231n.github.io/python-numpy-tutorial/
jakevdp.github.io/PythonDataScienceHandbook/
mubaris.com/2017/09/09/introduction-to-statistics-using-numpy/
nbviewer.jupyter.org/github/vlad17/np-learn/blob/master/presentation.ipynb
machinelearningplus.com/python/101-numpy-exercises-python/
ohshitgit.com/
git-scm.com/book/en/v2
git.wiki.kernel.org/index.php/GitTips
wikileaks.org/ciav7p1/cms/space_1736707.html
www-cs-students.stanford.edu/~blynn/gitmagic/
wikileaks.org/...
learngitbranching.js.org/
twitter.com/SFWRedditImages

benis :DDD

Does anyone actually make money off their open source work? Over the past 6 years I've gotten a grand total of $35 in donations.

Haskell!

please use an anime image next time

Attached: anim haskell.jpg (480x480, 56K)

Attached: Linus-Torvalds.jpg (800x400, 162K)

i need your help nerds

i want to learn matlab and python, what are good resources to do this

willing to learn OCaml next week
was thinking doing some compiler stuff with it, mp3 en/decoder could be fun

Do you any of you guys actually use Git.

No ones uses Git in the world.

no, we all use subversion

I tried learning Java with mooc.fi, but was too much of a retard to finish it.

How easy is it to get a job with python? All I care about is finding work where I wont have to destroy my body physically anymore

Yes I actually do. I manage my passwords with it. I version my homework with it.

yes, sadly.

How would you replicate this in machine runes?
>youtube.com/watch?v=VqB1uoDTdKM

no idea for Matlab, I was forced to learn it in some undergrad course and never touched it again in favor of python+numpy

so there is my resource list for python:
- Dive Into Python 3 diveintopython3.net/
- Automate the Boring Stuff with Python book automatetheboringstuff.com/
- Formatted printing overview pyformat.info/
- Python's Magic Methods rszalski.github.io/magicmethods/
- Google's Python Style Guide google.github.io/styleguide/pyguide.html and ofc PEP8 style guide
- Key differences between Python 2.x and 3.x (nowadays you can ignore 2.x existence) sebastianraschka.com/Articles/2014_python_2_3_key_diff.html
- Python Numpy Tutorial from Stanford's CS231n course cs231n.github.io/python-numpy-tutorial/
- Python Data Science Handbook (slightly outdated, the IPython notebook is now Jupyter Notebook) jakevdp.github.io/PythonDataScienceHandbook/
- Introduction to statistics using Numpy mubaris.com/2017/09/09/introduction-to-statistics-using-numpy/
- Advanced Numpy Techniques nbviewer.jupyter.org/github/vlad17/np-learn/blob/master/presentation.ipynb
- Numpy Exercises for Data Analysis machinelearningplus.com/python/101-numpy-exercises-python/

I know _one_ guy who does : our HR guy uses it to version control his powerpoint/word docs. But I don't.

I would totally love a femdom program...

>python python python python python

Attached: 1463177575871.png (1728x1080, 2.22M)

Realistically, do I need to learn any of the commands beyond clone, pull, push, branch, checkout, stash, commit, and merge?

I looked at the documentation and it is daunting.

New thread when?

I'm not not sure I would record old no longer used passwords...

whats wrong with python?

blame

your point?

You forgot add. There are a few more you might need like reset.

git clone repo local_name
git pull {if first time pulling: origin --set-upstream master}
git add .
git commit -m "I did thing"
git push

git checkout -- files_to_remove_from_staging_area
git checkout -b new_branch
git checkout {commit_hash or branch_name}
git fetch {to "pull" without merging}
git merge
git stash


this is all you need to know

git-scm.org has a lot of higher-level introductory articles that explain the concept in a more handholding way.

I forgot git status and git log but those are obvious

You might want to get some shortcuts. I like "git lol". It shows previous commits and branches.

What would be the problem with that?
1. They are still encrypted
2. They are less critical than current passwords by definition.
3. Even with my setup you can delete history by shallow grafting and whatevs (tho I haven't done it yet)

Don't be a bully, user.

Attached: angry or upset.jpg (2048x1152, 217K)

- Oh Shit, Git! ohshitgit.com/
- Git Book git-scm.com/book/en/v2
- Git tips from Linux kernel wiki git.wiki.kernel.org/index.php/GitTips
- Vault7 Git page wikileaks.org/ciav7p1/cms/space_1736707.html
- Git Magic Stanford course www-cs-students.stanford.edu/~blynn/gitmagic/

I use "git off my goddamn lawn, kids!" a lot.

>- Vault7 Git page
>wikileaks.org/...
OK user that's original.

the most important one is reflog

>make a tiny opencv c++ program for an assignment
>3 different kinds of memory errors including segfault for some images but not for others
>on images with identical bit depth and identical channels
>some images randomly work
>i don't know how to use it too well but gdb tells me the errors are even in different spots
>i didnt even use any pointers

being a brainlet is suffering
maybe ill just do a preprocessing step that 100% squashes every image into an identical form

Attached: fug.jpg (900x900, 73K)

Not much, I don't like the indentation and some syntax. The language is somewhat bloated. It has some performance issues although not bad compared to some other languages. I also am not a huge fan of dynamically typed languages.
Neck yourself

learngitbranching.js.org/

Anything python can do with an import, other PLs can do with or without a library except much MUCH faster (even Jamalscript is faster) and less error prone. There is literally no reason to use python other than being a brainlet.

Rip wish I could help

> other PLs can do with or without a library except much MUCH faster
in case of numpy stuff I doubt that, good luck making sure compiler uses SIMD everywhere

This is nice.

It would be nicer if he cut out the goddamn animations and muh fake apple windows. I wanna start reading not wait for his gay 90's era powerpoint scroll in animation.

Any of you have any experience with wxWidgets? This happens when trying to resize a form with a list control occupying the panel. Does not happen with the other controls I have tested

Attached: wxWidgets list control.webm (326x354, 173K)

looks like a lack of refreshing/painting

Yep. I should have mentioned, wx forms and controls do come with a refresh() and update() method but they seem to do nothing in this case.

Are you by any chance running it from a remote server via X-forwarding?
This seems identical with what happened to my program when run trough X-forwarding. the connection between the machine is not fast enough to send event in real time so the window shows that kind of behavior before the program could "refresh" the page

Running it on Windows 10

I doubt your open source software is good enough or big enough to warrant donations.

Isn't Ocaml just a less extensive haskell?

Attached: Ocaml.png (483x477, 225K)

isn't it the other way?

nah

dumb frogposter

How hard is to make a driver for a usb drive? I have to make a project for I course I am taking and thought it would be fun to develop one.
The course is about linux interface programming (system calls and all that stuff)
It would be nice if you suggest more project ideas btw

allegedly it's the ultimate nightmare

Use valgrind

dumb frogposter

LOL. a turtlefag talking about SIMD
Even debug build is at least 50 times faster than python and your interpreter is still single threaded.

dumb frogposter

It is pretty simple

anime website

not anime related

stupid frogposter

dumb frogposters

I'm not a dumb frogposter.

you posted frgos

NumPy uses C libraries for speed.

By that logic Ruby is fast

I did not.

...

Reminder that the only script shit that should exist is bash. an hero script kiddies

Attached: giphy.gif (500x332, 334K)

Not me.

numpy uses BLAS for speed and data structures optimized for it, that's more relevant than some C part

dumb fropgoster

bash is trash as other bourn shell derivatives

Speed is not a measurement of PLs so that's nonsensical. But it's true that in the case of NumPy, Python is shown to not be inherently slow.

This is slander. I am not a dumb frogposter.

Bash is garbage. If there's going to only be one scripting language it should be ruby

>I am not a dumb frogposter.

Attached: images (1).png (202x250, 8K)

didn't HolyC teach you that there is no difference between compiled and scripting language?

>Bash is garbage.

Attached: Screenshot_2017-07-08_00-10-31.png (923x1163, 114K)

Why do C functions return int in places where they could return char, e.g. when returning -1 or 0?

comparing bash to python is retarded in itself

dumb frogposter

if you subtract the startup time then python3 list/dict is far faster
also small bash challenge: loop over lines of input

>BTFO of turtles since 7/7/2017

A scripting language doesn't need to be fast. If you want something done easily you use a scripting language. If you want it done fast you use C. And if you're going to argue that bash is easier or more intuitive than Ruby, you have no case. Python be damned.

Not on *nix-based systems it's not.
>b-but my modules and import entire_solution_here
Bash has the source builtin and can import scripts from within a process, just like Python. Bash has functions, and allows passing arguments to them, so building libraries is trivial and akin to any other scripting language.
>b-but my easy prototyping and productivity
Any deficiencies of bash become irrelevant when using coreutils and other standard utils found present on any default Linux installation.
>also small bash challenge: loop over lines of input
Elaborate.

>dumb frogposter

Attached: vO7lRZ7.png (621x702, 56K)

Attached: 1502102552455.jpg (2048x1536, 363K)

>Any deficiencies of bash become irrelevant when using coreutils and other standard utils found present on any default Linux installation.
Maybe if you mean "deficiencies" in relation to the functionality of Python, but Ruby is still more powerful and expressive

you could equally return _Bool. The answer is because C is gay.

>Elaborate
something like in python
for line in sys.stdin:
print(line, line) # do something with line

gets(nil).each_line {|line|
# do something with line
}

In bash this is literally just
while read line; do
# do something with $line
done

>char and not signed char
user you have to specify,
>The implementation shall define char to have the same range, representation, and behavior as either signed char or unsigned char.
But it doesn't really matter. Small return values are in the register anyway.

Attached: 1526297176956.jpg (222x227, 14K)

example?

It does speed up the matrix operations. I am not sure if they are is penalty for having the core logic in Python

for functions that want to return actual characters, like getchar, every value that a char can be could be a valid return value, so they need the extra range of an int. if they only return 0 or a few error codes or something it doesn't really matter unless maybe your registers are only 8 bits wide