Old thread: What are you working on, Jow Forums?
/dpt/ - Daily Programming Thread
Other urls found in this thread:
youtube.com
godbolt.org
godbolt.org
godbolt.org
godbolt.org
Jow
youtu.be
gitlab.freedesktop.org
youtube.com
myredditnudes.com
twitter.com
Trying to learn C#
>single handendly btfos fp fags in one fell swoop
youtube.com
starting to learn python
Apparently the company I work in wants to shift away from excel VBA
>starts off by confusing functions with procedures
man, suckless fags really are retarded
fuck icu
...
i see you
imagine being a mentally ill cnile Jow Forumstard
godbolt.org
godbolt.org
godbolt.org
Did you know that you can be naughty-naughty and download the MISRA standards off of libgen?
use const
>cnile
>Posts sepples
What?
I don't understand the mentality of people like you who come into these threads and post literally the same shit over and over again.
Do you have severe autism? Are you just a bot?
>imagine being this retarded
godbolt.org
>anything past 11
What's the best programming books considering general topics, not some specific language or framework?
inb4 SICP, I've skimmed it and I found pretty basic, obvious stuff, not much of value for someone with a few years of experience.
so what's the answer?
Jow Forums-science.fandom.com/wiki/Computer_Science_and_Engineering
It's pretty long iirc.
youtu.be
>std::size
invalid argument as only c++11 was being covered and size() was not mentioned yet
summing times in c is incredibly tiresome
shit if only the language weren't so complicated the compiler was unable to reason intelligently about your code
Here is a handy header: gitlab.freedesktop.org
Knock yourself out.
it's an intro book, the less obvious stuff is in the last 2chapters, but only if you've never written an interpreter/compiler.
just get a book on a specific subject if you aren't a beginner anymore.
C++
>Just use whatever functions you want on T, if doesn't have it, it just won't compile
Modern meme languages
>Noooooo, you must define an interface then make every class you want to put in the generic inherit from that interface, it's much more elegant!
sepples does much more than that
One of these is dynamic polymorphism and one is not.
That said, I'd be interested to know if any language is able to infer constraints on type variables.
He even race mixed.
What are the "modern meme languages" you're talking about? Because the only one that does that is Java, and I wouldn't call it one.
anyone know here know a bit about RNNs? I need to know whether this paragraph is referring to word embedding. I'm quite convinced it is I just don't want to make write assignment based on a mistake
>Most of the proposed neural machine translation models belong to a family of encoder–decoders (Sutskever et al., 2014; Cho et al., 2014a), with an encoder and a decoder for each language, or involve a language-specific encoder applied to each sentence whose outputs are then compared (Hermann and Blunsom, 2014). An encoder neural network reads and encodes a source sentence into a fixed-length vector. A decoder then outputs a translation from the encoded vector. The whole encoder–decoder system, which consists of the encoder and the decoder for a language pair, is jointly trained to maximize the probability of a correct translation given a source sentence.
That's the main reasons why C++ has 300+ line template expansion traces.
he said nothing wrong. put some bengay on that butthurt, faggot.
make my assignment*
The first line will tell you exactly where the expansion failed though. It's everything you need to know.
What a great language.
you retarded bro?
no I just can't English properly
>where
But to find out why you need to dig lower.
ni hao maaaa~ hokwai~
at least answer my question meanie
He said very little at all, and much of what he did say was inaccurate.
For example
>Functional programming language advocates implement everything in a functional style
Scheme and other Lisps are perfectly capable of programming in functional style but also excel at procedural and object oriented styles.
>You can use functional language style in Go
Go doesn't even have the trivial higher order functions. Functional programming even as a local style in Go is absurd.
The closest he comes to actual arguments are
>functional programs are unreadable
This is 50% fair and 50% baby duck. Haskell programs often turn into overly terse and baroque one liners, this is an apt criticism. But he clarifies with an annotation that he means "functional programs are difficult to reason about" which is such a phenomenal falsehood I don't know anyone who could believe it.
>functional programs do not map obviously to machine code
which is not relevant to nearly anything which isn't embedded or systems programming
do my assignment*
this should be fine
It's easy af desu.
>Go doesn't even have the trivial higher order functions.
you haven't done your homework
>"functional programs are difficult to reason about" which is such a phenomenal falsehood I don't know anyone who could believe it.
they (haskell and other ml family languages) can be difficult for a human who isn't an expert in esoteric maths concepts to reason about. meanwhile you can look at some well structured procedural code and ask"DOES THIS CODE OBVIOUSLY HAVE NO DEFICIENCIES?" and answer "YEAH"
>Functional programming language advocates implement everything in a functional style
in practice they do. if you don't write functionally, the community excommunicates you.
sad that modern faggots have taken a good thing and turned it into an standoffish cult. why don't suckless use functional languages? because they're comfortable with procedural languages and happy with their resource usage. they are not obligated to use whatever language you'd prefer.
>you haven't done your homework
Cool where do I find map/filter/reduce in the standard library? Can you even write const?
>they (haskell and other ml family languages) can be difficult for a human who isn't an expert in esoteric maths concepts to reason about.
Haskell maybe but other ML derivatives are usually straightforward. Procedural and object oriented languages by their nature make it much harder to see what changes made to parts of a system will affect others, while functional languages contain it much more obvious where this is the case.
>in practice they do. if you don't write functionally, the community excommunicates you.
It's basically just haskellers. Everyone else uses procedural whenever it's useful.
gotards be like "this is fine"
I'm thinking of starting programming. But I don't know if I should learn C++, C#, Python or Java. My goal is to make a lot of money without working that much.
>crying about higher order functions
>My goal is to make a lot of money without working that much.
good luck with that
Imagine making a language so bad you can't even sort things correctly.
>delusional gopher
>hasklel too hard because muh math
>hasklel is muh math
>muh mutation clusterfuck is easier to find bugs
>muh community
and cherry on top
>suckless
who's the faggot here. I really wonder
Haskell IS too hard.
It's only as difficult as you make it.
stop being a brainlet
I'm making an MVC framework for PHP.
It uses config files for setting directories, defining the default controller to be executed and the default action name when calling a controller.
It's for small to medium projects, not with high traffic.
I have never coded in this language, it's a good way to learn.
Stallman:
>I skimmed documentation of Python after people told me it was fundamentally similar to Lisp. My conclusion is that that is not so. `read', `eval', and `print' are all missing in Python.
Can someone explain to me why functional programming languages like Python are inferior to Lisp?
Is it the lambda bracket prefix thing syntax that makes Lisp different?
that's it goodbye forever apple shit I won't miss you
Stallman is quite clear. Python lacks read, eval and print.
Python is not a functional programming language.
Homoiconicity is a good thing about Lisp but not the only thing.
>Python lacks read, eval and print.
It doesn't from what I can see these are in the docs.
>Python is not a functional programming language.
Literally every source I can find it calls it a mulit-paradigm language that supports functional style.
>Homoiconicity is a good thing about Lisp but not the only thing.
Care to tell me what's in Lisp, that is missing from other functional languages?
I wish variables in C++ were const by default.
Unfortunately, it's such a big change that I doubt it will ever be implemented.
Most of it is basic, obvious stuff, but it's also stuff most programmers think they know, but actually don't.
Is there a reason the compiler can't figure this out on its own?
>What are you working on, Jow Forums
Having some fun with some data entry type work. Converting Windows virtual key enums to linux keycode enums. Luckily there are only 104 I care about and
In Lisp, read is a function that takes a string and returns a symbolic expression. It's essentially a parser. Eval is a function that evaluates a symbolic expression with recursive eval/apply. Print takes a symbolic expression and turns it back into text.
Python has forms of read/eval merged into one in the form of eval and exec. Unfortunately this negates much of the advantage of the approach used in Lisp. By separating read from eval you can manipulate Lisp programs as ordinary Lisp data structures before evaluating them. Homoiconicity makes this kind of manipulation even easier as it means the basic data structure of a program is also the basic data structure for everything else.
Python is predominantly a procedural language with object-oriented extensions. Python does have first class functions but that's not usually considered enough to be a functional language and functional idioms are difficult to achieve in Python.
Lisp is not a language, but a group of languages. This must be said because some Lisps are more functional than others - or proecdural, or object oriented. Most Lisps are multiparadigm and do all paradigms reasonably well.
>My goal is to make a lot of money without working that much.
C# then.
suckless here
I use Haskell, xmonad, NixOS, etc.
The UNIX philosophy is FP btw, chaining functions together that do one thing and do it well.
Thanks for the explanation. If I wanted to experience the supposed power and elegance of Lisp (as per Stallman's description) how would I know whether the language is adequate (other than REPL)? Does Clojure fit the criteria?
Working on a plugin for Jira.
I love how Eunuchs weenies stretch the meaning of "Unix philosophy" to include literally everything.
In 20 years, Kant will be considered a proponent of the Unix philosophy.
The things that make Lisps different to other languages are common to Lisps, and you'll learn them regardless of which Lisp you use. Clojure, Scheme, Racket, Common Lisp, Emacs Lisp - if one clicks with you then you'll know what the deal with the rest is too.
Ẃhy not make lifetimes part of the type system in C++?
What is your proposed syntax?
>why not make C++ even worse
How'd you learn it?
Kant is a proponent of the Unix philosophy.
"do one thing and do it well" satisfies the categorical imperative.
Lisp isn't functional.
Scheme and racket are, for example. CL ? absolutely not
weird definitions.
Scheme and Racket are so functional, they have a set! function to change global variables!
Fucking everything is partly functional today. If it has lambdas and recursion it's functional to most of programmers.
Also haskell and other ml languages are partly OOP because they have object system.
haskell doesn't have an object system
Scala seems to be the only choice if you want to use functional language and also not be unemployed.
Realistic speaking, how many programming languages is it >possible< to know at a fluent level?
hundreds
most of them are basically the same
you can become fluent in a few weeks
since you say realistically, I'll take fluent to mean senior software engineering level. i'd say 3. it's actually not that unusual. the most senior guys where i've worked were experienced in a mix high level, low level, and scripting (e.g. java, C + perl).
Fuck off Simon, you are faggot.
so did he invent Haskell just to trick brainlets and piss smart people off
yes, it's the same as how Bjarne invented C++ to trick smart people and piss brainlets off
being a senior software engineer isn't about your proficency with a language
i said senior software engineer LEVEL. get a job if you need me to explain this to you.
i need help, i being a dumb as i am bought a python2 course and now its dieing in 2020, i just wanna know if a learn to code in python2 how hard will it be to code in python3,
(I use python for mainly security pentesting purpose)
python3 is basically an entirely different language, you're fucked
What do you get for when you pay for a python course?
it's literally the same language except they changed this
print "hello world"
to this
print("hello world")
i don't know what was going on through their heads when they decided to first not use brackets, and then when everyone had gotten used to their silly convention, they changed it,.
Neat, good to know there are so many people good at different sorts of languages out there. I guess it makes sense not to invest your time in languages that do similar things things to the ones you already know, so at least managing to know some of different levels of abstraction is a fine enough of a goal
all languages do similar things, when you're good at programming you just use whatever language you need to do the job because you can pick them up in a few days unless it's some super gay shit like Haskell
They changed it because the Python 2 way of printing without a newline was fucking stupid, and the new way is just a named parameter
Total programming noob here, starting from ground zero. I'm learning Dart because I want to code apps using Flutter. From what I've read Dart is similar to Javascript in its structure and syntax so it should be eady to learn JS after it.
Is this correct? Is Dart a good language for a beginner to start with or did I fall for a meme?
>I'm learning Dart because I want to code apps using Flutter
this makes me feel old, i have no idea what the fuck those things are