/dpt/ - Daily Programming Thread

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

Other urls found in this thread:

edx.org/course/how-code-simple-data-ubcx-htc1x
en.m.wikipedia.org/wiki/Shebang_(Unix)
docs.python.org/2/library/parser.html
moonshinejs.org
twitter.com/AnonBabble

making a difference

Fuck off, tranny

Why is Python so fun bro?

Report and ignore tranny threads

Real new thread:

you can delete that shitty thread now

Give me one (1) reason why you would ever need to write matrix math in c macros and not in c++ templates.

But there's no traps.

I am thinking about artificial intelligence and neural networks.

dont eat chips youll get fat like a sysadmin

>Idris doesn't have linear types
>Haskell doesn't have linear types
>Scala doesn't have linear types
>Ocaml doesn't have linear types
Why is FP such a failure?

It would make daily system administration thread

you would need to do that if you were programming in C

Working on this.
edx.org/course/how-code-simple-data-ubcx-htc1x

I'll be writing a rather simple internet-facing application. It will receive a moderate amount of requests, and interact with other TCP services and serve a web page (presumably as CGI). What language should I use? Does Perl have something like epoll? String handling in C is a pain, so I'd like to avoid that. Also language with dependencies, but Perl is installed mostly everywhere anyway.

No one cares

kys fag

>sepples
>good

Which is better, implement concurrency as a language builtin or implement as a library? pros and cons?

language standard.
Everything as a library is fucking atrocious.

>crippling yourself because you're too autistic to use less than all of the featrws all of the time
You have no argument.

sad

def from_bytes_to_string(s):
"""
Portable bytes to string
"""
return s


def from_string_to_bytes(a):
"""
Portable string to bytes
"""
return a

Fighting with build systems here. I have some dependencies as .zip files (which contain .lib and .dll files) I want to download when my git repo gets cloned on Windows. My application is built from the command line with nothing but the Visual Studio tools so I would like to be able to download and extract those files automatically.

Is there any way to do this automatically on every system of Windows? I can inject a script into a Makefile for nmake but there doesn't seem to be anything like wget for Windows. I tried a PowerShell thing I found from StackOverflow but it doesn't work with https addresses. Would appreciate some help.

>imgui is horrible
Elaborate? What's the specific problem?
For lightweight-UI (can't even think of a UI that wasn't this) responsive applications it's pretty great in my experience.

Have you tried to understand the eigen library?
It's very messy. (although pretty cool in what it does and it's complexity. Simplifying math through templates is 'nice')
Either of those options are just bad ideas. Use a real metaprogramming library for that stuff.

I have come up with my own program to transform 10s in 0s and putting them to the right.

am I a prodigy coder? Should I get a CS degree?

what is the best crossplatform gooey library for C?

Hello, not sure if I can ask for help, but I got into this stupid issue in Java while making method. And it doesn't let me compile. I initialized variable but at the end of the method I can't return it.

SDL with nuklear, GTK or libui

nvm im fucking retarded, just saw the ) as i posted

nvm im double retarded ) is supposed to be there. pls kill me im so fucking embarassed

Say I have an array of vertices, normals, uv coordinates and drawcommands for a 3d model in c++.
Whats the simplest methods of displaying the model?
Ive gone through graphic engine tutorials for a video game Im working on, but doing that again just for a model viewer seems like a hell of a lot of overhead.

Please do the needful

That's pretty impressive for a beginner.
I would say you definitely have the potential to become a great programmer. Keep going.

Can you read? 'tax' is only initialised if certain conditions are met, meaning that by the time you return 'tax' it may not have been initialised. Initialise tax with some sort of default value.


Also fix your indentation

It seems like you accidentally forgot to put your opening curly braces on a new line

oh fug, how did i not see that
thanks

>linear types
But Idris and ATS do, user!

Jesus user, I hope your not a CS major. I don't anyone would hire someone who is this much of a brainlet

Does Sup Forums dream in code?

I know this shit is asked all the time... But what are some general use cases of closures? I understand the common example of using them to implement privacy in languages that don't have it built in, but I can't think of any other time I would use them.

no i started like two weeks ago

just spent $80 on a text editor

must be some fancy text editor

int tax = 0;


here you go oniichan

it's ok

Sublime?

Why not just use VS Code? Does the same stuff and it's free and open source.

nightmare

/dpt/, I need some help

tl;dr can any perl wizard convert this crap (prints all options found in a manpage) i hacked together into a perl oneliner so I can learn something?

just freshly started with perl

$ man cat | grep -Po '^\s+-[A-Za-z0-9_?-]+|, -[A-Za-z0-9_?-]+' | perl -ne 'print unless $a{$_}++' | perl -pe 's/\n//; s/,//g; s/\s+/ /g'

>am I a prodigy coder?
no
>Should I get a CS degree?
yes

wxWidgets, generates native code

poly←{⍵⍵∘(⍺∘⍺⍺)/⌽⍵}

Will Lua become the next language of the web, or at least one of the most popular ones?

