/dpt/ - Daily Programming Thread

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

Other urls found in this thread:

csapp.cs.cmu.edu/
twitter.com/SFWRedditVideos

First for 6502 assembly

Thank you for using an anime image.

When will Haskell get refinement types?

Benchmarking GPUDirect RDMA over PCIe and over InfiniBand.

reposting from old thread:

I'm entering my 3rd year as a CS major... feel like I don't have a general grasp on CS; I can figure out things, and I have gotten an A in all my CS related classes so far, but browsing any kind of CS forum or doing anything more complex than data structures loses me. I've been trying to study on my free time lately, mostly just reviewing basic C++ and Python because my skills have decayed some over the summer, but still feel like I have a super rudimentary grasp on things. Is this normal?

I N T E R N S H I P

What are you expecting to get out of your CS education?

>browsing any kind of CS forum or doing anything more complex than data structures loses me
Specific examples?

>Is this normal?
lol no

i'm getting one this next summer at a reasonably big company, is that where i learn the sick memes?

just to be able to read a thread like this or a similar forum on programming and be able to understand generally what everyone is talking about, to have an idea where to start for any kind of project, etc.

what is normal for a 3rd year CS student then?

>just to be able to read a thread like this or a similar forum on programming and be able to understand generally what everyone is talking about
You are truly lost if /dpt/ stumps you

>what is normal for a 3rd year CS student then?
After my second year, I had already built a simplified C compiler and my own OS kernel (both were classes at my uni).

I really mean to have a general grasp. The specific forums and their difficulty is just semantics, user

I have classes similar to that coming up - I was at a CC for my first 2 years, this upcoming year is my first year at a real uni. I've actually only taken 3 legitimate CS classes tbqh

So is Haskell a language only used by homosexuals and girls, or is it just a meme?

Haskell is used by wizards

>I was at a CC for my first 2 years,
Honestly, this explains why you're feeling a bit lost.

Yeah, our CS department was honestly pretty shit. Sink or swim at uni, I guess

Yes, homos. That is what I said.

>> Haskell...

Used... kek

Daily reminder that IO monads in Haskell are stateful containers

Currently working on some Google Apps Script add-ons for work. Working on some android apps in my free time.

tfw ur codan

tfw ur codan

Don't listen to these faggots. You don't need to know any of the shit these weebs talk about to get a real job.

Everyone has different starting points, but unless you're gonna get a masters or PhD, a lot of the under the covers stuff is meaningless.

Made a thing in Mathematica to look at the poles and zeros of a transfer function and its projection of a Bezier curve to demonstrate Cauchy's argument principle for a control systems class.

>all those parameters
>all that nesting

Nesting is one of the key methods of generating information in Mathematica. Things like
someFunction[arg, option]

will pretty much always give different results than
someFunction[arg, {option}]

or
someFunction[arg, {{option}}]

and so on.

Sure, maybe if you're working webdev, but every other field requires some actual competence.

I remember learning a bit about that in my controls course. Neat stuff.

>someFunction(...) is distinct from x = ... in someFunction(x)

> What?
> Can you give an example of a program like this?
> I've never seen this before
> is it a new thing in windows 10?

It's been here since Win8. But it's never been turned on. Even on current Win10 it's not on by `default`. But the policy exists.

Let me power up my Win10 VM, and I'll show you.

As seen in WinDbg which is kernel debugging the Win10 VM. The Signing level policy is set to 0 from SeILSigningPolicy.dll, which means anything can run. But if I change it to 1 (unsigned code can run), 4 = authenticode (signed by anyone with valid root cert), 8 = microsoft signed code, 12 = (windows code only - e.g. windows store apps allowed like metro calc). And in the future who knows if Windows decide to change the default value.

DRM in the future will move probably to signing policy 8, only Microsoft signed code and above can run in that booted OS. Prevents people with screen capturing tools without microsoft signed code (because why will MS give those tools certs unless they can give a good enough business reason).

So yeah, that is the future where DRM will head to protect itself from capturing tools.

