Let's not bother other Veeky Forumsentists here and concentrate all computer science discussion here...

Let's not bother other Veeky Forumsentists here and concentrate all computer science discussion here. Both theoretical and applied CS discussion is welcomed here. Discuss algorithms, implementations, programming, operating systems and more.

Other urls found in this thread:

cs.cmu.edu/afs/cs/academic/class/15251/Site/current/Help/latex.html
news.ycombinator.com/item?id=14676505
twitter.com/NSFWRedditVideo

Can Knuth be considered a form of anime?

>Learnt to program
>Realised that no programming projects interest me except making games
I'm a wee brainlet after all.

Trying to get into low level programming. I made a Brainfuck compiler in AT&T i386 assembly and started playing Shenzhen I/O (I have to admit it gets pretty hard from the sandwich assembler on). I also did a bit of OpenGL and plan on switching to Vulkan when I have finished my current project (for which I also have to learn to use this piece of shit Xlib).

I never understood this fad among meme computer scientists of considering highly abstracted bullshit as the holy grail of computing (constraint programming, OOP, functional programming). Computers work in a purely imperative way, and everything that gets attention nowadays for generating high performance, lightweight binaries is made in C or in Assembly.

The whole point of a computer is to get it to do things without doing them yourself.

>meme
>p*pe

You never understood it? You don't understand the value of abstraction? You don't understand that to use concurrency safely you need type safe programming languages and not basically obsolete languages such as C and especially not in assembly? You don't understand that it's easier to prove properties of programs if the language they're written in have certain properties? Just stop memeing you wannabe hacker. You're still at the "playing videogames like Shenzhen"-phase and already you are developing elitism and arrogance?

>memeing
see

>enter college hoping to learn how to program so I can make games
>realize that making games is a pleb activity

Libraries allow you not to do everything yourself while being entirely imperative/procedural.

>You don't understand that to use concurrency safely you need type safe programming languages and not basically obsolete languages such as C and especially not in assembly?
You need to modularize your code and keep it simple, you Rustfag.

>You don't understand that it's easier to prove properties of programs if the language they're written in have certain properties?
If you think Lisp and C++ are better for Hoare logic than C, you have a serious problem.

Libraries only work if they've been written already. That might be fine for most people, but for the work I'm interested in it's not enough.

Although I more or less agree with you on types. It's easier to prove general properties about a system if it's untyped, ie I'd rather specify a data structure in tla+ instead of dependent type theory. Personally I view compsci types as a sort of automatic refinement mechanism which is great for certain applications -ie compilers. But at the same time I feel like you're ignoring the economic implications behind writing low level code vs high level code in terms of things like sloc and length of comments. For example, I'd rather deduce properties of code that's been written already from the type system instead of trying to parse a bunch of english.

>Hoare logic

not him, but that's not the only way to prove correctness.

>economic implications behind writing low level code vs high level code in terms of things like sloc and length of comments
Most comments I put in my codes look like this:

When preparing a system call in assembly
>write(stdout, msg, 15)

When introducing a function, if its prototype isn't clear enough
>INPUT:
>[list of variables and their type or role]
>OUTPUT: [description of output]
>TIME: Theta(complexity)
>SPACE: Theta(complexity)

Before a tedious code that becomes crystal clear if you keep the general idea in mind
>depth-first search with order heuristic
>newton's method on f(x) = blah blah blah

I am a huge believer in the "clear code doesn't need comments" idea.

As for SLOC, more lines don't necessarily mean more work or less readable code. A non-negligible share of my programming time is realizing I did a way too complicated crap and deciding on which variables I actually need. Besides, C-illiterates find SLOC-economical code like while(*a++ = *b++); illegible.

>considering highly abstracted bullshit as the holy grail of computing
what you're saying is true. kids who don't understand how the computer actually works are really a damn shame

at the same time, those abstractions can save you a ton of time and energy if you understand how to use them correctly.