Some consider this a style.

how easy is the job of IT technician in a company?

Started learning how to code Java, didn't realize that I'd been doing that sparingly to mod Victoria II though alas. I know nothing about coding otherwise and are just doing it to seem cool and masturbate to my sense of superiority: pretending to be one of those high-tech anime hackers that always appears calm, collected and incomparably resourceful during the despair-event horizon - maybe even scolding the main characters for their irrational behavior. Alas I recognize that I'm not even a minor character in my own life though the vicissitudes of my ego implore me to learn multiple programming languages. Verily I ask you to give me a quick run-down on where the best websites to learn programming for free are - I've currently completed the first tutorial on CodeAcademy though I'm certainly not paying for pro given the assumption that minimal investment in subscription fees provides less a liability for the future (that and I'm a "cheap-skate", as they say).

I have two questions:
1: How can I run a python program from the system instead of the .py file? ie "program" instead of "~/Python/Program.py"
2: How can I choose a file to run a python script on, instead of running the script and then putting in a file? ie "pythonscript blahblahblah.txt" instead of "pythonscript" then putting in blahblahblah.txt

This weekend I'll be making a program that aggregates news and sends it by mail.
In Scala obviously...

1: put it in your PATH
2: argv

Thanks, I think I can figure it out from here. I just couldn't figure out how to word the question so that a search engine would show what I need.

What is the difference between a program and an app?

1. Rename the .py to whatever you want the program to be and put "#!/usr/bin/python" at the top of the file (assuming Linux)
2. Use argv from the sys module to capture command line arguments.

>1
Theres many ways but en.m.wikipedia.org/wiki/Shebang_(Unix)
Is a common method.
>2
Are you doing input after the program starts right now? If not docs.python.org/2/library/parser.html
Or just read sys.argv

>Linux
What do you mean? Android?

One is made in C, the other in C#, Java, etc.

Good idea or bad idea:
Have Go be the target for a better program language with generics, some functional features, and more comprehensive threading and communication primitives. Go++ essentially.

Go might be shit, but the runtime is awesome and the language is simple enough to be a target.

A program runs on any device. An app runs on a portable device.

Nothing. App is just shorthand for application and has been in common use for a long time.

A program is a program. An application is an addon (also a program) to another program.

Program is a broad term.
App is a term people use to sound more hip when they want to say application.
Application in the context of software means software program.

No, unfortunately not. A shame really, it doesn't have any super retarded features.

program is how programmers call ther programs
app is what post-millenial rockstar developers call their nodejs/electron things

If only. In many ways it and JS as similar, but Lua isn't shit.

A decentralized imageboard.
Every post gets stored in a blockchain.
There is a fee to post replies / create threads.
You will get shitpost coins by lurking more and mining blocks.
The blockchain would only store text so images would be urls that would be rendered in img tags in the front-end.

What makes Go acceptable is its standard library. It's easy to use and provides enough functionality for writing web based applications.
Go is shit in all others aspects though. It's FUBAR

Can we use lua for the web now? I'd be happy to
Do it. I hate Sup Forums.

Horrible, horrible idea. FMS already exists, it solves 99% of the problems. You need to solve the namefag problem though, I recommend ring signatures.

A program is simply a program. "app" or application is a nominalization of what a program does.

>gigantic binary files
>good
You already have C--, isn't that good enough?

app is a invention by apple to have somthing which is cooler than regular programs

its basically a meme

one is written in C, the other in JAVA

>A decentralized imageboard.
cool
>There is a fee to post replies / create threads.
kys

>there's a fee
You don't seem to understand this at all.

enlighten this brainlet

>incentive for not spamming or make shitty posts
It sounds pretty good to me.

Is it wrong to use abort()?

fucking SJW don't mix your politics with programmming

Anyone here really good with Excel conditional formatting? Need to run a format for a deadline dates and i'm running into a wall.

>FMS
You mean the shit where the proof-of-work is manually solving a bunch of captchas?
Yeah it sounds great.

>Excel
>>>/normieville/

That's wrong, you retard. The captcha is default, but a node can specify what type they want to generate. A node could replace it with a PoW algo without changing how the network works, but the captchas work well enough since they're only used to register an account which can be banned if they spam.

captchas need to die, find a better solution

Did you even read her post?

Yeah C-- has a scheduler. Totally the same thing.

moonshinejs.org

Any ideas?

It would be a fee in the cryptocurrency used in the blockchain.
It would affect new users who have not lurked (mined blocked) or people trying to spam posts.

install gentoo

Put the dependencies in a git repo, make the dependencies a submodule. So after a clone run a submodule update --init.

Captchas are the best solution that exist, and you only need to do it once anyway.
It costs $0.001 to pay to solve 1 captcha. You need to solve 10 for FMS, so $0.01 to create an account. Monero gets a hashrate of 90h/s on a fast CPU. You would need to mine for 1.47 hours to get the same identity cost. Captchas are easier, and a non-issue anyway.