Hi /g
I am working on a wordpress plugin and was told not to enque google jquery

for the life of me i can not enque wordpress jquery

this is the google enque that works

function abc_jquery_enqueue() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js", false, null );
wp_enqueue_script( 'jquery' );
}
if ( !is_admin() ) {
add_action( 'wp_enqueue_scripts', 'abc_jquery_enqueue', 11 );
}

this does not work
function textdomain_load_jquery() {
wp_enqueue_script( 'jquery' );
}
add_action( 'wp_enqueue_script', 'textdomain_load_jquery' );


can anyone enlighten me as to what i am doing wrong, or even share a snippet. Thank you

Oh yeah, let me show you the example of a block. Cffexplorer.exe is an unsigned program. Let me change that policy to 8 (MS signed code only). And notice the error in the screenshot, it blocked it from running as it's not signed MS code.

That's just sugar since
a = 1;
b = 2;

gets translated to
CompoundExpression[Set[a, 2], Set[b, 5], Null]

>that's just sugar
>literally my complaint

hm
so in the future everyone who uses windows and wants to pirate software will also need to obtain a tool that will bypass the windows authorization shit, like RemoveWAT
still though, the future of DRM is getting even more bleak

I'm being facetious. I recognize your point, I'm just very lazy.

Even RemoveWAT will not help. These signing policies checks are done in the kernel itself, and secure kernel booted and protected by HyperVisor can override your changes.

Secure kernel has higher privileges than you. Secure kernel code has higher privileges than SYSTEM. And you can't elevate to the secure kernel, like you could to SYSTEM.

Win10 as much as there is telemetry and monitoring, is really locked down and secure from "unauthorized" intruders and malware.

>mathematica
>MATHEMATICa

>imperative

How the hell do I debug a program that will compile in debug mode but not release mode.
I dont even know where to start.

none of that matters because the user will always be able to modify the things on their system
perhaps it will be slightly more complicated, requiring you to boot from a usb and run a program that modifies your windows installation
and eventually the pirates will streamline it to make it simpler for the normies

1. Read the error message carefully
2. Find an interpretation to it
3. Figure out a sequence of actions that might solve that
4. If it passes, exit, if not, go back to 1. with the new knowledge you have.

Since knowledge is increasing, this algorithm is proved to terminate.

>is that where i learn the sick memes?
No, that's where your love for programming dies.

> none of that matters because the user will always be able to modify the things on their system
Not on Win10. The user/admin is restricted. The flow of control goes:
Hypervisor -> secure kernel -> *kernel -> *usermode
Everything with a star next to it, can be controlled by the user/admin, so kernel can be accessed if you elevate to NT\SYSTEM.

Secure kernel is proprietary locked MS code. You can kernel debug it like I am from a VM. But from within usermode/admin/system, you can not access it easily, unless every pirate will start shipping vbox DLLs and requiring you to put WIN10 in a VM to use there software, it's not as easy as it once was.

Not saying it won't be impossible. But your generic video capturing tool etc is not going to cut it for Win10.

> perhaps it will be slightly more complicated, requiring you to boot from a usb and run a program that modifies your windows installation
EFI will stop you from modifying Windows. There is an entire chain of trust from boot to loading Windows 10 SUBSYSTEM.

> and eventually the pirates will streamline it to make it simpler for the normies
Pirate jobs have just become 1000x more difficult. You'll need exploits to get to secure kernel. And with MS instant updates with no choice to refuse. Exploit windows are very small. And people who find exploits nowadays won't be so quick to deploy them, as blackmarket from gov, to ruski, to chinks, all looking for nextgen exploits against there competitors and willing to pay big bucks.

Windows 10 when all this insanity is turned on, is an extremely secure OS.

Its an indecipherable linker error telling me there a problem with a function. But if the problem was with the function it wouldnt compile in debug mode.

Simplest solution is to torrent the cracked windows from said pirates
Then only 1 exploit is ever needed, because everyone can use that version and improve it by disabling windows update, packaging it with the good updates, etc

