/dpt/ - Daily Programming Thread

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

Other urls found in this thread:

github.com/bakape/thumbnailer
github.com/jp9000/obs-studio/tree/master/plugins/win-capture
wiki.archlinux.org/index.php/Desktop_notifications
atom.io/
pavelfatin.com/typing-with-pleasure/
dictionary.com/browse/alumni
merriam-webster.com/dictionary/alumni
twitter.com/NSFWRedditImage

>His face when he made C and saw somebody actually use it

Finished my extensible Go image/video/audio/etc. thumbnailing library, if anyone cares: github.com/bakape/thumbnailer

...

>2017
>Falling for C cancer
shiggydiggy

Resposting because why not:

I'm messing a little bit with libnotify in Python.
Any idea how can I make the portraits of the girls bigger? I can barely see their faces.

I'm using GdkPixbuf for the images.

>Graduate from University with bachelors in EE
>Go for job interviews
>Get hired in one to do production scripts in Python
>Lucked out because I did my Final Year Project in Python, Adrino and C
>Do well for 1 year
>Optimize shit real good
>user, we want to make your production scripts a product - My boss

Here we fucking go. I don't have the first clue what goes into making a script into a working product. With a fucking GUI interface as well.

It doesn't have to be python specific but I can someone point me in the right direction in terms of documentation and shit for a program. Cause I have a feeling I might want to leave the company after this project.

Oh I don't have any mentors or anyone to turn to for help as well.

What operating system are you using?

my machine learning framework
it supports linear and logistic regression currently
haven't tested on neural nets, but it should work there too, since it's the same matrix operations it will use

will also implement a k-means algorithm, just to round it off a little

Experience with Windows and Linux. Confined to windows at work cause of VM off the main server. Given enough reason I can try convince my boss to let me bring my laptop to work. But hopefully I don't have to.

see if you can use pyqt5 on windows

Yeah I am not worried about making the program itself. It is the documentation and stuff that I am worried about. I have no idea how a development cycle works.

Bug testing? Code documentation?

I mean I can pajeet my work and make it so it works but only I understand it but it is my first major project in the working world and I want to do it well. Plus such skills can be put on my resume.

If the program does well nobody will really care about documentation and bug testing that much. You can simply use a documentation generator like doxygen and the GUI could simply be a colorful way to insert arguments to your app, slap a pyunit for unit testing just so it doesn't look like your app is without testing. If you arent trying to turn it into a library then you dont need to make an API reference, for usage itself a README.md will be sufficient.

I will look those up.
Oh boy it looks like it is going to be a long year ahead for me. Gonna start by learning how to make a simple GUI.

Thanks user. I better get a fucking good grade if I pull this off.

appjar

Lol you better charge something or get something valuable for all the bullshit ass work you'll have to put to make those scripts retard friendly, it might take more effort than writing the code itself

Not even that user, but this looks great. Tkinter for mocking something up is painful and this looks great for bypassing the pain of Tkinter.

>Lol you better charge something or get something valuable for all the bullshit ass work you'll have to put to make those scripts retard friendly

Lmao. I get paid a fix sum every month. I am salaried. Which is why I am most likely leaving at the end of this project. There is no one I can learn from. What I learn I learnt on the internet and on my free time. I am considered the de facto "best" programmer currently and I am fucking shit (at python).

>I am considered the de facto "best" programmer currently and I am fucking shit (at python)
This is the worst feeling. I'm feeling it currently.

What about making something portable. Just in case my boss wants me to make it so it can run without an IDE. I heard Pyinstaller and the likes which "freezes" code. Does that work with GUI as well?

>I'm feeling it currently
It gets better (hopefully). I been bugging HR to hire a legit Software Engineer for awhile. Nope. They want more geographers.

Lol the best programmer in there is a python and arduino programmer? Hope you ditch em as soon as possible user

Yeah. But they were the only company without the Entry level job but 4 year working experience meme.

And let the record show that I am actually a very competent arduino and know C quite well.

>Entry level job but 4 year working experience meme
This meme needs to die ASAP but no one seems to actually want to kill it outside of writing blog/plebbit posts about it, it's stupid.

>I heard Pyinstaller and the likes which "freezes" code. Does that work with GUI as well?
Yeah, it does. We had an intern at my job and he cooked up some zaney python script to read excel files, just finished cleaning it and work with company needs; he used tkinter for some graphical input needs and it worked just fine with py2exe

The worst part is I have interned but when I went for interviews, I get told that doesn't count as work. Simply fucking ebin. Anyway, I am pretty sure by the time the project is up, I will have 2 years working with VM, python and on my own free time continue to program in C for Raspberry Pi and hopefully headed my own successful project. Hopefully that gets me a good job somewhere else. Hopefully.

Am I retarded? Trying to pass in a function that adds or subtract a number from (fromEnum char) and convert it back to a char using toEnum. For example: (toCharFun (+3) 'a') "==" 'd'

toCharFun :: (Int -> Int) -> (Char -> Char)
toCharFun f ch = toEnum (f (fromEnum ch)) :: Char

