like this
David Zaslavsky reshared this.
Escaping William Branham's "The Message"
The Cult Vault returns with an interview featuring John Anderson, a survivor of William Branham’s cult of personality known as “The Message.” John descriVault Productions (Spreaker)
/ function silently drops the decimal in its result if both of its inputs are integers... so (/ 1 2) evaluates to 0, not 0.5. Granted, this is also the way that C does it, but in my defense, #CommonLisp does not do this.like this
@Vassil Nikolov | Васил Николов Ah, I've never used Pascal. It's just that since elisp is a dialect of Lisp, I expected behaviour that was more in line with Common Lisp than C is all.
Note: minor edits for better clarity
As a first approximation, I suggest thinking of Emacs Lisp as closer to MacLisp than to Common Lisp.
A precise description of "closer" would be fairly long.
For example, Emacs Lisp acquired things like bignums and lexical bindings fairly late.
Again as an approximation, the descendancies are:
MacLisp → Emacs Lisp
MacLisp and others → Common Lisp
(Those others include, in alphabetical order, Interlisp, Scheme, Zeta Lisp, etc., but not Emacs Lisp.)
And then an important aspect of these approximations is the `cl' package, also a late addition that evolved quite a bit.
Transferring knowledge about C to Emacs Lisp is rather tricky, even though the implementation of a part of Emacs (including the Emacs Lisp virtual machine) is written in C.
#CommonLisp
#Elisp
#Emacs
#EmacsLisp
@me
yup of course, but that's integer math, not floating point math
GNU Clisp and SBCL don't show decimals for integer division, but return fractions instead!
* (/ 1 2)
1/2But of course if you use floating point representation for the parameters then the result is a floating point number as expected:
[1]> (/ 1.0 2.0)
0.5Elisp, with floating point parameters, also works as expected:
(/ 1.0 2.0)
0.5In C, with IEEE 754 double values, then 1.0/2.0 = 0.50, exactly, no rounding or epsilon comparison needed.
Jonathan Lamothe likes this.
Spent several hours today trying to figure out why my #elisp code was misbehaving. Turns out, I made a mistake while trying to be clever. Instead of doing:
(when (and cond1 cond2)
stuff
...)I did:
(and cond1 cond2
stuff
...)...which would only work if every instruction in
stuff returned a non-nil value.I should stop trying to be clever.
Edit: when, not while
like this
Dave Marquardt reshared this.
I was wondering why not use "if" rather than "when" here. Well, if is a bit different in that it only allows a single expression as the THEN part. But I wasn't so wrong. "when" is defined as a macro essentially like this:
(list 'if cond (cons 'progn body))
when when I don't have an else clause. That way I don't have to bother with a progn. I just wish that I had thought to extend that logic to and.
(defun jrl-collect-data (table input output)
"Collect table data into lists of outputs per input"
(let (res record in-val out-val collection)
(while table
(setq record (car table)
in-val (assoc input record)
out-val (assoc output record))
(when (and in-val out-val)
(pop in-val)
(pop out-val)
(setq collection (assoc in-val res))
(if collection
(push out-val (cdr collection))
(push (list in-val out-val) res)))
(pop table))
res))I should probably throw some comments in here, but essentially the
assoc in the when block always returns nil on the first iteration of the loop, and if it can't progress past that point, it'll always return nil on subsequent loops and nothing will ever happen. As a result, any list I might feed into this function is always going to result in a nil output.
Had a bit of a stuffy nose this morning, but couldn't figure out where the salt/baking soda mixture I'd prepared for the neti pot had gotten to. I decided to use the (boiled and cooled) water without it, because... how bad could it really be?
Do. Not. Recommend.
My eyes just stopped watering.
David Zaslavsky reshared this.
Mormon Endowment’s Earliest Historical Form ! – Radio Free Mormon
Mormon Endowment’s Earliest Historical Form !Bill (Radio Free Mormon)
So, I think I might be a nerd.
@SDF.ORG is running a BBS called bitzone. On this BBS they have a door game called LORD (League of the Rare Dragoon (not to be confused with Legend of the Red Dragon, of which it is clearly a knock-off)).
The fact that I'm playing this game in the first place is kind of nerdy, but wait, there's more.
In said game you have a character with various stats. One of these stats is "charm", which seems to get you discounts in the shops. Unfortunately, there's nothing to say exactly how this relationship works. So I've decided to try to reverse-engineer it with #emacs #org-mode.
I've created a table to track my purchases. It tracks my charm at the time of purchase, the list price for the item, and the price I actually paid. There's also an additional colum that calculates the actual discount, but that's trivial.
Anyhoot, I'm adding some code to this file that reads the values in the table and computes the simplest polynomial function that satisfies the equation:
$$price_{actual}=f(charm,price_{list})$$
This is done with the aim of predicting how much I'd actually spend on an item before actually buying it. It of course assumes that the equation being used is a polynomial equation, but I'm hoping it'll at least be able to approximate with a large enough set of data points.
Am I doing this because it's reasonable?
No.
I'm doing it because it's an interesting challenge... and I'm a nerd.
CC: @tob
like this
So it occurs to me that the approach I was considering is probably not going to work for a couple reasons:
- I thought the technique I use for curve fitting a single input function could be adapted to multi-dimensional functions. I realize now that it can't (at least not in the way I was thinking).
- Even if I do sonetning like calculating the discount value based on the list price and actual price and fitting a curve between that and the charisma stat, the discount is going to have to be constrained within a range between zero and the list price. A polynomial function with a finite series of terms just isn't going to be able to cut it.
I'll continue collecting data to see if any patterns start to emerge, though.
It's also a good option to use C-c ' , that will open up a buffer with the source block contents. This is neat because the major mode and all related setup for that mode is loaded as well, no matter which language you're editing.
So no need to yank from the scratch buffer.
Jonathan Lamothe likes this.
Mormon Africa Baptism Fraud: RFM: 470 – Radio Free Mormon
Mormon Africa Baptism Fraud: RFM: 470Radio Free Mormon
If I had a dollar for every time I tried to erase something in #krita that turned out to me a smudge on my screen... I would have a few bucks.
Also, I should probably clean my screen.
like this
Gave myself a bit of a scare. My aNONradio stream cut out on me and when I went to investigate, I found the router dead. No lights. Nothing. Disconnectd the power cable from the back and re-attached.
Still nothing.
When I followed the power cord, I found that the wall wart seemed to have come mostly unplugged from the power bar. I have no idea what caused it to spontaneously disconnect, but I'm back now.
Isaac Kuo likes this.
This question doesn't lend itself well to plain text, so I LaTeX'd and screenshotted it. I'll do my best with the alt text.![Is there a way of writing the expression<br>\[ \sum_{n=1}^m f(n) \]<br>in a way that omits the term where $n=a$?</p><p>I know it could be written as<br>\[ \left( \sum_{n=1}^m f(n) \right) - f(a) \]<br>but this doesn't work when $f(a)$ is undefined. Is there a way of writing the expression<br>\[ \sum_{n=1}^m f(n) \]<br>in a way that omits the term where $n=a$?</p><p>I know it could be written as<br>\[ \left( \sum_{n=1}^m f(n) \right) - f(a) \]<br>but this doesn't work when $f(a)$ is undefined.](https://social.jlamothe.net/photo/13528377976a61653463c9a386467268-1.png)
#math #maths #mathstodon #AskFedi
Edit: It turns out that Friendica has a MathJax addon. Who knew?
Also, it seems like there are a number of options. The one I like best is:
$$\sum_{\begin{matrix}1 \le n \le m\\n \ne a\end{matrix}} f(n)$$
Edit 2: It looks like this doesn't render properly when federated to a server without MathJax support. I suppose I should've seen that coming.
Mathematics Channel reshared this.
Here's a big part of the reason* I don't use so-called #AI to write code for me: I actually enjoy writing code. I wouldn't offload this task to AI for the same reason I wouldn't use it to go for a walk in the woods, or eat a delicious meal for me. Why would any sane** person do this?
* It's not the only reason, but this is a fedi post, not an essay.
** This post should in no way be considered as me claiming to be sane. 🙃
𝚛𝚊𝚝 reshared this.
Had the weirdest dream last hight. I dreamed I'd gone back to the Mormon church. It was very strange. I was happy to see many of the people I considered friends, but the whole thing felt dishonest because I was still an unbeliever. For all of its culty aspects, it does impose a lot of structure, and structure is a thing my brain very much likes.
For many reasons, this is not a thing I'd actually consider in reality.
I had a similar dream four years ago.
Went back to my old church, was glad to see a few people I really loved again.
Stayed for a couple months, but it had really devolved into a cult.
Noped out of there when the pastor invited people to come up to the front to receive healing and repent for taking the COVID vaccine.
🤦🏻♂️
Jonathan Lamothe likes this.
I've suspected for a while that I'm probably on the spectrum. It seems to fluctuate, but for the past few days I've been experiencing something that sounds very much like what I understand autistic burnout to be like.
Tasks which should be simple (e.g.: feeding myself) become insurmountable obstacles. I'm exhausted all the time, and when it's at its most acute, communicating what I'm experiencing becomes impossible. I literally lose the ability to form coherent sentences.
Is that what this is? Do others experience this? And more importantly, has anyone found any kind of strategies to help manage/minimize it?
The best way I've found to deal with it is to simply disengage from everything until I manage to build up a spoon reserve again. Unfortunately, this does not exactly seem compatible with the responsibilities of adulthood.
Edit: I realize that I may have given an incorrect impression in this post. I have experienced this before. It's just been particularly bad the past few days. It seems to ebb and flow.
In fact, I've had a term to describe this since high school. At the time, I had dubbed it a "neural meltdown".
reshared this
Could be autistic burnout, could be extreme fatigue for other reasons, could be a major depressive episode, could be dehydration as others have said. Could be a combination. (I speak from experience of all four)
Look after yourself. Hydrate and rest and try not to be angry or frustrated at yourself for going through this. It's not disrupting your life; it's an episode _in_ your life. It will pass.
@Drew is still tired 🇵🇭 I guess the best thing I can do is focus on the knowledge that it always passes (at least mostly). Hopefully the things currently on fire won't get too out of control while I do so.
I am fortunate to have a partner I can lean on when I need help, but I don't want to lean too hard. She has her own struggles to deal with.
Autistic Burnout: Signs, Stages & Recovery
Autistic burnout is the deep exhaustion that follows years of masking and overload. Here is what it feels like, the stages, and how recovery actually begins.HeyASD.com Team (HeyASD)
Jonathan Lamothe likes this.
Kevin Davy reshared this.
Jonathan Lamothe likes this.
That's a really useful piece. I now reckon I've been in burnout 4 or 5 times in my life, rather than the 2 or 3 I previously thought.
Jonathan Lamothe likes this.
be kind to yourself. Accept that there are limits to what you can do, and start saying no to things that would push you past those limits.
Also make sure your closest understands what you can and cannot do, so their expectations doesn’t wear you down.
But mostly, be kind to yourself.
Mormon Apologist Loses Mind: RFM: 467 – Radio Free Mormon
Mormon Apologist Loses Mind: RFM: 467Radio Free Mormon
reshared this
Not just YouTube either. Those ads are on billboards, podcasts, FM radio.
Doug Ford really loves spending money on ads about how great his government is (if you agree this is great, which I like you do not) instead of actually fixing problems.
The variant that enrages me the most is how "safer" means less encampments. Spending all that money telling us to be afraid of homeless people instead of spending it to house them.
Jonathan Lamothe likes this.
The funny* thing is that for the rest of us, it's a pretty comprehensive list of reasons not to vote for him.
* not funny
Got an air quality alert due to wildfire smoke.
My dude, I know. The sky is yellow.
Judy Anderson reshared this.
I woke up this morning and thought to myself, "what's burning?"
It's only everything. No biggie.
like this
Ryan Robinson reshared this.
Elder D. Todd Christofferson Needs To Step Down! [RFM:466] – Radio Free Mormon
Elder D. Todd Christofferson Needs To Step Down! [RFM:466]Radio Free Mormon
They’re Still Using My Research: RFM: 465 – Radio Free Mormon
They’re Still Using My Research: RFM: 465Radio Free Mormon
Dear @Nextcloud 📱☁️💻,
If the official solution to a file getting randomly locked is to shut the whole server down and then manually edit the database, something's been done wrong. If this were to happen to a random non-admin user, they'd have no solution (other than pinging their sysadmin). The owner of a file should be able to manually clear its lock if necessary.
I've been thinking about #bicycling in the oppressive heat we've had lately. I wondered if there was a way to rig up some kind of fan that would be powered by the pedals to create a nice airflow as I rode.
...
Then I realized what a ridiculous idea this was.
Check out Red Racoon. They do that regularly. 😀🚴♀️❤️
@🅰🅻🅸🅲🅴 (🌈🦄) I came across my first love lock a few days ago. I'd seen it a few times, but wasn't carrying my tools. I finally remembered to bring them with me today only to find that the keyway seemed to be filled with some sort of glue?
Have you encountered this before? Is there any hope of non-destructive opening left? I imagine probably not (especially at my current skill level).
I'm clearly not the first person who's tried to open it. It's in pretty rough shape.
@Organic Maps I've added some local businesses to the app on one of my devices, and that information can now be found on OSM proper, but those changes don't appear to have propagated to my other devices. Is there a way I can force a map update?
Edit: I have tried deleting and re-downloading the map.
Jonathan Lamothe likes this.
Obviously a 19th Century Production! – Radio Free Mormon
Obviously a 19th Century Production!Bill (Radio Free Mormon)
Got an odd email to my old Gmail address that I only keep around for legacy reasons, asking about an Emacs package I wrote. I'm not sure where they even got that address. It can't be found anywhere in the repository, and my current address is clearly in the README and on every single commit.
Anyhow, I don't even understand what they're asking, but I think they think I've used an AI agent to write the code and are asking about its configuration? I want to reply that I have no need of such things because I'm an actual programmer with an actual brain, but that would probably come off kind of asshole-ish, and I could be wrong about what they're asking.
Then again, this whole email could have been written by a hallucinating AI. Who knows?
FoxFunction
in reply to Jonathan Lamothe • • •Jonathan Lamothe likes this.
bignose
in reply to Jonathan Lamothe • • •No reason to deviate from #AGPL for this, @me.
The document has an obvious source form. It consists (in part) of program code. There should be no problem applying AGPL conditions for recipients.
Do you anticipate any specific problems with that plan?
Jonathan Lamothe
in reply to bignose • •Ross A. Baker
in reply to Jonathan Lamothe • • •CC-BY-SA is Creative Commons' answer to copyleft. CC-BY-SA-4.0 is one-way compatible into GPLv3. (The 4.0 is important!)
There's no CC license that forces code all the way to AGPLv3, but you can say "code blocks AGPLv3, the rest CC-BY-SA-4.0." You have to choose whether a single license or the Affero clause matters more.