#common lisp
Explore tagged Tumblr posts
Text
Attention Writers!
When writing dialogue for a snake character and giving them that classic hisss lisp just remember:
Not every s should be extended.
Don't just add extra s' to any word that has an s. For it to sound natural it needs to be given to words with the s sound.
Case in point: s and sh are two very different sounds. Normal s sounds place the tongue against the teeth, hence the hiss like lisp. Sh on the other hand has the tongue on the roof of the mouth and therefore would not make that same hisss.
In conclusion: s sssoundsss should have the hisss, while sh sssoundsss should not.
#writers on tumblr#writing advice#snakes#snake#snake character#hisssss#nagini#voldemort#kaa#jafar#orochimaru#sir hiss#sir pentious#lisp#common lisp
42 notes
·
View notes
Text
i hate my lisp so much like it ruins my life and people make fun of it alll the time and it just fucking sucks and like it’s the people who don’t even know me at all?? and it’s always when i forget i have a lisp and someone brings it up like SHUT UP. i was at a concert today and i was taking to someone in the crowd and somone behind me started making fun of my lisp out of no we’re like??? what did it dooo to deserve this curse
10 notes
·
View notes
Text
Normally I just post about movies but I'm a software engineer by trade so I've got opinions on programming too.
Apparently it's a month of code or something because my dash is filled with people trying to learn Python. And that's great, because Python is a good language with a lot of support and job opportunities. I've just got some scattered thoughts that I thought I'd write down.
Python abstracts a number of useful concepts. It makes it easier to use, but it also means that if you don't understand the concepts then things might go wrong in ways you didn't expect. Memory management and pointer logic is so damn annoying, but you need to understand them. I learned these concepts by learning C++, hopefully there's an easier way these days.
Data structures and algorithms are the bread and butter of any real work (and they're pretty much all that come up in interviews) and they're language agnostic. If you don't know how to traverse a linked list, how to use recursion, what a hash map is for, etc. then you don't really know how to program. You'll pretty much never need to implement any of them from scratch, but you should know when to use them; think of them like building blocks in a Lego set.
Learning a new language is a hell of a lot easier after your first one. Going from Python to Java is mostly just syntax differences. Even "harder" languages like C++ mostly just mean more boilerplate while doing the same things. Learning a new spoken language in is hard, but learning a new programming language is generally closer to learning some new slang or a new accent. Lists in Python are called Vectors in C++, just like how french fries are called chips in London. If you know all the underlying concepts that are common to most programming languages then it's not a huge jump to a new one, at least if you're only doing all the most common stuff. (You will get tripped up by some of the minor differences though. Popping an item off of a stack in Python returns the element, but in Java it returns nothing. You have to read it with Top first. Definitely had a program fail due to that issue).
The above is not true for new paradigms. Python, C++ and Java are all iterative languages. You move to something functional like Haskell and you need a completely different way of thinking. Javascript (not in any way related to Java) has callbacks and I still don't quite have a good handle on them. Hardware languages like VHDL are all synchronous; every line of code in a program runs at the same time! That's a new way of thinking.
Python is stereotyped as a scripting language good only for glue programming or prototypes. It's excellent at those, but I've worked at a number of (successful) startups that all were Python on the backend. Python is robust enough and fast enough to be used for basically anything at this point, except maybe for embedded programming. If you do need the fastest speed possible then you can still drop in some raw C++ for the places you need it (one place I worked at had one very important piece of code in C++ because even milliseconds mattered there, but everything else was Python). The speed differences between Python and C++ are so much smaller these days that you only need them at the scale of the really big companies. It makes sense for Google to use C++ (and they use their own version of it to boot), but any company with less than 100 engineers is probably better off with Python in almost all cases. Honestly thought the best programming language is the one you like, and the one that you're good at.
Design patterns mostly don't matter. They really were only created to make up for language failures of C++; in the original design patterns book 17 of the 23 patterns were just core features of other contemporary languages like LISP. C++ was just really popular while also being kinda bad, so they were necessary. I don't think I've ever once thought about consciously using a design pattern since even before I graduated. Object oriented design is mostly in the same place. You'll use classes because it's a useful way to structure things but multiple inheritance and polymorphism and all the other terms you've learned really don't come into play too often and when they do you use the simplest possible form of them. Code should be simple and easy to understand so make it as simple as possible. As far as inheritance the most I'm willing to do is to have a class with abstract functions (i.e. classes where some functions are empty but are expected to be filled out by the child class) but even then there are usually good alternatives to this.
Related to the above: simple is best. Simple is elegant. If you solve a problem with 4000 lines of code using a bunch of esoteric data structures and language quirks, but someone else did it in 10 then I'll pick the 10. On the other hand a one liner function that requires a lot of unpacking, like a Python function with a bunch of nested lambdas, might be easier to read if you split it up a bit more. Time to read and understand the code is the most important metric, more important than runtime or memory use. You can optimize for the other two later if you have to, but simple has to prevail for the first pass otherwise it's going to be hard for other people to understand. In fact, it'll be hard for you to understand too when you come back to it 3 months later without any context.
Note that I've cut a few things for simplicity. For example: VHDL doesn't quite require every line to run at the same time, but it's still a major paradigm of the language that isn't present in most other languages.
Ok that was a lot to read. I guess I have more to say about programming than I thought. But the core ideas are: Python is pretty good, other languages don't need to be scary, learn your data structures and algorithms and above all keep your code simple and clean.
#programming#python#software engineering#java#java programming#c++#javascript#haskell#VHDL#hardware programming#embedded programming#month of code#design patterns#common lisp#google#data structures#algorithms#hash table#recursion#array#lists#vectors#vector#list#arrays#object oriented programming#functional programming#iterative programming#callbacks
16 notes
·
View notes
Text
I think my lisp has gotten worse because I watch too much of Max Verstappen-centric content. Either that or I began noticing it more.
6 notes
·
View notes
Text
How do we directory in common lisp? Missing f.el rn
3 notes
·
View notes
Text
the word lisp is so cool.
Like if they say it with a -sp the don't have a lisp and if they say it with a -th sound they have a lisp
And the secret third option
3 notes
·
View notes
Text
More (Common) Lisp complaints
Because they are like those people selling financial freedom.
Lisp feels so irrelevant in game dev (desktop, non-mobile). C++ dominates this field. Flash successors plenty abound. XNA alternatives all around. Even Java is there. But where is Lisp?
Naughty Dogs
FF7
Kandria
...?
Let's be honest. These are not success stories. These list feels more like they use Lisp because they are extremely familiar with it. The fact that Naughty Dogs used Lisp doesn't mean Lisp is viable - it just means they have built extensive tooling around it; it is their secret sauce, and they will not share it (it is their rice bowl after all). No games or companies (on the Sony platform) before or after them used Lisp in a major way. It is probably not practical.
And furthermore, with the explosion of indie gaming some time ago, no notable Lisp games was released. Lisp is supposed to be the secret weapon for single developers or small teams - yet I see none of it.
On performance, it is said that Lisp can be 1.5-3x performance of C, and there are even claims that it can go faster than C because the compiler + runtime are included. Now, on the "faster than C part", it's quite hard to believe, when Java with tons of engineering work, finds it quite hard to be on par with C.
Now, that being said, I present my pet peeves.
Lisps might need a lot of effort to reach "close-to-C" speed. Java can have moderately decent programmers with low to moderate effort, and produce "close-to-C" speed. That is the true achievement of Java in my opinion. I don't have to be damn fucking smart or spend a lot of time to achieve great performance, memory safety, easy-to-read code, and more, with just higher memory usage. And these days, I suspect it is even lower than SBCL if you limit memory and use parallel GC. That is a feat that is hard to beat.
What about C++? Lisp can reach "close-to-C" speed. There are claims that Lisps can beat C in speed because of compiler + runtime. Those are only claims. C++ has already beat C in performance, with zero overhead, using a poor mans macro (C++ template) https://stackoverflow.com/a/18004168.
On to the word "tooling", Lisp developers consider tooling as the ability to extend the language, create constructs that are simply not possible in other languages. In the rest of the world, tooling means... tooling.
Like the macro LOOP. If this is tooling, then it is a fucking monstrosity. We all have limited mental capacity. If my program is going to have multiple LOOP-like mental usage, well.. fuck me.
Toolings are like.. IDEs. And sometimes they are so damn good it is not even funny. But the most important thing they do is to reduce your mental load, by being as smart as possible. Tooling does the work, you do the coding. I sometimes wonder if IDE users realize you can do 99.9% of the same things with... | Hacker News (ycombinator.com)
And since I like Java, I will just say some things. Java the language is hilariously weak compared to Lisp, but the runtime, ecosystem, tooling, everything far outshines current Lisps. And the Java language are clearly designed by level-headed geniuses - at least they never claim that Java is the best full stop. Well, I consider them geniuses when I read Brian Goetz, Aleksey Shipilëv, or Ron Pressler when it comes to Java.
And while there is a saying that Java needs a state-of-the-art GC because of all the garbage it produces.. well it is also because of this GC that you can have highly performant code with mediocre code, that won't blow your memory.
The funny thing is that from a purely technological point of view, Java (even th... | Hacker News (ycombinator.com)
JVM Anatomy Quark #11: Moving GC and Locality (shipilev.net)
Java is better than C++ for high speed trading systems | Hacker News (ycombinator.com)
A few more links to show why I feel these people are so delusional. If only they were more pragmatic
https://news.ycombinator.com/item?id=37458188
https://news.ycombinator.com/item?id=35006777 and https://news.ycombinator.com/item?id=35006777&p=2, search for lisp
https://news.ycombinator.com/item?id=37308747 and https://news.ycombinator.com/item?id=37308747&p=2, search for lisp
5 notes
·
View notes
Text
i saw this fast inverse sqrt function somewhere online, and it fascinated me to no end. (the left is the fast inverse, and the right is the `math.h` impl)
`main()` is just some crappy test suite i whipped up for testing purposes
the code in question was made for quake III arena’s gameengine.
here’s a video that explains it pretty well:
youtube
i was thinking, how would i achieve the same level of elegance, but in the context of lisp?
my notes (probably not super accurate, but probably still interesting to see how my brain tackled this):
thinking lisp brain here:
i came across this stack-exchange question:
i can treat the array as a sequence of nibbles (four bits), or a “half-byte”, and use the emergent patterns from that with the linear algebra algorithm in this post.
we can predict patterns emerging consistently, cos i can assume a certain degree of rounding into the bitshifted `long`. because of that, each nibble can have its own “name” assigned. in the quake impl, thats the `long i;` and `float y;`
instead of thinking about it as two halves of a byte to bitshift to achieve division, i can process both concurrently with a single array, and potentially gain a teeny bit of precision without sacrificing on speed.
i could treat this as 2x4 array.
each column would be a nibble, and each row would be 2 bits wide. so basically its just two nibbles put next to eachother so the full array would add up to one-byte.
the code is already sorta written for me in a way.
i just need a read-eval loop that runs over everything.
idk if it’s faster, if anything it’ll probably be slower, but it’s so fucky of an idea it might just work.
a crapshoot may be terrible but you can’t be sure of that if ya never attempt.
4 notes
·
View notes
Text
youtube
0 notes
Text
decided to learn common lisp, seems very different from everything else.
0 notes
Text
Y’all want to see the worst lisp function I’ve ever written?
Too bad.
0 notes
Text
Cannot believe a function written in Common Lisp has started following me
0 notes
Text
Takashi Shirogane is and always was a gay man. If you can't accept that, you're probably homophobic.
#Takashi Shirogane#Shiro#You're nothingness but shining and everywhere at once.#Voltron: Legendary Defender#Meta.#VLD Meta.#This is NOT 'coding' or 'subtext'.#He was intentionally drawn and animated as a gay man because he IS one.#He didn't need to speak with a lisp and walk around with a limp wrist while wearing loud colors like a flamboyant stereotype#or flirt with every single man he comes into contact with#for his sexuality to be valid.#You guys are just mad that your ship wasn't made canon and choose to disrespect and disregard the actual gay character#insisting that he 'isn't gay enough'#like he has to meet your criteria of gayness to be a real homosexual.#It's so gross.#I genuinely hope that the people who hate Shiro never come into contact with real human beings that have anything in common with him#because no one deserves to be subjected to ableism#ageism#homophobia#and bad faith interpretations of their every move.
11 notes
·
View notes
Text
I knew moving from a FAANG to a midsized company outside of the software field would be an adjustment. But I was not prepared for the sheer number of things that are just baffling design decisions.
The stuff that everyone recognizes needs to be fixed but haven't had the time to knock out is understandable. It's the stuff that people are like "and what about it?" for the absolute wildest design choices that perplex me the most.
#codeblr#progblr#Code smells#The latest thing is releasing a library that cannot be manually tested outside of prod#I didnt even realize that was possible#If we were using a lisp then itd be a bit more forgivable#It also currently has no unit tests but at least they see the value of that#Theyre saying its a common industry practice#Is it?#Also is it a common industry practice amongst companies that have robust software?#When they hired me they told me they did TDD#That word I do not think it means what you think it means#I went in expecting to be hindered by a rigid push to have 100% code coverage but this is actually worse
10 notes
·
View notes
Note
Oh yeah, you said you'd like to know more about common lisp! I'm not the most proficient at it, but it's a really wonderful language, and I'd love to try and answer any questions you have!
Okay reverse Ask time then
How do namespaces/packages work? I somehow always end up stuck in the wrong one and let stops working...
3 notes
·
View notes