/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Previous thread:

Attached: cg0ut1ara7021.jpg (640x768, 69K)

Other urls found in this thread:

pastebin.com/1yLcVkyW
github.com/google/haskell-trainings/releases
limperg.de/ghc-extensions/
pypi.org/project/ExifRead/
stackoverflow.com/questions/4764932/in-python-how-do-i-read-the-exif-data-for-an-image
twitter.com/SFWRedditGifs

You can't spell trust without Rust.

epic op image ;ddd

Attached: 1548809595640.jpg (1152x720, 83K)

Reminder trannies can't be programmers because they lack critical and logical thinking completely.

How do I reference non-current section in NASM? I know the current one is referenced using $$.

I need to decode a subset of ARMv5T instructions in C. Is there a sane way to go about this beside using a massive ifelse tree?

You can spell rust without faggot, but you shouldn't.

what is wrong with this Python script?

for i, row in data.iterrows(): #iterates through a specific column in a dataset
x='0'
str_list = []
if data.row_idx[i] != x: #if the value is different from the previous one, add it to the array
x=data.row_idx[i]
str_lst.append(data.row_idx[i])

Traps can be programmers but they don't last long enough for it to matter

Theres no 'R' in trust

disregard the str_list being declared in the loop. I am aware of that and declared it outside, but the issue still persists that the array is empty

ashes to ashes, rust to dust

It's a bit difficult to tell, when we have no clue what data is, what its methods are or what those methods return.
Then it's pretty obvious that if data.row_idx[i] != x: returns false.

Daily reminder that "learn assembly" is abbreviation of kys.

and that's a GOOD thing

learn assembly

data is a dataset with 199 columns and 39601(199^2) rows. One column is row_idx and it has 199 unique strings show 199 times each. I just want a loop that adds each unique string in an array that is 199 long.

also the strings are sorted

I am thinking like this
>go to first element in column
>check if it's 0(obv not)
>set x to string
>append string to array
>go to next
>sees x == str1
>ignores
>continues until x != str2 in column
>sets x to str2
>appends str2 to array
>etc

What do u mean

Updated: remove ghetto try/except and add ability to pass list of "functions" for the lists of args to be run through.
pastebin.com/1yLcVkyW

Attached: 1486431272926b.png (116x120, 25K)

Maybe that iterator is at fault. Maybe it's length is zero. Or maybe all the rows are actually "0". Or who knows. Just add print(i, row) and print(x) within the appropriate blocks to see, if those make any sense.

Daily reminder "learn to code" is a hate speech.

they either die of aids or kill themselves is what I'm saying

One of the best and the most productive programmers I know is a trans. She's a dick and hard to work with tho.

it prints 0, 1, 2 3, 4... etc

hard to work with geniuses need to fuck off theyre counterproductive

>she

>abbreviation
>bigger
learn assembly

Attached: Screenshot_2019-02-04 stonetoss trans - Поиск в Google.png (1192x397, 448K)

Daily reminder ARM architecture was designed by a trans woman.

Attached: Sophie_Wilson.jpg (640x426, 310K)

this is very neat user!
what language is it?

1. Using recursion=waste of memory.
2. All LISP features non existed in FORTRAN now avalable in BASIC.
3. Programming is modern math, math is ancient programming.

Attached: 1c.jpg (1240x580, 41K)

>his language doesn't tco

Кaк жe хopoшo, чтo я в cвoe вpeмя нe пoшeл в 1cники.

>he expect the compiler to fix his shitty code

no wonder it sucks

it also prints all the strings strangely enough

He became a tranny afterwards.
He used up all his cs skills that transpolymorphed him into a woman(not a real one of course).

you set x to '0' every time
declare it outside of the loop

How do I do a for loop in Python that prints all the strings in an array
It must specifically be that

yeah that was the problem kek

for s in array:
print(s)

alright then the problem I have is very different. No idea why

nvm, seems like you cannot have the same iterator variable for different for loops in Python lmao

You can, actually.
for i in a:
print(i)
for i in b:
print(i)

is completely valid, and it returns what you'd expect with different variable names.

> Stefan Molyneux was a COBOL programmer
It all suddenly makes sense.

Attached: maxresdefault.jpg (1280x720, 112K)

I misread that as "she has a dick and is hard to work with".

It's not wrong tho, I think she still has a dick.

>misread

Your message makes no sense.

I don't think it matters what someone who isn't a programmer anymore has to do with programming.

> see someone quoting Steve Ballmer in a negative way on mastodon
> look up his bio
> "leftist polyam transbian linux nerd. Bot Queen. suckling babe. quirky tranz bunny not furry/kin"

FOSS was a mistake.

Attached: 1373694480124.png (696x542, 284K)

Based.

> she's not a leftist polyam transbian linux nerd. Bot Queen. suckling babe. quirky tranz bunny not furry/kin

No one on Jow Forums has actually read it.

