/dpt/ - Daily Programming Thread

Old thread: What are you working on Sup Forums?

Other urls found in this thread:

github.com/Gikoskos/WinKeylogger
chapel.cray.com
en.wikibooks.org/wiki/Haskell
shodan.me/books/Electronics/
github.com/vhf/free-programming-books/blob/master/free-programming-books.md#computer-vision
reddit.com/r/haskell/comments/516htg/learning_haskell_as_a_category_theorist/?st=iy574e5z&sh=fdd3d8fd
twitter.com/SFWRedditImages

First for D

Sounds gay, tbqh
Who would want to learn "the D" language

Fuck you for using an anime image

Steve ballmer did nothing wrong

I did this windows keylogger library thingy where you can use a keylogger in your application quite easily and just get logged keystrokes github.com/Gikoskos/WinKeylogger

it's in C. What do you guys think?

Thanks for using an anime image

your mom would love to learn about it from me

She would, but my mom doesn't use kiddie garbage collected languages.

...

why does she wear the mask?

she isn't wearing a mask

>What is Chapel?
Chapel is a modern programming language that is...
parallel: contains first-class concepts for concurrent and parallel computation
productive: designed with programmability and performance in mind
portable: runs on laptops, clusters, the cloud, and HPC systems
scalable: supports locality-oriented features for distributed memory systems
open-source: hosted on GitHub, permissively licensed

chapel.cray.com

I'm finishing up second year of a electrical engineering course hoping to go into robotics at the end of all of this. Should I be spending more time learning lisp or C?

at least you can talk. who are you?

>Robotics
Python.

What if I don't want to learn a shit language?

Well, you tried

learning me a haskell for great good

there's this too
en.wikibooks.org/wiki/Haskell

Help Sup Forums please...

I've used C# for about a year now and I'd never made a non-trivial/practical program.

I've tried Lua for gamedev with Love2D and that was the first time I've ever actually got something on the screen.

I've dabbled in C making trivial programs and fumbling with retarded shit that was a waste of time.