you could define inEnum :: Enum e => (Int -> Int) -> e -> e and make that generic, not sure if there's a better way of doing that

withInt :: Enum a => (Int -> Int) -> (a -> a)
withInt f = toEnum . f . fromEnum

(exact same as what you gave)

>withInt (+1) 'a'
>'b'

If you're only doing a few, you can do this:
>succ 'a'
>'b'
>foldr (const succ) 'a' [1..4]
>'a' + 4
>'e'

I don't get it. How are lisp and stacks related and how is C immune to stack issues?

From my vantage point C's ultimate failing was being too tied to a single hardware stack making coroutines impossible and the zeitgeist of threading models that were developed to work around that fact difficult to use and less performant overall.

Does anybody know how software like Fraps works? Do you need to do something like DLL hooking/injection, or making a proxy DirectX DLL, something like that?

I want an overlay which can tell me my CPU & GPU temperatures in addition to frames per second, and I may as well try implementing it myself.

obs-studio is relevant if you want to see how it does stuff github.com/jp9000/obs-studio/tree/master/plugins/win-capture

I think they intercept DirectX and OpenGL calls or something.

thanks senpai

Thanks for the link

That's what I thought since that's how ENB and other vidya mods work

Why you pretending to be me famalam?

I've been trying to write a ascii map generator in haskell for school and I have no idea where to even start

Step 1. Learn haskell

presumably it's cell-based

define a cell

how is your progress coming along?

Slow.

Anyone familiar with the Anderson acceleration scheme? Not even my supervisor has heard of it.

what do I use Lua for?

If you were to design an instruction set for a processor or programming language virtual machine, what instructions would you include?

what is this tripfaggotry?
this isn't reddit

std::reply

Letting users add functionality to your program

i want to make a program that can do some modular arithmetic and also save/recall data, but ive only mucked about with c++ a bit and havent figured it out yet

I have an assignment creating a basic compiler using bison and lexx for the first time, pretty interesting, too bad I suck at programming

upvoted ;)

So like modding? Does it matter which language my program is written in or does it have to be something like C++?

I know for games like Payday2 and WoW you can write lua scripts to make add-ons or mods but they are written in C++ I think.

lol

If Rust is so great Why doesn't Terry use it for his OS?
Atheists serve'd again!

>Does it matter which language my program is written in
It has to have support for LUA interoperability, which practically every major programming language does because LUA is so popular.

>Walk into office
> So tell me what do you know about OOP?
>OOP IS PURE GARBAGE AND IT MAKES CODE INTO SPAGHETTI CODE
>Can you please leave right now
>*autistic screeching*

>things that didn't happen in the office i never visited to do the job i never had

Thanks for letting me know about this library, it's pretty cool dude. On debian though the notifications don't really show up, you have to seek them out to find them. Pretty annoying. Unless I'm doing something wrong.

>LUA

It's Lua you fucking faggot. Did you not read the Lua author's fucking wishes on the matter? Fucking kill yourself.

just filter them

I would give u gold but I can't see ur name fugggK

gib jew gold plz

I'm glad you found it interesting. I suggest you read wiki.archlinux.org/index.php/Desktop_notifications if you're interest in implementation in other languages.

btw, I'm using Arch Linux + KDE and the notifications show up normally. It's probably your DE.

Stay triggered, LUAser.

Will C programming change after Unified Memory?

What's the best candidate today for unifying RAM and HDD/SDD? Memory that's as fast as RAM but non-volatile like HDD/SDD? How long until it's available for consumers?

Depends whether you want it to be stack based or register based. Since it's a virtual machine stack-based would probably make more sense as you don't gain anything from using registers in memory vs a stack in memory, but if you wanted to do dynamic recompilation (instead of interpretation), your programs would run faster if you could translate virtual registers into physical registers rather than having to still do everything on the stack. Java and C# can translate stack operations into register operations though so basically it doesn't matter.

>Unified Memory
That's stupid. By the time we have persistent memory as fast as modern RAM, RAM will be even faster than that.

I figured out why I wasn't seeing them. Now I'm having a similiar issue as you trying to get bigger images. I'll let you know if I discover anything.

Stack-based.

I also thought about adopting the split stacks model formerly used by Go, Rust and implemented by GCC. This would make for comfortable memory allocation as the stack becomes unbounded and would also allow advanced stuff such as delimited continuations.

I think including an explicit "split the stack at this point" instruction is vital to avoid the "hot split" problem Go had. This way you can generate code that creates a new stack before loops, stopping the constant allocation and deallocation Go experienced

>dynamic recompilation

I thought about creating a really small VM with a general system call interface, initially for x64 Linux. Then I'd implement things like I/O on top of the VM without using stuff like libc.

With this minimal interface it's possible to allocate executable pages and write a good JIT tailored for a programming languafe. So the basic interpreter doesn't even have to be fast

time for atom.io/

That sluggish piece of trash? You're not serious, are you?
pavelfatin.com/typing-with-pleasure/
If you were suggesting I man up and get better at vim I'd understand. Atom is garbage.

