Daily Reminder

Lisp is the best programming language.

C is alright.

Everything else is shit. If you use anything else you are intentionally being a shitty programmer.

Other urls found in this thread:

neovim.io/
reddit.com/r/scheme/comments/4vvx1f/the_cyclone_schemec_compiler/
github.com/justinethier/cyclone
gnu.org/software/emacs/manual/html_mono/eww.html
elpa.gnu.org/packages/w3.html
fightingforalostcause.net/content/misc/2006/compare-email-regex.php
youtube.com/watch?v=1i4-e1okZtw
youtube.com/watch?v=B2BFbs0DJzw
youtube.com/watch?v=2Op3QLzMgSY&list=PLAA97f8v5JX5WRZ6DUBSsogXlG4biWinL
en.wikipedia.org/wiki/Category:Common_Lisp_software
en.wikipedia.org/wiki/GNU_Guile#Programs_using_Guile
web.archive.org/web/20130318175659/http://myweb.cableone.net/gmcnutt/nazghul.html
twitter.com/NSFWRedditVideo

Forth.

HAI 1.2
CAN HAS STDIO?
VISIBLE "LOLCODE IS MOAR FUN!"
KTHXBYE

Heathens

How does one join the church of emacs?

Install spacemacs.

whats the difference?

It has vim keybindings, or hybrid keybindings which I find the best. It has a bunch of plugins preinstalled and preconfigured and is easy to use out of the box. You use space as the leader key to execute emacs functions, and it works very well. You can add/remove whatever you like too.

You have to pronounce the Confession of the Faith: "There is no system but GNU, and Linux is one of its kernels."

Whats wrong with vanilla emacs?

Nothing, if that's what you prefer.

Well whats the difference I mean.

Spacemacs is a bundle of packages on top of Emacs. It makes a few things nicer but most importantly it sets up vim keybindings instead of Emacs keybindings.

.. or just use neovim? It's the date +%Y

neovim.io/

Heathen from the cult of VI be gone!

Shoo shoo emacs losers

With plain emacs you don't get any of the plugins or keybindings. It is a lot easier to learn for a beginner which was implied, or especially someone transitioning from vim. And it's a good standardized starting configuration.


neovim is nice and I do in fact use it occasionally. But it's actually

Small executables for small minds.

It's a ed/vi thing, you wouldn't understand.

XEmacs ftw

Please redpill me on Lisp, why would anyone use it over another scripting language? Can it replace proper compiled languages? What about the GC, I imagine that will keep it on the same level of performance as other GCed languages.

There are compilers for Lisp. I hear certain dialects with certain compilers are not even that horrible compared to C.

Lisp's power comes from mixing data and code. All code is just lists, and most structured data is lists, so you can manipulate code very effectively.

I don't know how familiar you are with Lisp. This is how you calculate 2 + (3 * 4) in Lisp:(+ 2 (* 3 4))It's a list containing three things: +, 2, and a list containing three things: *, 3 and 4.

