/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

benchmarksgame.alioth.debian.org/u64q/lisp.html
mega.
twitter.com/NSFWRedditImage

First for Lisp is the most powerful programming language

show your daily git activity table sheet, nerds

Please stop posting this boring slut.
Post a cuter anime gril.

Second for Lisp is the most powerful programming language. The opinions of people who disagree with this are inherently invalid.

>that
>cute
What a shit taste

You're fucked in the head if you don't think this is cute as hell.

Define "powerful".

I'm talking about expressive power. The more concepts and abstractions you're able to express within a language, the more powerful it is.

Literally anything is cuter than lain.
Even the shit sitting in my toilet is cuter.

Wouldn't Haskell be just as powerful?

Lisp can makes traps not gay.

not entirely sure but I believe that metaprogramming in Haskell is not as powerful as in Lisp

That's true.

>Wouldn't Haskell be just as powerful?
I don't think it supports meta-programming without compiler extensions, so that puts quite a cap on the number of things you can express.

Is Lisp's performance compared to other languages good? Is Lisp faster than, say, Java and Go or is it about on par with Ruby and Python?

Is SICP actually worth reading? It seems like the intent of the book is to learn the principles of programming rather than Scheme as a language. The Sup Forums wiki only has a couple meme lines about unusable info and anime girls.

Common Lisp is one of the fastest dynamic languages. Significantly faster than Ruby or Python (not that they're hard to beat). Some Scheme implementations can compile binaries that rival C (Stalin comes to mind).

It's great
It's not the best way to learn Scheme (if that's what you want) as it teaches you way more than necessary (about different subjects than the Scheme language), but it's definitely worth reading.

Does Stalin still get developed anymore? I saw on wikipedia that the last stable release was 11 years ago.

>Does Stalin still get developed anymore?
I don't know. I don't care that much about Scheme, or about squeezing every last cycle of performance out of a program. The 10% of the time when CL isn't fast enough to get the job done, I just re-implement the tight loops in C and call the relevant functions through the C FFI.

...

I'm really enjoying Go. It has a lot of neat little features.

Do you want to learn Scheme?
If no, then no.
That's literally all SICP is good for

>t. retard
It's also good for teaching all the stuff brainlets like you are ignorant about, like algorithms, how to properly structure a program, and some basic theoretical computer science concepts.

parentheseses

Theres better general books for all of those.
>Lisp
>proper program structure
wew lad

>let me assert my subjective opinions
Nobody cares about them. It you had read the book, you would've known that it's not primarily about Scheme, but you're just another brainlet commenting on things it has no clue about; probably one that has never read any book,

What's up with that creepy autism hamster?

Is Java """fun"""

Ive been through a fair bit of it because of people like you saying "oh don't worry it's general purpose, you don't even need to be using Scheme!"
Then i realized that was bullshit when most chapters spend 3/4ths of their time explaining the concept in scheme.

Now sure, you could skip through most of the book and just grab the concepts, but why would you? There's better book out there for general purpose learning.

it's drawn by pike's wife i think.

>most chapters spend 3/4ths of their time explaining the concept in scheme
What did you want instead? Pseudo-code? Java? The book explains Scheme and provides Scheme implementations, but it is not primarily about Scheme itself. Everything you learn besides Scheme (i.e. most of the content of the book) is applicable without Scheme. I don't know why it's so difficult for you to grasp.

>you could skip through most of the book and just grab the concepts
No, you can't, you literal retard, because most of the book is not about Scheme.

>There's better book out there for general purpose learning
>general purpose learning
Guess how I know you've never read any programming book at all. Either way, I don't care to discuss your subjective opinions. Your statement that you will learn nothing but Scheme is objectively false, and most people who have actually read the book think it's a good book.

>SICP can teach you more than just Scheme!
>What do you mean you don't like Scheme, why are you reading it then?

sasuga.
>Guess how I know you've never read any programming book at all.
How's that?

>i can't respond to your points so let me respond to my own schizophrenic delusions instead
Guess we're done here.

I'm just curious why you think I've never read any programming books, desu.

Question for Sup Forums

How should I handle licensing for a hybrid SaaSd/desktop app? I'm using Cognito for my authentication.

My current ideas:
Update a custom attribute in Cognito, force a token refresh for desktop users.
Create two fields in my database, one with the Cognito user and second with a simple true/false for licensed.

