/dpt/ - Daily Programming Thread

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

Other urls found in this thread:

learnyousomeerlang.com/content
chimera.labs.oreilly.com/books/1234000001642/index.html
elixir-lang.org/learning.html
fsharp.org/learn
en.wikibooks.org/wiki/Haskell
0x0.st/pbp.pdf
gigamonkeys.com/book
cs.cmu.edu/~dst/LispBook/book.pdf
braveclojure.com/foreword/
ccs.neu.edu/home/matthias/HtDP2e/
realworldocaml.org/
ocaml.org/learn/tutorials/
guide.elm-lang.org/
purescript.org/learn/
reddit.com/r/haskell/comments/5m678s/suggestion_code_of_conduct_for_haskell_community/
daniel.haxx.se/docs/curl-vs-wget.html
cplusplus.com/doc/tutorial/
youtu.be/uiJycy6dFSQ?t=28m50s
twitter.com/SFWRedditGifs

First for bunnies

First for D

2nd for js

nth for diversity

4th for fourth

(n + k)th for diversity

Yeah, Ocaml really is the best lang.

Thanks, this helps a lot. I tried curl in the terminal and it's a start.

Could anyone say something about security when using curl and/or wget? I'm going to learn about these, but I care a lot about encryption and wonder what I have to do to send encrypted requests/verify domains/etc.

Functional programming.
Last /fpt/: →

Resources:
>Erlang
learnyousomeerlang.com/content
>>Elixir
chimera.labs.oreilly.com/books/1234000001642/index.html
elixir-lang.org/learning.html
>F#
fsharp.org/learn
>Haskell
en.wikibooks.org/wiki/Haskell
0x0.st/pbp.pdf
>Lisps
>>Common Lisp
gigamonkeys.com/book
cs.cmu.edu/~dst/LispBook/book.pdf
Paul Graham's ANSI Common Lisp
On Lisp
Common Lisp Recipes
Land of Lisp
An Introduction to Functional Programming Through Lambda Calculus
>>Clojure
braveclojure.com/foreword/
The joy of Clojure
>>Scheme
SICP
Essentials of Programming Languages
How to Design Programs:
ccs.neu.edu/home/matthias/HtDP2e/
Art of the Propagator
Little Schemer
The Seasoned Schemer
The Scheme Programming Language by Kent Dybvig
Realm of Racket
Lisp in Small Pieces
>OCaml
realworldocaml.org/
ocaml.org/learn/tutorials/
>Scala
Functional Programming in Scala (Chiusano and Bjarnason)
Atomic Scala (Eckel and Marsh)
Programming Scala (Wampler and Payne)
Programming in Scala (Odersky, Spoon and Venners)
>Web languages
>>Elm
guide.elm-lang.org/
>>PureScript
purescript.org/learn/

*forth

I find it concerning that clojure examples prefer vectors above lists. Majority of power of lisps stems from the homoiconity --> syntax and prefered data type (lists) are one and same. Is clojure crippled in this regard?

while irony == False:
print('Yeah, Ocaml really is the best lang.')

No, it really isn't.

Haskell is dead:

reddit.com/r/haskell/comments/5m678s/suggestion_code_of_conduct_for_haskell_community/

G I L
I
L

I have a bad habit of discovering a better solution when I'm almost finished coding a different one. I've rewritten parts of my program like five times in the last few weeks

I have a program that generates a bunch of floats I want to analyze

how do I write floats to a CSV so I can open it with libreoffice calc?

Literally not an issue, all you need to do is use multiple processes.

upvoted

fprintf

Be thankful that you're at least able to come up with a better solution

Can we talk about programming ITT pls? tks.

>reddit
Opinion discarded

haha, yeah

>embedded general
haven't seen this since rust

>meme response

opinion discarded

>multiple processes.
Massive overhead.

>Is Clojure crippled by ignoring Lisp's dogma of using binary tree for everything and using more suitable and optimized data structures instead?
I don't think so.

>want to make a scraper
>website is full of verification cookie buttfuck/bot detection

HURRRRRRRRRRR

>opinion discarded
Opinion discarded

What did he mean by this?

My point is that having same syntax and preferred data type eases metaprogramming a lot (since preferred data type has more operations). If clojure had syntax in form of vectors there wouldn't be much difference.

I am not asking whether vectors are better than lists, but if loss of this this consistency itself is harmful. I think we all agree that you practically only use lists for prototypes and replace them when optimizing.

Not really.

Anyone?

daniel.haxx.se/docs/curl-vs-wget.html

alias wget='wget --no-check-certificate'

Should I add a code of conduct to my project?

If you need to add a code of conduct to your project, your project isn't worth anyways

So tell me why they're trying to remove the GIL from Python and Ruby.

Thanks! Now that I did this, it even installed McAfee for free!

Clojure still has the ability to operate on lists as other lisps, it even has unhygienic macros, as if they weren't discredited by scheme decades ago, so it has no problems with homoiconity. You're upset by them teaching people to use optimal data structures from the start instead of reinventing them by misusing binary trees as it's customary in the lisp tradition, and this is just dumb.

Yes really.
Why else would people like OCaml Labs be trying to fix the runtime to add support for true parallelism?

Because their languages are inherently slow and fixing the problem would mean admitting that they were wrong about their language. So instead they desperately try everything else.

Yes, it's the best way to get free publicity on /gee/

short answer: yes
long answer: no