Family and race traitor. I need your spiritual guidance.
I want to make an application to manage files on my file server. Adding/removing/listing files is all it should do for now. Nice to have features are user management and RSS support.
So that leaves me with two options: writing a website or client/server application. A website runs on anything that has a web browser, but requires me to write HTML/CSS which I don't like. A client/server application gives me the option to write a native client, but requires me to write a client for each platform I want to use it on (desktop, mobile) and maintain the code base.
What should I pick?

Create the website with python +Django
Prablem salved

Is XML saving the world soon, Sup Forums?

Before you bury me under a flow of insults, let me explain: I'm an Emacsgoer since birth, I've been using Org mode to try and write down and encrypt both transient items of my day-to-day life and permanent traces of important thoughts I've had, and I'm not all enthusiastic about its structure, especially in contrast to the XML I've seen during my internship. It comes down to several different things that IMHO break with the files+text based approach, namely:
- the markup syntax, yet another reinvention of Markdown with its own annoying idiosyncrasies, whereas XML was made to be a clean, robust, and extensible syntax precisely to mark up text.
- the PGP layer: maybe 3 ways to go about it, can't encrypt stuff you append without decrypting everything, or it becomes a mess, whatever. And attached files on top of that. I sense that an encryption plugin inside a nosql database would blow it off the water, amirite?

- directory or heading? inline code/data or attached file? the distinction should not exist, yet I don't know what to do as Emacs naturally chokes when files become too big. So where do I split up? And that literate programming support, omg... It works with simple expected use cases, but then you fuck it up or you edit something you shouldn't have...
- Orgmobile... OMG don't get me started on it. No offence, but SOAP+XML would have almost guaranteed a trivial mobile app that just works, no? Instead we have fragile-shit-over-ssh... ssh on fucking mobile phone ffs!
- A DB would be infinitely more efficient at packing archives and moving attachments around, it's hundred times researched, why reinvent the wheel?

Org mode is definitely free software, but it's definitely not open as it easy to extend like XML is. Anywhere I can look into to find a general hierarchical organiser that's freedomic and self-hosted? I'll say it, web technologies are far better at abstracting common basic stuff than whatever design principles GNU might have had... Please don't hang me!

You guessed it...

...

...

...

INSTALL GENTOO!
t. my computer actually belongs to me.

I was thinking about using Go since it has everything I need without using 3rd party libraries. How is Python + Django going to help me?

no, consider iOS
there's a piece of immutable firmware which checks if the bios code is signed
the bios code then checks if the bootloader is signed etc.
the only reason jailbreaks exist is because of bugs in trusted code. there's a huge attack surface since you have physical access to the device and can do all sorts of things.
this is trust chain for boot is coming to PCs as well.
The best part is that free hardware has issues as well since if the user can change bios code, then so can malware.
And there are already freely available proof-of-concepts of various firmware/EFI/bootloader malware.
It's a lose-lose situation pretty much

Because it allows you to make a website without writing any html which is what you wanted

playing with sockets

Google shit related to the general structure of the error, the language you're writing in, and the tools you're compiling with. Is it that it can't find this function or that it can't find something it needs from within that function? Surely something is misconfigured in the parameters for the release variant for reasons beyond your reach as a luser, as is consistently the case with modern shIDEs.

I'll look into it.

or whoever knows what code runs on ME/whatever amd has

>jquery.min.js
problem is you are not calling it into the header, thank you for solving this and please share.

Ya rite. I guess that, as Apple becomes a PC vendor like any other in my view (yuno, same hardware, OS is just icing, and no-OS/GNU-Linux is becoming easier to find), we the elite will diverge to use fundamentally different machines with maybe a different architecture, but at least ones that can't run Winfuck because they aren't treacherous enough. That would be a situation where open hardware computers (Librem, Novena, Ubuntu, whatever) become the new macs while wintards don't change the least bit. Perhaps?

t. haters gonna hate