>general purpose learning
>sasuga
>desu
Either way, come back when you have some kind of argument. Protip: lying that most of the book is about Scheme or making vague statements that there are "better books" for "general purpose learning" (a made-up term that only shows your lack of understanding of how these books are typically structured) doesn't count.

>lying that most of the book is about Scheme
you literally agreed with me m8.
>a made-up term
And you're calling me the baka.

>lying
>lying some more when you get called out
Got any actual arguments? The fact is that the book is not about Scheme any more that Knuth's Art of Computer Programming is about MIX assembly. You're a literal and unironic retard.

if you fucking idiots spent half the effort learning something as you do arguing with each other maybe you'd get past hello world.

Finished my homework some 15 years ago, so I can afford to argue all I like. See you when you get past fizzbuzz.

my hello world segfaults i dont know why

Third for Lisp is the most powerful programming language. Full stop.

Now if only it was actually faster than Java, than it'd actually be used by more than 4 people.

Can you name the things it wasn't fast enough for in your undoubtedly plentiful experience, brainlet? Or are you just a memer?

benchmarksgame.alioth.debian.org/u64q/lisp.html

that's why less than 4 people use python, right?

You really have to wonder why Python took off while Lisp failed.

So you can't name the things that Lisp isn't fast enough for?

Took an introduction course in c++ during the summer and made a shitty game.

It works on ubuntu, no problems but if I try to use it on manjaro or antergos it doesn't work

Why?

mega.
nz/#!BnRhARhI!SUn35UtmIvoSVKg1VmjXpGgU0X3fD_1W5Bs4Q5p-foU

Regex is definitely one.

Is it possible to get matplotlib to display inline in a terminal like ipython+konsole? I've read it only works in a gui-notebook, but why then can w3m display graphics within konsole?

It's an enormous hassle when working in ipython to switch windows constantly. Unfortunately, I've only got one monitor.

>Regex is definitely one.
What does that even mean, brainlet? Care to explain? What specific tasks are we talking about?

C/C++ doesn't have a standard dependency management tool

>he trusted the compiler to optimize his code

you might as well just write your own language, lad.

is haskell just a meme or what

Yes and no.
It's been the foundation for a lot of concepts, and even powers better languages.
It has horrid syntax, rampant fragmentation, and bad design decisions.

Read up on dependent types and if you think they're something you're interested in. If so, then you can skip haskell for an agda or idris or f*

Feel free to waste your time micro-optimizing C code for your fizzbuzz programs while other people are getting actual work done.

>"is haskell a meme?"
>yes and no
>and that's just not good enough
>use agda or idris for a full yes

Can you try that post again?
Remember to include complete sentences this time, lad.

ATS YOU FOOL

>i can't read
I don't get it. Is this place chock-full of autists, or is it always the same couple being autistic all over the place every day?

Should I use opengl es2 or is es3 supported enough?

>tfw your AVL tree starts working properly

Haskell or any other aren't invalid because they lack proper dt's. It just depends on how useful you see them.

should I move on to C++ if I already know the basic concepts of memory management in C?

Why would I? The issue is with the compiler, it should be able to optimize all these without any problems.

yes