I bought "Programming: Principles and Practice Using C++ (2nd Edition)" with the intention of actually learning a programming language and learning how to actually program but I kept getting stuck and not being able make projects that do anything, not being able to use multiple files (the concept of using headers/linking shit/ defining shit etc just doesn't make any sense to me)

Is there a language I can use to learn how to program that has a simple workflow, compact standard library, and is robust/practical for actually making shit?

The problem could very well be lack of effort or competence though. I'm also learning alone with no sort of schooling.

I'm not saying it isn't important, but writing
seems pretty useless IMHO.

Probably, I'd ask somebody in that field though.

I need some image filter ideas.

i'm learning it too but i'm too far into LYAH to switch at this point. which chapters are done better in wikibooks?

C# is very practical
If you want to maek gaem, I believe Unity3D uses C# running on Mono or something to that effect.

One that turns any image into anime.

i've heard the wikibook can be a bit slow, but it's more up to date than LYAH
if you have issues with LYAH try looking at the corresponding wikibook part

if you don't mind: what has changed in haskell over the years?

I wrote a Racket macro that defines procedures and saves its definition as a list inside a struct.
For example:
(λ-define (foo a b . c) (append (list a b) c))
(λ-access-list foo) ;=> '(λ (a b . c) (append (list a b) c))


What I'm trying to do now is get it to recognize currying so that
(λ-define ((add n) m) (+ n m))
(λ-access-list add) ;=> (λ (n) (λ (m) (+ n m)))


I've written the code so I can take ((add n) m) and turn it into the list, but my biggest trouble is getting the macro to define the new identifier without polluting the namespace with intermediary calls to define.

go away

what is the best text editor and why is it atom?

C++?

a fair amount, if you see any real haskell code you'll notice at least 10 GHC language extensions being used

here are some common ones

>no monomorphism restriction
>GADTs
>existential quantification
>rank n types
>multi param type classes
>flexible instances
>flexible contexts
>type in type

plus Prelude has changed, particularly in GHC
so a few constraints are shifted around,
i think there are examples in LYAH that might not compile or might be unnecessarily restrictive

stay
and thank you for using an anime image!

A zillion extensions that will never be as good as starting from scratch with dependent types.

Given the number of languages you've worked with, you could probably say you already "learned how to program." Your interest now is in making practical applications, yes? Any of the languages you've learned will be fine for that task. You just have to figure out what the hell you want to program, and what 3rd party libraries you want to use to accomplish that.

thank you for using a karen image

thanks. i need to sit down and catch up on this sometime
i work in math -- a category-heavy branch, even -- and people always say haskell is a natural fit. imperative programming and math do not seem like the best possible friends to me but i can never get into the alternatives
maybe today is the day

shodan.me/books/Electronics/

github.com/vhf/free-programming-books/blob/master/free-programming-books.md#computer-vision

what's the male pattern baldness of programming languages?

reddit.com/r/haskell/comments/516htg/learning_haskell_as_a_category_theorist/?st=iy574e5z&sh=fdd3d8fd

Go

...

What's the 2003 Toyota Celica of programming languages?

Ruby

I'm working on my decentralized internet TV system (source code is )

I'm working on stats collection in the protocol. Every item sent over the network has IDs, and IDs can form linked lists if they make a stream (video, audio, captions, etc). Every item that comes through a socket has the ID listed as coming from that socket in a vector (will rework to make more efficient with Tor). When an ID is tested for the likelihood that a socket has it, each of the IDs have this linked list followed until the local supply of IDs ends. The odds of them having it is currently the absolute inverse of the shortest linked list distance (no finding is 0).

I'm working on a not stupid algorithm for the previous paragraph and how I can effectively compare this against request response time and bandwidth (request response time takes into account decryption, decompression, and node speed more than ping time).

GitHub: github.com/Dako300/BasicTV
IRC is #basictv on Freenode (webchat.freenode.net)

Python is the Javascript of programming languages.

What's the AMC Eagle of programming languages?

Java is the javascript of programming languages

>too big
>used to often
>stupid
>pajeets use both

Go back to /o/, you fag.

Which of those don't apply to Python?

What languages should a snake learned?

I already know Python and ASP

Coq

if you've learned python then it's too late

Thanks for using a cancer image.

>garbage waifu

...

s-s-s-s-seeeeee (C)

Lisssssssssp

why all the hate on python in these generals?

I use it daily for work and there's no other language that has the support that anaconda can provide for working with dataframes.

why is equal to "===" in javascript? just to be different from other languages? wtf?

Because people hate mandatory indentation and slow performance, I'd guess.

But it's a very versatile language and it's easy to pick up and just get things going without having to build the wheels just to program a cart, so a lot of "hate" for the language I'd say is just not using it for tasks it performs well.

Because == can do conversions and ends up being a non-transitive mess.

Python is best snake.

Python is worst programming language.

>people hate mandatory indentation
if you're not indenting your code when using other languages then you should kys

as for the performance it's negligible unless you're a gaymen making gaymes, and if you're doing a project of large scale then of course it's better to use a better language suited for those needs such as c or c++.

Perl..in atom..finally got B::Lint to work

It's the little things in Python that make me prefer Ruby for many of the tasks that Python is used for. The non-inclusive range function is annoying as is the terrible lambdas when compared to any other language with them. Also, there's too many methods written __like_this__. I'll use it if I need a specific Python library not available in other languages, but otherwise, stick to Ruby and C++.

I'm looking for contributors and followers in general. If you have any questions or are interested in helping out, let me know in the IRC.

past me would think current me is such a genius. i had to pick random strings from a big list of them, without any repeats. so i just put them into a list, called a shuffle function, and then took the head out of the list X times

nice. modern perl can be a joy to work with, it's a shame that people give it a bad rap

perl is for autists, not even joking

I dig perl..because i can do so many different things...quickly.. its great for prototyping ant just hacking things out to see if your idea can work and its pretty loose syntactically... it appeals to my inner hippie..atom is nice..really customizable and with linting working now makes me happy.

Where should one start for functional programming languages?

Scheme

=== is deprecated, use ====

Scheme if you want a Lisp
Haskell if you want strong types, or don't care about lisp

Scheme/Racket is probably your best bet.

Thanks anons, I'll give both a try. I used scheme once in uni, but never haskell.

if you try haskell use the wikibook

en.wikibooks.org/wiki/Haskell

I need a project, beginner-intermediate level Python, just something to do to get some practice/learn some things. Any ideas?

Discord bot.

Have it fetch lewd stuff from sad panda and share it us.

>first day of intro to comp sci
>hear some guy behind me can't compile a hello world in java because he 'just installed linux a few days ago'

loel

>linux binary is 100k
>windows binary is 6M

#include
#include

extern int aprintf(char * __restrict__ *dst, const char * __restrict__ fmt, ...)
__attribute__((format(__printf__, 2, 3), nonnull(1, 2)));

int main()
{
char *str;
if (aprintf(&str, "%s / %s / %s %d / %s / %lld %s", "born to die", "world "
"is a fuck", "kill em all", 1989, "i am trash man",
410757864530ll, "dead cops") < 0)
return EXIT_FAILURE;
puts(str);
free(str);
return EXIT_SUCCESS;
}

it's nonsense there's no function like this in the standard library, it's about the only thing that makes working with strings bearable.

Learning ASP.NET so I can offer myself up for enslavement to a corporation

What's your intro class cover, mine was just C.

note that by shuffling before every pop you increase randomness and it then still qualifies as a uniform distribution. Why? Because there's work for it.

Java, am pretty jelly

The prof is pretty bad though, she just reads directly from the powerpoints, thankfully I have no problem self teaching/have prior experience so it shouldn't be a problem.

It's time to play identify that function

import Data.Char

main = do
line Bool
isX a =
(sanitize a) == (reverse $ sanitize a)
where
sanitize = filter isLower . map toLower

My class was the same. It wasn't like the prof didn't know what he was doing, he was actually a really knowledgeable guy with tons of experience and he travels the world giving lectures. It was just the classroom experience didn't really give me anything, I actually skipped most of the lecture after 3 weeks.

main = (isX getLine) >>= print

>robotics
Labview.

Yeah she said on the first day she has only been teaching for three years and 27 years prior to that was working for Intel. Feel kinda bad for the people with 0 experience since they're probably already lost as hell

If you're on Windows, definitely give F# a go, it's a very modern and feature packed ML derivative.

Can't you just main = (print . isX) =

Oh, very nice.

How can VS Code be so much better than Atom? I'm surprised MS can be this competent with anything not telemetry

>java
>c

holy shit I envy you guys. my first two programming courses were c++ and vhdl

Devdiv.