Show newer

I'm working with some code where a function takes a `date` parameter, and if no date is provided, calls _in the default argument constructor_.

The functional programmer in me finds that absolutely horrifying.

I'm not sure why calling an impure function in the argument constructor bothers me so much more than calling it in the body of the function would – but it sure does!

In every programming language I've ever heard of, program control flows left→right and then top→bottom. That is, this psudo code:

{ print "1" } { print "a" }
{ print "2" } { print "b" }
{ print "3" } { print "c" }

would print 1a2b3c

Are there any languages (even eso-langs/DSLs) that invert that order, so that the above would print 123abc?

It occurs to me that a left-to-right control flow would be a good fit for a lot of "pipeline" type data work, and I'm curious if anyone has tried it

For those of you with functional-programming sympathies, what are your thoughts on environmental variables? Do you think they make an otherwise pure function impure?

I'm torn. On the one hand, if a fn is a pure mapping from input => output, it seems pure regardless of how it reads the input. `FOO=1 cmd --bar=2` seems identical `cmd --foo=1 --bar=2`

On the other hand, referential transparency *usually* means being able to reason about a fn from the callsite. And env. vars lose that.


Many programming languages have syntax that means "everything from this token until the end of the line is a comment" (e.g., // in C-family, ; in Lisp family, # in shell family)

Do any have syntax for "everything from this token until the end of the line is a string"?

Why isn't that a common thing to have? It strikes me as something that'd be *super* handy

The joke in this image is both obvious and old, but I still laughed audibly when I unexpectedly came across a presentation slide that described a compiler with the following:

Static site people - has anyone tried Zola? What did you like or dislike about it?

Gonna be setting up email alerts on my self-hosting machine this weekend. Any suggestions?

This is the sort of programming ethos to which I aspire:

> I was watching TV, and there was a commercial which proclaimed, "It's time to do what you want!" I replied to the TV, "It's time to write a JSON parser in 6502 assembly language?" Somehow I don't think that's what they had in mind, but the TV is right, I should do what I want.
> So, here is my JSON parser.

This may seem strange, but I'm wondering if anyone in the fediverse has any experience running Veracrypt containers on 3.5 inch floppy disks? If so, what was your experience?

@codesections Did you know that C compilers are still only required to support up to 4095 characters on a line of source code? If you have a line of code in your C program that's longer than that, the standard doesn't guarantee it has to be compiled correctly :)

TIL: many compilers allowed identifiers of any length, but only examined the first 8 characters to determine what the identifier pointed at.

So `foobarbaz` and `foobarbazqux` are both valid, but refer to the **same** variable!

What I _didn't_ learn was why anyone thought this was a good idea. I assume it was for performance reasons, since Free Pascal doesn't do it anymore ( and 8 makes me guess it has something to do with memory representation.

Anyone know?

Anyone have recommendations for writing Python in Neovim? Plug-ins, etc. Is Python-mode the go-to plug-in? Is PEp8 good to use?

I *really* like the Redis protocol, RESP. I don't even use Redis itself all that often, but I've implemented RESP (or subsets of it) multiple times – it's just a great format for programmatic communication

(err, ^^^ was intended to be a reply to @IanTester. Not sure how I messed that up)

Show thread

> Hmmm, it's never good when a new kernel is released just two days after the previous one.

What, you'd prefer that they *not* release a fix? :D

(Obligatory xkcd: )

Data is gone. Couldn't fix the issue.

Lost like 20%, but my backups covered the most part.

Reminder that backups are important!

I missed this post when it came out in December: In Defense of Blub Studies,

Some really excellent points:

> Blub studies is a never-ending treadmill of engineering know-how. It’s the fiddly technical details of how Git stores data, or how Postgres locking semantics [work], or why pip install failed this time.…Blub studies is more generalizable than it seems, and has its own way of compounding over time, too. That makes it a lot more useful than you’d expect

living room thermometer does the job in the fridge too, but is not happy about it

TIL: was released in 1990, barely a year after .

(I would have sworn that Zsh was at least a decade younger. But I would have been _confidently_ wrong, which is the absolute worst kind of wrong to be!)


Show older

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.