I've read a book.

i have both read the book and done the berkeley course.

But did it make you a better programmer? Do you use the concepts from the book in real life projects?

yes, definitively. i have a better grasp of what is abstraction, when and what abstraction techniques to use, the cost, ...
after reading sicp, that quote from Joshua Bloch, who was in charge of optimizing Hotspot, makes much more sense:

"The cleaner and nicer the program, the faster it's going to run. And if it doesn't, it'll be easy to make it fast."

user you replied to here
I certainly haven't

Attached: 1549258034880.gif (300x297, 965K)

There was no need to use eval().
def add(x, y):
return x+y
def subtract(x, y):
return x-y
def dothis(func, *args):
result = []
for f in func:
result.append(f(*args))
return result
lmao = [[add, subtract], 2, 3]
print(dothis(*lmao))

>[5, -1]

Attached: 1527543779947.png (440x350, 48K)

Please use a yuno image next time; thank you.

>cleaner and nicer
>sepples

Attached: 1548129005862.jpg (640x480, 45K)

github.com/google/haskell-trainings/releases
> google
> haskell
> ponies
It's so 2011.

Attached: google_haskell.jpg (1195x897, 105K)

Google can ruin anything

So, memes aside, what happend with Haskell in the past 6 years or so?
I was a big fan of the language but lost interest sometime in 2013 or so, and I'm thinking of getting back at it. I looked at Jow Forumshaskell and people still talk about monads and shit as they did 10 years ago, as if nothing changed.

>haskell users are mlp fags
I'm not surprised.

Is making eroge games bad ? Like will a future employer be phased?

It doesn't seem to have progressed much

>he also talks shit about RMS
Every time.

rms deserves to be talked shit about tho

>i'm a X-language programmer
what a retarded fucking statement, you either are a programmer and can pick a new language in at most a week or you're not a programmer

t. fizzbuzzer

t. kid who knows all of one language's features but is clueless about programming and CS

limperg.de/ghc-extensions/
> GHC, the most popular Haskell compiler, has grown almost 100 extensions which modify the language
GHC extensions was a mistake, they should have just disregarded the standard and made them on by default.

some get standardised eventually, but the standards people are fucking around right now

Can't wait for Zig to get mature.
Finally something that can replace C without adding to much trash.

Zig adds lots of trash and nothing useful.

rust replaces C and Sepples

Post yfw you look at a code you wrote a year ago

Attached: 130221984383.png (299x288, 84K)

0
>delete it all
>rewrite

Attached: trust.jpg (874x594, 63K)

Post yfw you look at code you'll write in a year when working as a Java# pajeet since Haskell is unemployable

Attached: 1547875587298.jpg (1280x720, 168K)

Any good ressources to start java? I need good basis in 3 weeks.

what colortheme, /dpt/?

>he expects the programmer to fix his shitty compiler

Newbie here. How do I read the image tag metadata of a jpg file in python? I have tried using PIL, but can't find any examples/documentation that are relevant to my question and works.

Can someone point me in the right direction for personal projects that can be put on resume?
I'm still in CS and I have no idea how big or what difficulty they should be?
It can't be something like fizzbuzz or calculator right? But what?

Just put up all your homework on shithub

Do people really do this?

I Googled 'jpg metadata python'.
pypi.org/project/ExifRead/
You're saying this is insufficient?
There was also this which is about PIL.
stackoverflow.com/questions/4764932/in-python-how-do-i-read-the-exif-data-for-an-image

what haskell ide do i use

Always do the opposite of what Jow Forums told you.

>haskell ide
Good luck

Attached: natraj.jpg (500x250, 241K)

Lynne Classic @[email protected]
>"i use linux as my operating system," i state proudly to the unkempt, bearded man. he swivels around in his desk chair with a devilish gleam in his eyes, ready to mansplain with extreme precision.
>"actually," he says with a grin, "linux is just the kernel. you use GNU+linux."
i don't miss a beat and reply with a smirk, "i use alpine, a distro that doesn't include the GNU coreutils, or any other GNU code. it's linux, but it's not GNU+linux."
>the smile quickly drops from the man's face. his body begins convulsing and he foams at the mouth as he drop to the floor with a sickly thud. as he writhes around he screams "I-IT WAS COMPILED WITH GCC! THAT MEANS IT'S STILL GNU!"
coolly, i reply "if windows was compiled with gcc, would that make it GNU?" i interrupt his response with "and work is being made on the kernel to make it more compiler-agnostic. even if you were correct, you won't be for long."
>with a sickly wheeze, the last of the man's life is ejected from his body. he lies on the floor, cold and limp. i've womansplained him to death.

Is there a connection?

surly notepad++ and winghci isnt the final solution

>and work is being made on the kernel to make it more compiler-agnostic
More like work is being done on other compilers to make them support GNU extensions.

Just use wordpad, I think it will suit you best.