tldr ; learn it all.
learn low level, learn oop, learn functional, etc.

>I am a huge believer in the "clear code doesn't need comments" idea.
Aren't advanced type systems even more helpful in that regard? They have a steeper learning curve but to me it's worth.

>more lines don't necessarily mean more work or less readable code
It means more complexity, which will only accumulate over the course of the project.

>A non-negligible share of my programming time is realizing I did a way too complicated crap and deciding on which variables I actually need.
I've never heard of anything like this before. Can you provide an example?

a little more on this

don't feel like you're elite just because you can program in assembly.
programming in functional, oop, constraint, etc. still has a learning curve.
learn it all and then you'll be able to use the best tool for the job when the need comes.

>Aren't advanced type systems even more helpful in that regard?
If by that, you mean strongly typed languages, then no. I tried Typed Racket and got fucking angry the second I realized how tedious making a file parser properly with it is.

>Can you provide an example?
Dynamically allocating matrices or structured stacks when a VLA does the job perfectly.
Using a temporary buffer before writing into a string instead of writing to the string directly.

I'm looking for a way to keep up to date with computer science (mostly programming language design and things like that) research. Ideally a website that provides an RSS feed. Do you guys know anything that might suit me?

Here's one for Veeky Forums:

How do you actually learn TeX?
All I've ever done is copy paste whatever LaTeX code I see from the internet and adjust stuff until it looks okay.
I never really understood how it works or how I can make a nice looking template from scratch or something.
I feel like I'm underusing its power.

Is there like a book or something that goes over the fundamentals?

Also, what's the deal with other stuff?
I see things like LuaTeX and ConTeXt, XeTeX, etc.
If any of them made huge contributions to typesetting, why are we still using LaTeX?

I guess the first step is to make your own TikZ images (function graphs, trees etc.). Then, the biggest leap would be to learn to use LaTeX as an actual programming language (i.e. defining your own commands with conditions and for loops).

Go to any university calendar and look for tutorials in LaTeX they exist cs.cmu.edu/afs/cs/academic/class/15251/Site/current/Help/latex.html

We still use TeX (and LaTeX, which is merely a TeX macro package) because LaTeX is really good at getting documents that look 90% as good as an actual typesetter could make them look. It was no small feat to produce TeX and it's why for math notation anyway we still use it.

The reason for these abstracts is things like dropping in algebraic types directly as a signature in a functional language and inductively proving your program is correct. Right now we are in a declining era of bug filled software, as it is acceptable to push features over correctness. Eventually this is going to stop and everybody will prefer proven programs, and throw out all that imperative TDD/agile/whatever methodology. Architectures are changing too, X86 arch has run it's course and all kinds of severe problems exist and there is research to get rid of it (ARM doesn't count, it's junk too) with highly abstracted new architecture that likely will perform it's own optimization, meaning us writing assembly code will be a thing of the past.

If you want to take true machine level language then pick up Knuth's books. The MIX computer in the first volumes work bare metal without an operating system, you are literally writing programs that manipulate caches directly. This is where there is still plenty of area for research with the OS out of the way (and all it's levels of complexity and bugs).

The later volumes have MMIX, which is a modern 64bit OS expected architecture but the fun of manipulating sequential cache memory is gone.

Any academic journal in computer science obviously. Use sci-hub proxy to access them free.

Popsci sites like Hacker News or Lobste.rs sometimes has good content if you sort through all the PR pushed junk, like today here was a good post about Pony lang news.ycombinator.com/item?id=14676505

>entire thread is about programming
Oh well, we had at least one good thread

Programming is not Veeky Forums

I disagree :)

Commenting the complexity for every function is pretentious. Just from this alone one can already know that you're the smart ass type of a person.

Not commenting the complexity for functions related to numerical analysis is foolish. Just from this alone, one can already know that you're the Java type of a person.

No, I'm an algorithms type of person. Just write the name of the method and if I need to, I'll look it's proof and complexity in the proper paper.