/dpt/ - Daily Programming Thread

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

Other urls found in this thread:

pdfforge.org/pdfcreator/manual/command-line-parameters
twitter.com/AnonBabble

1st for C#

second for Python

a game

Visual Novels aren't games.

I am working on a parser.

Nice. Here's some C#.

kys

kys

6502 ASM... I wish my days were like this once again.

no

I know this might not be the thread but somebody shed me some light

I want to print files to pdf in the command line on wangblows and i can't find anything just bloated stuff

>print files to pdf
nice meme

What kind of file, user?

The kind that stores data

What language should I use to build my universe simulator?

I'm learning some JavaScript. What is a beginner project I can work on?

I hope I live long enough to see the day when we can just say "fuck it" and throw away the hacky stuff like UTF-8, UTF-16, UCS-2 and all that crap and just store *ALL* strings in arrays of 32-bit unsigned integers. One array element per codepoint. To those who'd to code for low-memory environments, we could tell them to "fuck off and go get more memory". Those who use the wrong byte order, well, they can swap the bytes themselves.

It won't fix all the shit that's combining characters, normalization and all that, but it would go a long way towards saner world.

UTF-8 may be fine for storage, but when you have to start editing Unicode text... may $(DEITY) help you. You'll soon find yourself in a world of immense pain. Surrounded by character encodings, surrogate pairs, variable-length encodings and other horrors that lurk in the darkness and poke you from all directions. And you haven't even touched the combining characters yet.

---

Why yes, I've been dealing with Unicode and character encodings for several days now. I don't know how much longer I take it. I wonder how many death threats I would receive if I really converted everything to std::vector's. The thought is alluring.

A man can dream.

>porting PHP to Python

I sure enjoy web """development""", I'd rather suck dicks

Whats wrong with this?

I am a beginner so please fuck my shit up.

Node.js

>elon musk
kek

C

while( (cin >> nliteral) != n_word[i])

C, probably. It explains all the undefined behavior that's been ruining things for the past 200,000 years that humans have been around.

>segmentation fault
>the universe collapses
>have to redo billions of years worth of simulation
nah

All of them but i suppose it can only print files supported by the system right?

I am willing to do both

std::iostream 's >> operator returns the stream
(std::cin >> nliteral) returns std::cin
You want
(std::cin >> nliteral) && (nliteral != n_word[i])

The first bit casts std::cin to a bool, which returns whether or not the stream the stream has failed or run out

JavaScript for prototype, CUDA or OpenCL for high-perf implementation. I have tried and abandoned this project though.

Thats what I did but the same error persist.

javascript is shit there's no reason not to "prototype" in java or C++ or C

Well, you would need to leverage a PDF converter from whatever filetype you're working with.

Only Windows 10 actually comes with a built-in Print-To-PDF.

Otherwise, you'd need to install Sumatra or something and leverage it from there.

It seems to be what is driving our current universe, though.

Major error in Human v1.0:
- dnacpy is unsafe. If src does not contain terminator, dest gets filled with cancer. Please use dnancpy.

the error is liberalism

There is a reason: 3-4x shorter dev time due to dynamism, GC and higher order functions, also a very good debugger and graphical environment.

If you write your prototypes in statically typed languages you don't value your time.

Serious people (scientists and engineers) understood these facts long ago, and so they develop their prototypes in python or matlab. Making a high-perf implementation is a programmers' job.

i found this
pdfforge.org/pdfcreator/manual/command-line-parameters
how ever i have to
>install
>set up
>set up autosave
>add file to path
JUST

Basically that is all i want to do but i can't find something that will do it

Windows 7 doesn't have it

>pic
wtf is this shit, maybe it's possible but you have no reason to assume that it's almost certain

there's probably a natural explanation for planck time other than it being the time step in some computer simulation

How does one go about learning (variadic) templates and applying the correct reference qualifiers in C++?
Those things are as unreadable at times as they can be.

Another one of mine "create a Universe" attempts:

Truthfully. Wish we could get rid of it.

Just because you couldnt doesnt mean others cant user.

KILL YOURSELF js is fucking shit there's no question about it, it's not even faster to write e.g. a js function as opposed to a function in other languages, yet you get all the drawbacks and bugs of dynamic shitlangs

>variadic templates
easy
template
auto somefunction(T&&... args)
(T& ... args)
(T ... args)
(std::vector...&& args)
(std::tuple && args)
etc

>correct reference qualifiers
impossible

the only reason you might get 3-4x shorter dev time is if you know js and don't know other languages, if your experience with languages was the other way around it'd take 3-4x longer instead

>a buttblasted C++ fanboi