Filling out a stupid performance document.
I don't know if I'll continue with Haskell. This may sound obvious, but it doesn't feel practical. I'm sure it's great for academics, but I don't care about theoretical masturbation. Everything feels counter intuitive from a practical point of view. Even doing I/O is a nightmare because Haskell is a pure language.
I'm currently looking at the following languages: OCaml, Scheme and Common Lisp. I know that some impressive software is written in OCaml, like FFTW. I'm slightly familiar with Scheme. I don't know about Common Lisp.
Any suggestions on what to do next?

Personally I'm using it to write features for my game, the core is written in C++ though.

IO is easy in Haskell

>Did you not read the Lua author's
Yes I did, that's exactly why I call it LUA.

>tfw don't want to work for Mr. Shekelstein because I think it's a waste of time
>not creative enough to be an entrepeneur
>not sure if I'll like the academy

Do you feel like this, /dpt/?

please don't use bill gates picture for the abomination called windows 10

Yeah, except I'm too introvert to be an entrepeneur.

Why not a real programming language like C?

I find it really frustrating compared to other languages.
I'm actually leaning towards using C again. That shit just works.

Common Lisp feels weird to me, with it's weird syntax and lack of constructs like static typing, but I kind of like it.

>try learning x86 Intel assembly
>if my machine differs from the textbook author's in any way, everything is fucked up
JUST

>In CS class
>Group project with a friend
>Last year, we ended up with two idiots
>One of them spouted memes, the other wouldn't shut up about fucking his GF
>They made three total commits to the repository, and we had to finish everything ourselves
>Declare that this year will be different
>Get in a group with a self-proclaimed "web development expert" who had an internship and a nice enough guy
>First group meeting, one of them starts talking about how much he loves memes
>notthisshitagain.html
>It becomes increasingly clear that they don't know what they're doing
>"Web dev expert" has never heard of bootstrap
>It's two semesters into the project, they have made one commit each and my friend and I have over 50 apiece
>They commit to the repository by downloading the .zip from github and reuploading things they have edited

College is a joke.

Test

>Two semesters
what

Grow some balls and be the team leader you beta male pussy.

>First group meeting, one of them starts talking about how much he loves memes

That's such a weird thing to do. Can you expand on what he said exactly? How does his love of memes even crop up in conversation.

Dennis has big eyes

It's a two semester long project. And it's hell.

They don't know how to program. We make them do everything non programming related. At this point, I wouldn't want them to touch the code.

As we were sitting there trying to work, he started pulling up memes on his laptop to show to everyone. No one was laughing but he kept at it, talking about which memes he thought were especially hilarious.

I simply hate alumni who can't learn by themselves. CS is a course for autoditacts.

>he started pulling up memes on his laptop to show to everyone
ALWAYS

faggots lmao

I'm beginning to worry that no one in my school is actually learning anything. What will they do when they graduate and try to find employment?
In my class, half the groups didn't have a single thing to show for their group project after working for four months.
FOUR MONTHS, and they didn't have a demo.
I'm not exaggerating. These were four person teams and they couldn't show anything off after four months of work.

I'd really like to make friends in the CS program but most of them are meme-spouting mouthbreathers.

I hate it when someone thinks its HILARIOUS to show you some """funny""" youtube clip that you have to force a chuckle to. My strategy is to repeat the joke back while 'laughing'. It allows you to move on while not looking like a dick.

Christ. Are you towards the end of your degree? There really needs to be some kind of superior retard culling mechanism where your ability to hammer out projects and labs isn't the only metric that pushes you forward, would have totally prevented this know-it-all meme kiddo in my current night class from being able to register. No, no one wants to hear your interrupt class because you want to say some stupid shit about Arch Linux or stutter out "H-HOW ABOUT I-INSTALLING GENTOO"

>What will they do when they graduate and try to find employment?
They won't. I know for a fact three people in my class won't find employment or move on because they're the exact same kind of person you're describing. They're the people who become Sup Forumstards posting about how "university is a meme" after doing that garbage for 2-4 years depending on how they arrived.

>alumni
That's not how alumni works. You're looking for undergrad or student.
dictionary.com/browse/alumni
merriam-webster.com/dictionary/alumni

I volunteered to making a website for the "club" I attend.

Oh, my bad. I'm clearly not from the US and here alumni literally means "students", in a common way. Sorry about that.

There's PyQt available.

Yes, I'm about to graduate.
You know what's scary? The self-proclaimed "web dev" who didn't know what Bootstrap was already has a job once he graduates. A company has already hired him.
He wrote on his resume that he knows "assembly." By this he means, we took a rudimentary assembly class. We didn't even learn how to print strings to console in that class. The most advanced thing we did was basic arithmetic with an assembler.
This guy doesn't know how to use github.
This guy doesn't know what Angular is.
He doesn't know the difference between "backend" and "frontend."
His personal site looks like shit.

He's going to have a job with a $70,000 salary when he graduates. They've already hired him.

>I get told that doesn't count as work

Holy fucking shit. Being an intern doesn't count as work experience? Fuck those people, they're fucking retarded.

You can't be serious. Even a pajeet would do a better job.

Learn Racket instead of regular Scheme.

Don't people like him get fired and blacklisted though? Or not?