No, and you're not moving on going from C to sepples, you're regressing. Learn C well, then learn some other language. Not an OOP one, they cause you to think in an "OOP" way. Learn a functional one (don't expect to do anything useful with it though), or a regular imperative one (asm will teach you a lot)

It depends, what are you looking to do?

Because you're already in the mindset of being dissatisfied with the compiler. And then you took the time to re-implement your improvements. You're only going to keep doing it until you basically re-write the whole language. So you might as well save yourself the hassle and skip all that.

>re-implement
What? I wrote some different versions of the same function, the bottom half is the compiler's output.

>it should be able to optimize all these without any problems
Go ahead and fix it. I don't think anyone would object to having a better optimizer. It's probably not as easy as you think, though. For some reason, the optimizations you're looking for don't fall out of the general methods used by your compiler, so you'd have to come up with a more general method, which will presumably be fast enough to be practical and proven to always produce correct results under a set of realistic assumptions.

The correct solution is to implement a CAS in the compiler, solving this specific problem would be easy but the class of problems should use a CAS to solve more efficiently

Retard or false flagger? Can't tell anymore in these threads.

Neither. OOP fries the brain and should be avoided, functional languages do teach good habits.

>The correct solution is to implement X
Do it, then. What are you hoping to achieve by posting the same thing over and over? Are you trying to prove the obvious fact that optimizers aren't perfect and sometimes act strangely?

He's just having a laugh, mate. Not everything is caused by stupidity or malice.

The point is that it happens more often than sometimes, it happens nearly all of the time and the compiler isn't as smart as the smug retards on SO will tell you.

>C++ is OOP

haha

I'm currently learning Haskell, but as you said, I couldn't find any practical use for it yet. I also tried to learn Common Lisp out of interest, and it went well for a couple of weeks, then I stopped for no reason. I'm just worried that I'm missing something from only caring about these "obscure / archaic" languages.

I'm not sure yet, it's all for academic purposes, although it would be nice to become employable someday.

>X is ebul and you should never use it
>you should learn Y but Y is useless
>asserting things but then failing to back them up with any concrete logic or evidence
Typical /dpt/ poster or false-flagger? Literally impossible to tell.

>more often than sometimes
>"it" happens nearly all of the time
>not as smart as X said
You're not communicating any objective or useful information.

Sepples fries the brain in other ways too, it makes you abstract everything to hell and back when it's not really needed. And yes, it is object oriented.
It's only useful to write really high reliability code since you can easily test it and all that. But no, as long as you learn good software engineering principles those transfer to most languages.
I told you why sepples was bad. Haskell is mostly useless, but the skills you gain from learning is sure aren't. That sepples encourages bad design is no secret.
I showed you objective proof that it [missing trivial optimizations] happens more often [very often] than sometimes [direct quote]

uh oh, that's from private repos, and another activity tab for public repos but it's even less frequent

>_Bool
>_Complex
>_Imaginary
way to ruin a perfectly good language

I know right, I don't even really like C but I always liked its simplicity and cleanliness but then there's those beasts.

>i proved my assertion that X is bad by asserting that Y is bad
>missing "trivial optimizations" "more often than sometimes" is an informative statement that actually means something
I'm sorry, are you actually retarded?

pretend they don't exist

...

std::newfag

...

I program sporadically.

It's a trivial optimization to recognize that x and y are the same in a statement that only executes if x and y are the same, yes. I clearly explained what I meant by "more often than sometimes". "sometimes" was a direct quote from you, where you implied that it rarely happened. I provided evidence that it was actually quite common, and as such it happens "more often than sometimes[rarely]".

As for the other one, I don't know what you're talking about.

OOP is a good fit for the problem domain, though. That or an ADT-oriented functional language, which is just the other side of the same coin.

Anything else is inviting an unmaintainable mass of spaghetti code.

I'd like to know this as well.

>I clearly explained what I meant by "more often than sometimes"
No, you didn't, and it inherently doesn't mean anything, because "sometimes" doesn't mean anything.

>you implied that it rarely happened
No, I didn't.

>I provided evidence that it was actually quite common
No, you didn't. You provided evidence that it sometimes happens.

>As for the other one, I don't know what you're talking about
I'm talking about the fact that saying "OOP is bad because thinking in an OOP way is bad" is not an argument. It's just a couple of assertions based on circular reasoning. At this point I'm quite convinced that you are, indeed, mentally retarded. You don't understand the meaning of words like "explain", "prove", "evidence", "sometimes" etc.

To clarify, "sometimes" means "more often than never". Doesn't actually mean anything beyond that, and "more often than more often than never" doesn't give any concrete idea of how often something happens. You're welcome.

>because "sometimes" doesn't mean anything.
It was a direct quote from your post:
>optimizers aren't perfect and sometimes act strangely
>No, I didn't [imply that it rarely happened]
Your use of "perfect" and "the obvious fact" sure does imply it, yes.
>No, you didn't. You provided evidence that it [missing trivial optimizations] sometimes happens.
Sure, but it was a common operation. If it misses this, then what else is it missing?
>saying "OOP is bad because thinking in an OOP way is bad" is not an argument
>It's just a couple of assertions based on circular reasoning
Thinking in an OOP way if you're writing code in non-object oriented languages is bad since it lacks the needed constructs, I didn't mean that it'd be bad if you're only intending to write OOP for the rest of your life. but it does narrow your perspectives. Functional programming doesn't have this issue in the same way.
That's true, but in this case it was a direct quote from a context where it was heavily implied to mean "rarely".