/dpt/ - Daily Programming Thread

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

Attached: 1543874106187.jpg (1500x1500, 1.26M)

Other urls found in this thread:

wiki.osdev.org/Bare_Bones
github.com/awesomekling/serenity
github.com/torvalds/linux/blob/master/kernel/workqueue.c
wiki.haskell.org/Applications_and_libraries/GUI_libraries
projecteuler.net/archives
a.4cdn.org/g/thread/70132173.json
twitter.com/SFWRedditGifs

based op

Started working on networking support for my operating system. I wrote a basic driver for Intel E1000 network cards yesterday and now I'm finally able to respond to ARP requests. :)

Attached: Screenshot at 2019-03-11 23-31-41.png (1920x1080, 481K)

Why are you making an OS?

why not?

Not saying not to, I was just wondering if you have a specific motivation in mind.

Many reasons. I don't like what has happened to the available operating systems. The serious business systems got cute and family-friendly, while the hacker/developer systems got corporate and faggy.

I'm trying to bring back the feeling of computing from the 90s when shit was serious and hackerly at the same time. Even if it's just for myself.

>rice my text editor
>whenever I want to program I end up looking at it instead
bros...

sounds like haiku

I ended up deciding that ricing is a waste of time and just use the vim default color scheme.

templeOS?

user the speed at which you gain progress is terrifying. Stop making me feel bad about myself.

cringe

That's really cool. Where did you start? What resources should I look at if I want to do something like this? I have OS knowledge and use linux, but never looked at actual OS development at all.

Cute comments.

While I think that your reasoning for making an OS is poor, good luck.

Yeah I get what they're doing and I respect it. If I liked the BeOS aesthetic I would probably have joined them.

Don't be too hard on yourself user. :)

Any motivation that keeps you going is good motivation, right?

They're definitely brilliant, yeah

>Any motivation that keeps you going is good motivation, right?
I guess.
Do you have this on a repo? I'd definitely like to take a look at your code.

Thanks user! I started by writing a little bootloader in x86 assembly. Then I made a little kernel that could switch between two tasks who printed something like "Foo" and "Bar" respectively. It was thrilling. Then I wrote an ELF parser and an Ext2 filesystem library. And a GUI widget library. Then I started baking everything together. This was about 5 months ago so it's been a while.

If you want to try your hand at it, I usually recommend this page:
wiki.osdev.org/Bare_Bones

Sure, it's here:
github.com/awesomekling/serenity

>github.com/awesomekling/serenity
Oh, for some reason I thought you didn't have a GUI from the original screenshot you posted. This is actually really cool. Thanks user, and good luck.

Who else has trouble remembering how stuff is supposed to be done in various scripting languages?

That's why the docs exist, silly

Just learn shell script

When did OSkun start programming?

Linux includes its public headers with angle brackets.
github.com/torvalds/linux/blob/master/kernel/workqueue.c
Is this a good include style?

Someone answered you last thread.

If I say I don't want to work with or maintain shitty codebases (refusing a job offer), am I spoiled brat, or reasonable?

No, this is a different question. I'm curious why someone would choose the style I linked as opposed to just always using quotes for both public and private headers.

Yes, but if your project is just a handful of files in one directory there is no need for it. It should only be used in conjunction with the -I option to your compiler. Basically, you can conditionally include certain directories instead of others on your include path at build time. Linux uses this to provide different headers depending on the architecture, etc.

Reasonable if you have other job offers lined up. Spoiled brat if you're living with your parents.

yeah i can't use sed it's hard

Thanks.

Is anyone good at software engineering out of college? I have a job that im gonna start soon and im nervous as shit that im over my head

most people aren't, but most people who have jobs aren't good at it either

1990

Attached: 5addaf42f3fba4706820bf48.jpg (627x627, 74K)

i see shit like
and have no idea what the fuck is going on so i think im a huge failure

That guy is special. Don't mind him.

you mean you don't understand C++ code?

