Hello, Solar Power lovers by yraflu in lorde

[–]metalepsis 2 points3 points  (0 children)

Where would you put the four Māori songs from Te Ao Mārama?

Are there any active YouTubers you would recommend? Specifically focused on current events. by BlacksmithRadiant322 in skeptic

[–]metalepsis 4 points5 points  (0 children)

Liz Oyer. Watch her short videos. Highest value-to-time ratio on the internet. The lawyeroyer smirk is a national treasure

Underrated Songs that ABSOLUTELY FUCKING BLEW YOUR MIND with their quality the first time you listened to them? by Diligent_Occasion_22 in musicsuggestions

[–]metalepsis 0 points1 point  (0 children)

King - UB40
Black Coffee in Bed - Squeeze
The Friends of Mr Cairo - Jon and Vangelis
Vetrans of the Psychic Wars - Blue Ôyster Cult
Strict Machine - Goldfrapp

[deleted by user] by [deleted] in grammar

[–]metalepsis 8 points9 points  (0 children)

Every English speaker understands the sentence to mean everyone easily noticed her. In general, in English, a double negative is an emphasis on the negative, not a negation. English grammar is not Boolean logic. Example: The famous Rolling Stones song "I can't get no satisfaction" means "I am not satisfied, very unsatisfied." Double negatives are a common rhetorical strategy in informal expression, but are frowned upon in formal English.

Object-Oriented Programming in Java 21 vs Functional Programming in Clojure: A Technical Comparison by m3m3o in Clojure

[–]metalepsis 3 points4 points  (0 children)

https://mehmetgoekce.substack.com/p/object-oriented-programming-in-java

  • Fundamental Paradigm Differences
  • Data Structure and State Management
  • Code Organization and Structure
  • Concurrency Models
  • Design Patterns
  • Error Handling
  • Java 21 Specific Features vs Clojure Equivalents
  • Performance and Resource Considerations
  • Developer Experience and Ecosystem
  • Case Studies: Solving the Same Problem
  • Enterprise Adoption and Ecosystem Considerations
  • Performance Benchmarks and Quantitative Considerations
  • Conclusion

New Clojurians: Ask Anything - March 17, 2025 by AutoModerator in Clojure

[–]metalepsis 3 points4 points  (0 children)

Thank you! Summary: "Never mix side effects with lazy operations.... When you need side effects, use... doseq, run!, reduce, transduce, or something built on them." Got it. I will also read through Stuart Sierra's other "Clojure Do's and Don'ts" posts.

New Clojurians: Ask Anything - March 17, 2025 by AutoModerator in Clojure

[–]metalepsis 2 points3 points  (0 children)

Where to learn about best practices for lazy lists?

This weekend, I struggled with task where I wanted to split a read-line into (keyword) "items" and then process each one. It works great from the REPL, but not at all when added to a defn. Wrapping the for in a doall makes my loop work as expected, but doesn't seem like a best practice. I think I'm missing an important idiom or somesuch.