Yesterday I added a mini player view to the r/a/dio app.

Working on my xscreensaver replacement.

Currently adding support for XRandr and DPMS extensions.

Picture related, screenshot of the saver I'm going to use.

Have you used Hadoop yet Sup Forums?

>Java based

no
seems useless outside of clusters, and most people here don't use those

I'm not familiar with C#, but would it have any problem running with Mono on Linux?

Please, PLEASE don't forget the fully working phosphor pty! Pretty please?

>Java

Hello Graphic Programmers

Am I wrong to assume that an Index Buffer isn't worth it if the object only has four vertices? Trianglestrip.

A person opened an issue exactly about that, I don't think it will work since Mono doesn't provides the WPF framework, and prolly NAudio doesn't works on Mono.

I'm not going to remake any of the xscreensaver hacks, but I am likely going to add a support layer for them, so you can just use the already existing plethora of them.

Can someone post a link to a collection of general, good CS pdfs? General books like pic related; it's annoying trying to find pdfs for individual books when I know someone out there has a google drive or a github where I can download a zip of all of them and delete what I don't want

Oh well.

>NEET

>What are your working on, Sup Forums?
learning good stuff compared to you cs-fizzbuzz-pros :^)

>PAJEET
Are you dealing with at least double digit TB?

libgen.io has all the pdfs you need

this is also a good book, if interested in binary/floating point/assembly/optimization/memory/systems ect. It uses C for example code csapp.cs.cmu.edu/ I used the latest version in a CS class I just completed, the older editions are 32bit you want the x64 version.

No quality version on libgen I don't think yet, actual book costs ridiculous money

Yeah everything basically says it can be impossible to determine the error. Only useful thing is that the difference between the release mode and debug mode could a difference in symbol maps.

No. It's pretty standard to use just a vertex buffer for quads or triangles, obviously a buffer for UVs will become useless aswell.

>learning good stuff compared to you cs-fizzbuzz-pros :^)
blinking diodes?

As if anybody who knows Haskell isn't aware of that fact...

Yeah we all took that class in freshman year too

>using NAND gates for a flipflop
>using a shift register
>using ADC conversion on atmega8a
>using diodes to verify everything :^)

no class. just interest, m9 :^)

Seriously, stop wasting your time. Fizzbuzz is a meme, but at least people are aware of that.

yeah, I see a really shitty scan of it. i will check it out though, thanks for the info

>learning useful stuff
>waste of time
:^)

Gracias amigo

How is va_args implemented in C?
Is it part of the language, or is there some preprocessor magic that turns the ... operator into some magic that takes an arbitrary number of arguments like what printf does?

care to inform any of us how this is useful

probably just uses everything pushed onto the stack from the call

>care to inform any of us how this is useful
this in particular is not useful, but creating a good knowledge base on microcontrollers can someday be useful.
Making simple projects which use all kind of crap in a microcontroller helps, m9

>this...is not useful

okay

I've done internships for the last few summers. I didn't learn shit besides how to work at that particular company.

If you want to learn more do research over the summer. I hope you go to a good school.

Unless you're young and planning to go for EE, I doubt it'll be more than a hobby.

Haskell is a trick to get "goyim" to waste their lives on something useless.

>b-but le Indians can't use Haskell
Neither can anyone else.

>being this mad you don't understand such a simple language

>it can be impossible to determine the error
Wtf are you working with? No seriously what is this platform on which link error are unsolvable? (and also whatcha gonna do?) Care to post details so we can all avoid that fuckery like the plague? Thank you very much.

nice meme son

>neither can anyone else
This is obviously untrue, so you must be generalizing based off of your own personal experience. Since you are incapable of understanding Haskell, you would do best to keep your half-witted opinions to yourself.

... is a special operator. The implementation is compiler and platform specific. On Linux with GCC and Clang the first 6 integer arguments and first floating point argument follow the standard calling conventions, everything else gets pushed onto the stack. The compiler generates the proper code for each call of va_arg whether the data is in a register or on the stack.