So otherwise it makes sense to use quotes, if only because people immediately know the file is a part of this project?
I ask all of these stupid questions because this is my first project with more than one directory, and I'm not sure why I shouldn't just use everywhere, since most of my includes are in different directories than my source files.

I teach for a a class that is currently developing a testing framework for C++ assignments. One of the big obstacles in getting people to test their code is that at the moment is that the testing framework doesn't really support testing private helper methods within a class.

I know GUnit allows you to test private methods with FRIEND_TEST, but other than that (since we aren't using GUnit for out tests), what would be a way to support testing of private methods?

cout

Don't devalue the hard work someone has put into becoming skilled by saying it's due to intrinsic talent.

there's personalities that are workaholics and have all this mirth and energy for what they do

it's not you

it can be you, don't put people on a pedestal

I added support for keybindings to my wayland compositor, but I'm not really happy with the user-facing interface. So I decided to see how stumpwm does it, and what the fuck? They have some custom command language, and keys are bound to strings which are executed as commands. Why not just bind to lisp functions? A function is literally better IN EVERY WAY. I don't understand.
Anyways, what I've got is
[/code]
(bind-input '(((alt) . Tab)) focus-next)
(bind-input '(((alt shift) . Tab)) focus-prev)
[/code]

Attached: rance-reset-kalar-01-19.jpg (800x600, 95K)

I can understand it but its like how does it know what to type. Like if i look at it and dont understand it 100% then i feel like shit.

Like if someone says write x program (where x isnt a meme program like fizzbuzz) and i cant instantly write it, then i feel like a failure

>Don't devalue the hard work someone has put into becoming skilled by saying it's due to intrinsic talent
That was not my intent. I was trying to tell not to try to compare himself to the guy building an Operating System because there is a massive gap in experience, and it will only get him down. Most programmers are not capable of getting to the point he has.

unless you understand networking you aren't going to know what it does, there are too many fields of programming for any one person to know everything

based. the only testing utility you ever need

What you are describing is less of an example of not knowing code but more of having some sort of mental illness that magnifies negative thoughts (depression, anxiety)

You're ridiculously fast. How long have you been doing that? A month? You've created an OS with a GUI and networking in the same time as I've created a fizzubzz using HTML.

>if someone says write x program (where x isnt a meme program like fizzbuzz) and i cant instantly write it, then i feel like a failure
You need to get rid of that mentality. Even if you think you can write it instantly, I promise it will most likely fail and you're gonna have to fix it, or you might come up with different ideas, and you will deviate from you original idea.

I... I made a Lisp shell OS in two days.

Attached: Screenshot from 2019-03-11 19-46-36.png (138x62, 647)

Great job user, why not turn the 1, 2 and 4 into constants though?

Try making small programs that broaden your understanding of the basics: file IO, multithreaded / event-driven programs, networking, computer graphics, interpreters, etc.
Then combine these small programs into more complex ones, so that the motivation behind architecture and design becomes evident.

I do this and recommend it. It's more fun than any other programming thing I've ever done. I don't have any real problems to solve so I just learn about various things and make nonsensical toy programs that include all such functionality.

You know, I don't think that's a scalable solution we can work with by integrating with our testing framework.

Do you have any other ideas?

That's awesome! Is it basically a repl that can execute shell commands? Or does it support more sophisticated things like piping, input/output redirection, background / foreground jobs, and shell control (ie, can I run emacs / vim / nano from it)?
I'm pretty interested in this!

>get degree
>2 years experience
>no word on testing
Could someone help me set up an automated testing environment? I was thinking about Selenium but I'm so lost when it comes to the world of testing. I don't really even fully understand how automated testing works and it's weird how difficult it is to learn about in comparison to anything else programming.

>help me set up an automated testing environment
no.
>how difficult it is to learn
because tests are specific to your use case.

There's a simple way to teach the concept of tests from the perspective of autistic mathfagging, but you don't seem like the sort that's into computer science theory.

I'm assuming you're trying to test a website? Can you give some more context(or better yet, a project on GitHub)?

It’s just an repl atm.

can i make graphics in haskell

Oh awesome! Did you make the lisp yourself?

Functional programming is programming that functions.

Yes

wiki.haskell.org/Applications_and_libraries/GUI_libraries

hello my friends can someone post that chart that has project ideas? thank you

Attached: 1491581328575.png (540x432, 154K)

is this what you're looking for? projecteuler.net/archives

I think he means these

Attached: g projects 4.png (3840x2160, 1.61M)

There ya go.

Attached: 68747470733a2f2f692e7761726f73752e6f72672f646174612f672f696d672f303536362f35302f31343734313430303938 (3840x2160, 1.61M)

looks hard and boring

Very cool, man. Thanks for making the source available. Looks clean and a good resource if I ever have the guts to attempt something like this. I'll be watching your development!

thank you yes

Attached: 1495394321364.gif (400x226, 535K)

is this the 'thick solid tight' of Jow Forums?

Attached: 1469495586816.jpg (500x489, 37K)

I want to install a Linux distro so I can get used to it before I get booked up with other matters of my uni, and really like the way Gentoo looks, but I'm a complete Linux and technology altogether newbie. will I be fine with it or I should just go for Ubuntu? is Gentoo just a Jow Forums meme?
for reference, today I learned how to fucking run a python script through the cmd prompt. I'd be willing to learn desu and for now I have the time, but I want to know if it's worth it

unironically arch
installation and maintenance is piss easy
you can install literally anything you could install on any other distro on it
huge community means tons of answers available on the internet whenever something breaks

No, just complementing the lad.

Gentoo will probably take you a while to install(you have to compile it), and you will be following a manual. Not much fun. You should stick to a more newbie-friendly distro, such as Debian.

>thick solid tight
what?

t. not gonna make it

i wrote bubble sort in assembly today

>College dropout
>Have job
>Near my hometown
>Make 90k
>Beautiful fiancee
>Good health
>Fun hobbies
BUT
>Work with enterprise Java every day

I have a pretty ideal situation, but holy shit does going to work make me depressed some days

Attached: 1493966137541.gif (948x543, 142K)

I would gladly work with enterprise java everyday if it meant i weren't lonely all the time

At least it's not PeopleSoft

Terry cucks BTFO

How the fuck can there be no good way to report the analog buttons? Can't you just give an int value from 0 to whatever maximum resolution the controller supports?

Ordinary buttons are binary, it's either pressed or not. Analog buttons have many degrees of pressed depending on how hard you press it.

oof

I started dating her way before I was employable. It's not the job that gets the women

Die.

Attached: 3005B116-6E0F-47DD-A8F8-E9F63CF58052.jpg (638x633, 32K)

Are there any libraries or frameworks out there can get updates to any /dpt/ thread? I was looking at the public API but I was wondering if there are any projects out there that do the job better.

Attached: abortedgf.jpg (680x639, 58K)

Just any project so I can learn first hand. I was thinking of setting up the environment and just creating different functions and seeing how to test them properly so I can learn. Language I was wanting to use was Python.

Once I understood that I was gonna try Unity, React, Node with C# and JS

Who the fuck aborted my gf?!?!

Attached: helvetin perkele.jpg (205x246, 8K)

Is an HTTP API not enough? what do you want from it?

a.4cdn.org/g/thread/70132173.json

was meant to reply to
my bad

that one looks dope as well, will give it a chance. thank you! hopefully it doesn't need to be compiled because I don't know how to do this yet

but that one only accepts open source stuff, doesn't it? I don't know what that entails or how far it goes honestly, but I it is the only reason for why I'm not considering it for now

Getting updates isn't really possible (you just have to update the page and ignore everything you already have). The json response kind of sucks (the text has html tags). I could just use it but I was hoping for something just a little bit better.

Oh you're right it is shit

Couldn't pressure information be placed in the input event's "value" integer?

The values for EV_KEY are always 1 and 0, which is weird because bools should be UINT_MAX (-1) when true. You could report digital buttons as 0xFFFFFFFF and 0x0 for true and false, and report the axis as a number in that range. It's still either true or false if you test if (value);

Attached: hid-sony_changes.png (949x316, 55K)