Long Live Indices

Long live Indices

Question for a higher power: Is the ability to access specific list indices something I’ve always taken for granted? Or should it be an expectation? 

Scheme’s implementation of a “list” is a series of nested pairs (sorta nested - I’m calling it that even though that’s not completely correct), so you can either get the first element in the list or all of the others UNLESS you know the specific index you need in a constant fashion (i.e. “c” + [combination of “a”s and “d”s] + “r”). 

Haskell has those sweet sweet index accessors we all know and love from C and it’s children and even most of it’s counterparts. Even in C itself there was functionality to store an address to a pointer and then just do pointer arithmetic to access an index like arr[2] -> 0x#{ADDRESS OF arr} + 2. It’s simple and straightforward, so I don’t feel like I’m being difficult to expect that of my programming language. Am I, though? 

You’ve probably noticed by now that this post isn’t meant to be a coherent case for anything; it’s more of a ramble and a rant. Honestly, though, just give me accessors (and mutatability too please... I’m looking at you Go. Nobody thinks you’re slick with your whole “arrays are static and annoying use slices because we’re edgy”).

More Posts from Cssengineer and Others

4 years ago

Reblog if you’re a student actively ignoring an assignment

4 years ago

You know how there are a lot of programming languages that people say are “really powerful if you know how to use them”? And how usually those languages aren’t at all worth the time? I think Haskell might actually be worth the time. After a hiatus I’ve come back to it and love it. I hardly know how to use it, but at least I can perceive how it might be really powerful.

Prolog is still the worst, though.


Tags
2 years ago

C is a shot of American Rye (100 proof, bottled-in-bond)

Python is a Ramos Gin Fizz

Javascript is a bone-dry, dirty, vodka martini

React a Cosmopolitan

Angular an Appletini

Express an Espressotini (yea I say that instead of “espresso martini” because I find it more fun this way)

C# is a Sazerac with equal parts cognac and whiskey, and the person making it will HAVE to tell you how “a lot of people say it’s the first cocktail, but that’s not really true”

if i were a drink i’d be cherry vanilla coke


Tags
2 years ago

It’s high time I dip my toes into Rust


Tags
4 years ago
And An Unholy Amount Of Linear Algebra

and an unholy amount of linear algebra


Tags
5 years ago

CSS, the most toxic lover

Oh CSS,

I have not a single guess

how one can hope to ever

with you win success.

Sweet CSS, 

you leave my sanity a mess

and my div tags all in shambles

while I trudge on with hopelessness.

Bitter CSS,

though you display indifference

as you treat me miserably

to you I will always return, nonetheless.


Tags
3 years ago

Hey! Computer Science B.S. passing by. CS, like the last reply mentioned, is a science. A lot of schools will lump it in with the college of engineering (e.g. the one I went to), which isn’t necessarily wrong, but ultimately the discipline is a natural science.

In fact one could argue that hardware computers aren’t even necessary to perform the activities of pure computer science: people like Leonhard Euler were discovering its principles long before the first transistor had been made. Heck, even if your laundry-sorting process is rigid enough you could call it computer science.

I think of computer science as the study of the ways to move and store data. The best way to accomplish those activities happens to be with computers, so we concern ourselves with applications on the creations of our computer engineering friends.

hey! could you help me with the difference between computer science and computer engineering?

hi! my background is experimental physics, so you might be better off asking someone who is actually from one of those disciplines. but my understanding is that computer science focuses on software (eg data structures, coming up with algorithms) while computer engineering is a marriage of cs and electrical engineering, which involves more work on the electronics/hardware side of things. because of this, you'd need to learn a lot more physics for a computer engineering degree.

5 years ago
For Those Of You Who Are Worried About AI Taking Over The World, This Is The Sentence Produced By A “neural

For those of you who are worried about AI taking over the world, this is the sentence produced by a “neural network” (a fancy name for my relative frequency matrix) after I had it read Beowulf, Galen, Guinea, Little Women, Mansfield Park, Peter Pan, Pride and Prejudice, Sense and Sensibility, A Tale of Two Cities, and The Call of the Wild. (All are freely available on Project Gutenberg in many filetypes including plain text, btw).


Tags
5 years ago

You’d think after all the time I’ve spent on front-end dev I’d be able to at least write efficient CSS. You’d think. 


Tags
2 years ago

CSS art terrifies me to the point that I don’t even have the courage to try it. Tremendous respect to people who can make it.

I Don’t Want To Come Off Negative… But You Know How These Things Go.

I don’t want to come off negative… but you know how these things go.

  • estrapaded
    estrapaded liked this · 3 years ago
  • devstree
    devstree liked this · 3 years ago
  • setnzal
    setnzal liked this · 4 years ago
  • nobleman-ifunny
    nobleman-ifunny liked this · 4 years ago
  • cssengineer
    cssengineer reblogged this · 4 years ago
cssengineer - An Agitated Programmer
An Agitated Programmer

he/himComplaining on Tumblr is a good alternative to punching my computer screen, right?

72 posts

Explore Tumblr Blog
Search Through Tumblr Tags