How is it, still debugging these template "cannot be deduced" errors and segmentation faults? (^:

retard

he's right though, js is shit

>planck time

He didn't mention planck time here, only that given the current rate of technological expansion (or any adjusted rate) that eventually human tech could create a realistic universe.

Nope. It has been proven that functional and dynamic languages make for shorter dev time and shorter code.

Static languages, especially low level pointer-based static langs like C++ are super complex (grammar and semantics wise) and it is not uncommon to see several-level deep template type declarations, see any boost C++ source.

In javascript you don't need these verbose class delcarations just to push some elements into the array.

If you LOVE C++, you are a cuck. Even Carmack approves of dynamic functional programming languages (racket).

but what's simulating the universe that's supposedly simulating us? and so on... is it turtles all the way down?

The problem with most dynamic languages is that they're really just dictionary based languages

>js a shit cause I said so
It's a stupid meme

1) HTML5/JS is a powerful platform that delivers applications to billions of people around the world, it runs on billions of devices.
2) Javascript is a descendant of Scheme and Self, so it is pretty cool language, especially if you forgive it its small defects. Solving the same problem in javascript seems to require 3-4x less code and 2-3x less dev time than solving it in C/C++/Java.
3) Fastest compilers/runtimes ever written for a dynamic languages were written for JS: V8, Chakra, Spidermonkey, Javascriptcore. JS is the fastest dynamic functional language in the world.

>not having a Sup Forums pass™

carmack is an overrated meme almost as much as elon musk

I won't give money to Hiroshimoot until he formally apologizes for Pearl Harbor.

This isn't the problem, this is an enlightened solution to
template template interfact inherits extends class struct accessor getter setter

Let the computer just store your data with type tag, don't be a class-cuck.

What kind of files are you trying to print to PDF, faggot?

That could make your life easier.

MS Office files?

Text files?

It matters.

Nothing can convert 'all files' to PDF.

>haha i called it a meme so he's wrong

>print files to pdf
>All of them

It is the bare minimum of what can be considered a game, but it's still a game.

They're also piss easy to make.

>hahaha dynamic typing is great, watch me compare it to shitty OOP programming in verbose C++

>No constructive criticism
What else did I even expect of Sup Forums, home of college "do mai homework" freshmen?

you're clueless

>home of >do my homework >freshmen
n e w f a g

>Sup Forums, home of college "do mai homework" freshmen
and shitty webcuck retards like you that unironically think js, one of the worst languages of all time, is good

kill yourself

Compared to you I'm not a stupid meme child. I know and use C, C++, JavaScript and other languages. My point is that JS is good for rapid development while C and C++ are often necessary for achieving maximum performance.

Writing everything in C++ is fanboism.

>They stole his code
>He stole their lives

I wonder what he was writing, dpt?

you're using the same algorithms and writing the equivalent code, it's not any better

>unironically calls js one of the worst languages of all time
>codes in C
Hello 1970s user! How is your PDP-10 doing?

(^:

The user will be asked for a file so I just want to print anything it can be any document that's the thing it can be an image xml ms office text

not sure if trolling or retarded

kys

>compared to you I'm not a stupid meme child
>JS is good for rapid developme...

>it's another "lol C/asm" episode
when will people learn higher level languages don't need to be as slow as dictionary langauges

Not needing to write 5-layed declarations for your datastructure and having real higher-order functions and GC helps greatly.

If you don't use these boons of engineering you are cucking yourself.

nice meme shitkid

>hahaha meme
Are you the same guy that unironically posts kys like it's his first day off the boat from reddit?

Dynamic typing doesn't need to be dictionary based & can feature static type annotations

fuck off and die webshit

it's not a game autismo

>when will people learn higher level languages don't need to be as slow as dictionary langauges
V8 is very fast, just 4x slower than C++ on my benchmark.

Perhaps you mean strongly typed functional languages by
>higher level languages
?

I'm not into puzzles, I'm into programming. Sorry.

>Dynamic typing doesn't need to be dictionary based & can feature static type annotations

I agree with that. Optional typing is cool. I used it in Common Lisp, could be done better.

Take notes, loli farming simulator dev-kun.

Explain why they aren't games.

A daily reminder that you wouldn't be able to write picrelated in any language of your choice

... due to lack of algorithm and numeric knowledge

It is written in JS, by the way.
Turns out webshit is better programmer than you (^:

Reminds me of that simulation that has like 80 dicks falling on top of each other.

And then one really long spaghetto dick.

literally delusional and pathetic

I would ask you to use a trip, but it's quite obvious which posts are you.

Anyone else think hobby coding is fun as fuck when on amphetamines?

One of my favorite things to do ever. I get addicted to solving those fucking bugs and optimizing code.

you think those webms are impressive because it's the best you could come up with after "much effort" (for a webshit) and you gave up on it anyway lmfao kill yourself

>dynamic typing is the only solution to type declarations

It is dangerous, you will fuck your reward pathway with this shit.

I bet that thing could run in 4KB of ram if written in C and not 600MB as it currently does.

I'm not even the JS guy you're responding to.

I don't know why I always respond to your bait posts.

You are conflating me with other poster, rageboi

>type declarations are the only problem with statically typed languages

What else is wrong with static typing?

the js babby's first physics engine is not very impressive stop acting so smug about it

>solution to type declarations
What's wrong with type declarations?

Help me out Sup Forums.

I'm trying to create a JQuery function that allows me to change the text color in randomly generated colors every second.

So far, I have
$(document).ready(function() {

spectrum();

function spectrum(){
var hue = 'rgb(' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ')';
$('#text1').animate( { color: hue }, 1000);
spectrum();
}

});


Why isn't it working?

make something new and improved instead of gloating about the same old webms for months on end

They are a pain anywhere but on top level expressions.