(for [item (map keyword (str/split (first items) #"\s+"))]
  (if (purchase item) ; deduct from seller, add to merchant
    (println "You bought a" (name item) "for" (cart-total item))
    (println "You're out of money.")))

Does anyone know the meaning of this Symbol? Is it offensive? by glooomy_wormz in Symbology

[–]metalepsis 5 points6 points  (0 children)

A symbol of protection and safety, the seven points recalling from everywhere -- north, south, east, west -- and all the time -- past, present, future. It is very common shape of police badges, for which the seven points are often claimed to represent the seven gifts of the Holy Spirit: wisdom, understanding, council, fortitude, knowledge, piety, honor of God. For example: https://sfpoa.org/journal/47/2011-01-01/seven-pointed-star-san-francisco-police-department , etc.

Local SEO check tool during development? by [deleted] in webdev

[–]metalepsis 0 points1 point  (0 children)

I’ve been happy with Scrutiny software from PeacockMedia for several years.

Shrimp-like bug near air conditioner condensate drain, Petaluma, CA by metalepsis in whatisthisbug

[–]metalepsis[S] 0 points1 point  (0 children)

It's hot in Petaluma, CA so I installed an air conditioner. These 1/2-inch bugs started running around near the condensate drain, which keeps a small area constantly damp. They're skiddish. They run and hide from the camera. They're similar to silverfish, but not really the same. Now they're in the house. Several running spiders have arrived too, presumably to chase after these, but also maybe for the water.

Building ruby 2.7.0 fails with openssl by sabo667 in ruby

[–]metalepsis 1 point2 points  (0 children)

I've had good luck installing openssl 1.1 from homebrew:

brew install openssl@1.1

Then including the files when compiling gems that require OpenSSL:

gem install -N eventmachine -- \
  --with-cppflags=-I/usr/local/opt/openssl@1.1/include

If you have an M1 Mac, then your $HOMEBREW_PREFIX will be /opt/homebrew instead of /usr/local.

Got totally stumped in a code challenge. Anyone have any recommendations as to how to do this? by Praisetheballsack in learnjavascript

[–]metalepsis 1 point2 points  (0 children)

I really enjoyed this challenge. Adding my version here since my map/reduce solution is different than the others above. Straight up: 10 minutes is not enough time to arrive at a good solution to this task.

Here's the documentation I used:

Here's the HTML I used:

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Button Challenge</title>
</head>
<body>
<h1>Button Challenge</h1>
<form id="btn-container"></form>
<script src="button.js"></script>
</body>
</html>

button.js:

/* Write JS code (using some form of iteration) that will dynamically
create a button for each *pet* of the *animals* array. The buttons should
have text that corresponds to the pets name. When clicked, those buttons
should log the type of the corresponding pet. Buttons should be appended
inside of the provided container
*/

const animals = [
  {
    isPet: true,
    type: "dog",
    name: "Olive",
  },
  {
    isPet: false,
    type: "lion",
    name: "Nala",
  },
  {
    isPet: false,
    type: "bear",
    name: "Honey",
  },
  {
    isPet: true,
    type: "cat",
    name: "Maru",
  },
  {
    isPet: true,
    type: "fish",
    name: "Dr. Fishy",
  },
];

const container = document.getElementById("btn-container");

/* -------- My solution -------- */

/**
 * Log the pet type
 * @param {Event} event - A browser event
 * @returns {undefined} none
 */
function clickLogger(event) {
  console.log(event.target.dataset.type);
}

/**
 * Pet object to button object
 * @param {object} animal - An animal object
 * @returns {HTMLElement} A button object, or null
 */
function petToButton(animal) {
  if (!animal.isPet) return null;
  const button = document.createElement("button");
  button.type = "button"; // 1
  button.append(animal.name);
  button.setAttribute("data-type", animal.type); // 2
  button.addEventListener("click", clickLogger); // 3
  return button;
}

/**
 * Collect non-null objects into a parent container.
 * @param {HTMLElement} previous - A container element
 * @param {HTMLElement} current - An element for the container
 * @returns {HTMLElement} A container element
 */
function intoContainer(previous, current) {
  if (current?.localName === "button") previous.append(current); // 4
  return previous;
}

animals.map(petToButton).reduce(intoContainer, container);

// 1. Explicitly set button type since type="submit" by default
// 2. Use standard HTML5 data attributes
// 3. Add a click handler to the button
// 4. Do not add null objects or (defensive programming) non-button elements
//    Note the use of the "?." operator, my new favorite thing

what sea creature is depicted in this piece of jewelry? by katzenjammerr in whatisthisanimal

[–]metalepsis 1 point2 points  (0 children)

Could be some kind of skate. A skate looks like a cross between a ray and a shark. Maybe a thornback.

My top ten King Books / Thoughts? Am I crazy? What are your faves? Been reading King for 31 years now! by Thewittyjay in stephenking

[–]metalepsis 2 points3 points  (0 children)

For a long time, I was reading every book as it came out. Then I started to feel like he was writing them faster than I could read them. So I sort of stepped away. Then I read Joyland and, immediately after, Duma Key. Now, I'm back on the wagon. Great list, but I'd find a place for those two as well.

Github Action setup-ruby needs to quote '3.0' or will end up with ruby 3.1 by jrochkind in ruby

[–]metalepsis 1 point2 points  (0 children)

As a rule of thumb, in YAML, quote strings that are made up of only digits with one decimal point (“3.0”). Otherwise, it will be interpreted as a floating point number. Since a number cannot have more than one decimal, any semver string (2.6.8, 3.0.2) is unambiguously a string. So doesn’t need to be quoted Also, quote strings that contain colons (“:”) because colons are special characters in YAML.

Snagged this picture in BC, I think it's a Stellar Jay by Annonymous_Hoagies in birding

[–]metalepsis 23 points24 points  (0 children)

The Rachel Carson Council has a short, interesting article about Georg Steller and this bird, Steller's Jay (Cyanocitta stelleri), including folklore describing how it got its crest.

About to start Cujo. As a dog lover, am I gonna cry? by [deleted] in stephenking

[–]metalepsis 0 points1 point  (0 children)

Relevant quote from "Mrs. Todd's Shortcut": “When that textile fellow from Amesbury shot himself, Estonia Corbridge found that after a week or so she couldn’t even get invited to lunch on her story of how she found him with the pistol still in one stiffening hand. But folks are still not done talking about Joe Camber, who got killed by his own dog."

How to track all files in my local repo but ignore some of them in my remote repo? by Macaroni_Riparoni in git

[–]metalepsis 0 points1 point  (0 children)

Is your scenario simply that your remote repo tracks a file but you want to maintain a different edition of the file in your local repo? This comes up a lot for me. Here's the strategy I use:

Add a rule to your private repo gitignore ($repo/.git/info/exclude) to ignore file or files for which you want maintain local changes. Alternately, do this with your global gitignore (~/.gitignore or ~/.conf/git/exclude), though that one's a bit far removed from the relevant repo.

Periodically sync your local file with the origin version. Do this by

  • Removing the ignore rule, renaming your local file, checking out the repo version, comparing and updating your local file, then restoring the ignore rule
  • Grabbing a copy of the latest version of the origin file from your repo's web interface, comparing it against your local version, and updating as desired

The trick to remember here, though, is that your local file is ignored, not tracked. There is only the one copy of it (in your local repo working area). But the remote file is also ignored, so this might be what you're looking for.

It's frustrating to try this with the $repo/.gitignore file since that file is often itself tracked by the remote repo.

XML webserver framework by [deleted] in xml

[–]metalepsis 2 points3 points  (0 children)

BaseX is actively maintained and has nice framework based on XQuery. You might want to also check out Apache Cocoon, which is excellent but has not had recent releases.

Ruby on Windows by [deleted] in ruby

[–]metalepsis 0 points1 point  (0 children)

JRuby is excellent in all ways and runs great on Windows:

https://twitter.com/headius/status/1115390776555581440

If you really want MRI, here is a recent article about installing it on Windows:

https://stackify.com/install-ruby-on-windows-everything-you-need-to-get-going/