I want to learn C++. What more should I learn that's not covered here?

cplusplus.com/doc/tutorial/

To satisfy memesters who think they need it.

Only if it gets too big to be handled in civilized manner.

Think GNU, Linux or your-favourite-language big.

I am upset by focusing on structure that isn't the same as the one syntax used, since more attention will be focused on it and more tools will be developed for it. So it will be harder to work on syntax than if it had same structure.

I don't like unhygienic macros myself, I know racket, scheme and common lisp, and from all their perspectives i find clojure frankly a bit retarded.

There's probably a library for your language.

>What more should I learn that's not covered here?
A LOT more, that just a really basic intro to the language, read up on c++14/17

>scala

fuck outta here with this garbage

Clojure has it's benefits though. I like arity specializing funcions and easier destructuring (compared to common lisp's destructuring-bind).

However I don't like it's lack of internal consistency (keywords as separate datatype, preferring vectors), loop (way weaker than common lisp's do or loop), break from lisp tradition (calling hashes maps, calling progn/begin do, making nil =/= '() ... just causing confusion for no good reason).

>_hq

u avin a giggle?

I also like that most of higher order "list" functions like map, reduce, work on all sequences, that there is just one equality predicate, but this has the downside of making optimizing code harder.

>cplusplus.com tutorial
Congratulations you got memed in to using what is probably one of the single worst resources for learning C++ that's widely available.

what the hell is going on here

I don't know what the hell is going on with the first one, but the second one isn't Scala's fault. 123456789 can't be represented by single-precision floating point numbers. It would be the same in C.

youtu.be/uiJycy6dFSQ?t=28m50s

The whole video is worth watching.

I don't use Scala anyway

If someone releases code with a copyright header, where in the copyright line the use a handle, or some other pseudonym, eg.

Copyright (c) 2016, Username.

is that legally enforceable? I see people do it on occasion and it seems like something that would be an issue should they ever need to take legal action on someone violating their license.

But it's a Scala method - why not just not define it on Int?

Any kind of "This is copyrighted" text is useless in the first place (you always get copyrights on anything you create), so I can't see how it matters either way.

I'm guessing numeric literals have some sort of generic type. So Scala's compiler sees a function that needs a float and a numeric literal that can be any type of number, so it just blindly converts it.

Something like:
int x = 123456789 // Or whatever, I don't know Scala.
x.round

Would almost certainly be a type error. If it's not, feel free to bash Scala.

yes

imagine being a scalafag

in Python why is the lambda function called lambda function?

Yeah don't recommend a better resource or anything.

I've seen some of the new features, but I'm having a hard time getting a bird's eye view of the language because there's so much deprecated crap in it. Do you know of a comprehensive overview of the new features?

thank you

lmao

Buy/pirate C++ Primer 5 Ed.
Note *not* Primer Plus, which is shit.

why not make a real thread though?

>it's a language that requires semicolons and curly braces

So ugly. It hurts my eyes.

I'll give you the short version:

The toSet method on List takes no arguments. It takes a type parameter that can be any supertype of the list element type, and returns a Set with element type equal to that type.

In Scala, x(a) is syntactic sugar for x.apply(a). The apply method on Set returns whether or not the set contains the argument.

Additionally, if you call a method that takes an argument but supply no argument, and it would compile correctly if you instead supplied unit, Scala will insert a unit for you. (These days you will get a compiler warning if this happens.)

Calling Set's apply method with a unit works when the set's element type is Any.

So what the code ends up being equivalent to is:

List(1, 2, 3).toSet[Any].apply(())

Nope. It's defined in the class RichInt, which adds extension methods to Int, and to Int alone. The code you posted would compile and produce the exact same result.

illustration2vec already exists

cuz pretentious math wannabe cs kids

We had real threads. During holidays it worked great, but after them people went back to universities/workplaces and threads started dying before reaching 50 posts.

So fpt is going to hitchike on dpt till next holidays I guess.

Seems like we're both wrong.

I guess they fixed it then.

Funny, your mom said the exact same thing about you

Thanks m8, this book looks really good.

code monkey

A code monkey isn't interested in how his code looks or functions, and only cares that it works for his test cases

hate to break it to you but a code monkey is overly concerned with code prettiness and doesn't care so much about what the fundamental algorithms and data structures being applied are

> Look! I posted this buzzword I don't know the definition of again!

That's not remotely true.

Someone who doesn't care about what their code looks like isn't a real PROgrammer.

>look i'm a butthurt code monkey

whatever helps you sleep at night

>a code monkey, by definition, is not monkey-like but instead human and artistic
>hahaha you're a code monkey, unlike me

t. literal monkey

I put those types of people even lower than code monkeys because they don't even write any code, all they do is nitpick trivial details, language lawyering, etc.

>OOH OOH AAH AAH SHINY CODE PRETTY PRETTY LOOK LIKE POEM
>not monkey-like

Are you just so reduced as a human being that you don't understand poetry?
Is that why you think poetry is monkey like?
Fuck your life

...

Monkeys don't understand beauty or poetry, you ape.

what's your opinion on programmers who wear a binary watch?

it's not like counting in binary is hard...

> He thinks monkeys are birds
Really made me think

fuk u i'm a professional code artisan :9)

its the same as oldfag EEs who wear those nixie tube watches. pretty innocuous nerd crap/

Effective Modern C++

>nixie tube watches
Those exist? I mean, I get it if its a clock but that just seems cumbersome.