When you hardcode a list you usually put a quote (') in front of it. You can put it in front of everything, not just lists. You're saying "treat this as data instead of evaluating it".

"car" is a function that takes the first element of a list. It's very important when working recursively. "cdr" is a function that returns the rest of the list - everything but the first element.

So these:(car '(1 2 "hello" +))(cdr '(1 2 "hello" +))evaluate to:1'(2 "hello" +)
"cons" is a function for constructing lists. It puts a new element in front. So these are equivalent:(cons 1 '(2 3 4))'(1 2 3 4)
"eval" is a function that takes a list and executes it as code. There are other ways to do what you'd do with eval, and not all Lisp languages have it, but it's good for an example. These two are equivalent:(eval '(+ 2 2))(+ 2 2)
How you define functions depends on which kind of Lisp you're using. In Scheme you'd define a function for squaring numbers like this:(define (square a) (* a a))
We now have all the building blocks for a really weird function. Let's say you have a piece of code, "(+ (/ 10 2) (+ 5 5))", and you want to wrap that in something that makes it execute a multiplication instead of an addition. You can write this:(define (add2mul code) (cons '* (cdr code)))and then you can just(eval (add2mul '(+ (/ 10 2) (+ 5 5))))
Lisp's syntax is so incredibly simple and regular that things like that are easy. This example is not useful, and it's not executed in a good way, but it should explain what makes Lisp so special. Any language with the same capabilities as Lisp would be a Lisp.

Scripting languages all have really terrible implementations. Lisp (that is, Common Lisp) actually has some really good implementations. Lisp is better when it comes to bitrot (what bitrot?). Scripting languages tend to be more optimized by default for expressing the kinds of programs they're used for -- which means that any kind of just-hacked-together script, done in a scripting language and in Lisp, will tend to be more verbose in Lisp. But Lisp's greater expressiveness helps when you can more thought into what you're doing, and as programs get larger.

On an ARM Chromebook:

$ time for x in {1..1000}; do php hello.php ; done > /dev/nullreal 0m24.229suser 0m16.470ssys 0m4.230s$ time for x in {1..1000}; do sbcl --script hello.lisp ; done > /dev/nullreal 0m19.476suser 0m7.190ssys 0m4.190s

And it just gets worse (for PHP) from there.

btw I do tests like that for two reasons: 1. this shows the minimal overhead imposed by a language vs. another, for the simplest of tasks. Because sometimes, especially with websites, you really do have the simplest of tasks running as a CGI script and you want it to be as fast as possible -- because if it's too expensive, you just can't use it at all. 2. I fondly remember people griping about Lisp 'hello world' performance in IRC, and then having other people dismiss that as not worth Lisp's time. Advance to the present: Lisp is perfectly fine at 'hello world' :p A dumped image will still be huge ofc.

...

If it were about endorsements, then I'd use SwiftForth. Which would just show that SBCL has enormously more overhead than SwiftForth. Which would mean nothing to you. PHP is popular; CGI installations of it are popular; the overhead of starting PHP and getting it to do something and then shut down is therefore a thing that mattes for a lot of people. If you want your own comparisons with some other language implementation, do them. Rust is pretty good. Perl6 sucks like a fag that's been in solitary for a year. Among inferior unterlispen, Chicken Scheme is probably very good on this point.

Chicken is fun but seems to be falling by the wayside because Cheney on the MTA is hard to multithread

WHAT
THE
FUCK

that's 'clisp'. It's not worth using anyway, fortunately.

neet basement dweller living on autismbux detected

Thanks's but I already know the Lisp syntax from working my way through SICP (almost done with chapter 3). I guess what I meant is why would I want to do that? Being able to turn an addition into a multiplication is a cool trick, but what does Lisp let me do that I couldn't do for example in Python?

There is a book called Practical Common Lisp, maybe I'll give it a try, practical application is always a good thing.


Isn't PHP a mess in general? Besides, startup time is relevant for some use cases, but for most use cases the runtime performance is more important.

...

Cyclone scheme has a take on that, the creator seems to be willing to discuss with the chicken devs.

reddit.com/r/scheme/comments/4vvx1f/the_cyclone_schemec_compiler/

Source code: github.com/justinethier/cyclone

...

I've been learning python and I like it more than c++

it's actually kinda fun

what do

Just keep using it. Python is alright.

from an old project

HAIBTW This program performs a 42 term Taylor series expansion of BTW X^N in order to provide exponentiation functionsI HAS A X ITZ 0.09I HAS A N ITZ 0.5I HAS A COUNTER ITZ 0I HAS A FACTORIAL ITZ 1.0I HAS A ANSWER ITZ 1.0I HAS A TAYLOR ITZ 1.0I HAS A VAR ITZ 0.0IM IN YR LOOP UPPIN YR COUNTER FACTORIAL R PRODUKT OF FACTORIAL AN SUM OF COUNTER AN 1.0 VISIBLE FACTORIAL TAYLOR R PRODUKT OF TAYLOR AN PRODUKT OF DIFF OF X AN 1 AN DIFF OF N AN COUNTER VISIBLE QUOSHUNT OF TAYLOR AN FACTORIAL ANSWER R SUM OF ANSWER AN QUOSHUNT OF TAYLOR AN FACTORIAL VISIBLE ANSWER VISIBLE COUNTER GIMMEH VAR BOTH SAEM COUNTER AN 42, O RLY? YA RLY GTFO OICIM OUTTA YR LOOPVISIBLE ANSWERKTHXBYE

Nice joke, Rust will be forgotten in a year. It's an even lamer meme than D

keep having fun
python is a fun language

Assembly code is better than all of you.

No, languages which prevent me (and my colleagues) from fucking up all the while pushing us towards efficient patterns are the best.
That means Haskell, C# or Rust depending on the use cases.

...

C# is crap and its type system sucks ass even more than Java's type system.
When Java gets Value Types (now soon), C# will be totally obsolete.

...

I bet you can't even handle a simple regex expression at the assembly level.

smh my head

A programming language so gay it spells it out in its name.

Ok, fine.

Show me a professional CAD tool written in LISP.
Show me a web browser written in LISP.

gnu.org/software/emacs/manual/html_mono/eww.html
elpa.gnu.org/packages/w3.html

Write real parsers, not webdev-tier hacks like regexes that are impossible to make work for even the simplest formats and impossible to read or modify.
fightingforalostcause.net/content/misc/2006/compare-email-regex.php
Writing a regex to _perfectly_ match emails is harder than a Millennium Prize math proof and is still an unsolved problem after 35 years. It takes about 10 minutes to write a parser for the format in bison for an experienced programmer.

No, show me something that can be deployed and used in a professional setting (IBM, healthcare, insurance...).

...

Isn't it provably impossible because it has recursive balanced groups?

Probably isn't doable with pure regexes due to the quoting rules but might be with perl-style backrefs.

Git gud. At least there is a single thing to read, vs. your long-form parser written in who know's what. And why accept 100% of possible emails? Emails are pre-Nigerian Prince and therefore probably dangerous to fully accept as it is. Learn from Linux's gaining an exploit from a faithful implementation of a bad design.

So you can glance at that pic I posted and tell me what needs changed to get the '"Ima.Fool"@iana.org' address validating? Don't be retarded.
bison or similar. If you have trouble reading a BNF-alike you're in trouble since the standard itself is described in BNF. It's almost a cut&paste job. Git gud yourself, faggot.
If you're going to validate something, you do it correctly. Otherwise, everywhere else in the software that might do validation could fail on input that was already "validated" creating a rare class of bugs hard to fix since you've already spread that bad data throughout the system. Building fragile systems is poor engineering.

Nothing can. It's all held together by a bunch of Perl scripts tbh. Without that, the whole thing falls apart and collapses like a house of cards.

Except for any other language, sure. It's best.

I assume this means you'll only run software made in either lisp or C, right?

Lisp is dead because it's culturally mandated for it to be dead. It is probably the best, but it's not like it matters anymore.

Also other languages are a lot of fun, and of much utility, for simpler tasks where code correctness and speed aren't so relevant.

Good code generation.

What about c++

youtube.com/watch?v=1i4-e1okZtw

What about Ç

I thought Lisp is dead because the AI bubble hyped it and then the industry decided to blame their failure on the language. Then they once again fuck up years later by hyping Java and OO. The ride never ends.

Wash your mouth with SOAP!

Pretty much, but as a well rounded development tool, Lisp used to be shitty because it required a comparative ton of resources to use effectively, but these days, you could write software for, say, SBCL, and it would not only be extremely faster than other dynamic languages (sometimes reaching C performance!), it would also be more compact and resource efficient while being far more flexible and forgiving. I would even argue that interactive development is more intuitive, especially because of the lack of a need for an IDE, though some do exist IIRC. It is a simple product of sensible, thought-out and mathematically sound design.

Simply put, Lisp blew its load too early. Java got lucky because by the time it came around, companies were both willing and able to compensate for its ridiculous bloatiness by simply throwing more server power at it.

nooblang. Try ¢.

At least Stoustrup knows that profiling code without compiler optimization is idiotic, unlike the guy you linked to.
youtube.com/watch?v=B2BFbs0DJzw

If lisp is so great then why is most of the worlds software written in java?
checkmate autists!

/g/ is down over in the other building, pajeet.

Nice denial.
How many important systems run lisp again?

RMS's welfare handouts depend on lisp remaining relevant

because lisp is horrible when you have to replace the guys who wrote the code.

The only thing horrible about the lisp family is a question of management and JAVA shilling at school.

Why is is horrible to replace someone ?
Well since school teach jack shit well you can't have devs who understand it.

Tell me were can you find something as this good nowadays ?
youtube.com/watch?v=2Op3QLzMgSY&list=PLAA97f8v5JX5WRZ6DUBSsogXlG4biWinL


Emacs witch is really important has a tool.

guile also

lots of small scientific software

en.wikipedia.org/wiki/Category:Common_Lisp_software

en.wikipedia.org/wiki/GNU_Guile#Programs_using_Guile

Here's a cool Ultima-style RPG that uses scheme for scripting:
web.archive.org/web/20130318175659/http://myweb.cableone.net/gmcnutt/nazghul.html