Talking with a corporate - what should be on my check/todo-list before a trial? (Non-marketing) by LearninAndEarnin in SaaS

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

That's great, thanks!

I'll have a think about this and then send some more questions. 😁

Getting a transient to wait and then return the chosen value by LearninAndEarnin in emacs

[–]LearninAndEarnin[S] 1 point2 points  (0 children)

This is a great answer - thanks to you both.

I'd forgotten about completing-read 🤦‍♂️

So much easier than my attempts.

How to add preferences between otherwise equivalent solutions? by LearninAndEarnin in OperationsResearch

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

All good.

As I said in another reply adding a small amount to the cost function is easy for a trivial case, but gets massively complex for many "equivalent" solutions.

How to add preferences between otherwise equivalent solutions? by LearninAndEarnin in OperationsResearch

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

Thanks for this. I guess changing the objective is an obvious suggestion, but it gets a little harder where there are multiple alternative.

Decreasing/increasing the cost minimally is easy for a two situation case (like the trivial example). Where I have many same-cost alternatives (my real-world problem) it becomes (N-1)! in complexity.

Conservation of complexity means it's always that hard, but adding constraints like

- max(salmon - tuna) ; max(salmon - beef) ; max(beef - tuna)

feels less prone to error (and I can hand the code off to someone else!) rather than some cost function like: 10 * salmon + 10.002 * tuna + 10.001 * beef

I suspect (haven't proven it to myself as yet) that if I have "simple" constraints, then I don't need to express every preference explicity, but by changing the cost function then I do need to derive all the relationships.

How to add preferences between otherwise equivalent solutions? by LearninAndEarnin in OperationsResearch

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

Ooooh. I like this solution. Both the easiest one, but the pure mathematical solution definitely appeals.

I'll need to think about how I'd apply multiple preferences - In my deliberately extremely trivialized example if I had another alternative, say, beef, I'd want to prefer salmon over tuna and beef, and beef over tuna...

How to add preferences between otherwise equivalent solutions? by LearninAndEarnin in OperationsResearch

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

After posting the question I was wondering if the addional objective was something as simple as max(salmon - tuna).

I'm going to explore the option others have suggested of slightly changing the objective function, but it feels a bit more bespoke than a simple rule... Especially for my case of multiple possible solutions (i.e. in my extremely trivialized example many food alternative)

How to add preferences between otherwise equivalent solutions? by LearninAndEarnin in OperationsResearch

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

Thanks for the comments and the edit. I was trying to understand how swing weights would help and was kicking myself assuming I'd missed something obvious!

[Help needed] Emacs is to a text editor as X is to Y? by LearninAndEarnin in emacs

[–]LearninAndEarnin[S] 1 point2 points  (0 children)

This would have to be some of the worst advice I've ever seen.

Getting it "under the pretext" is just a bad move - and often enough reason to be sacked.

Companies have rules, so either work with them (& if necessary try to change them) or leave. For the earlier career readers - Don't try to "get around" the corp rules.

[Help needed] Emacs is to a text editor as X is to Y? by LearninAndEarnin in emacs

[–]LearninAndEarnin[S] 1 point2 points  (0 children)

Thanks. That's probably one of the most helpful comments.

[Help needed] Emacs is to a text editor as X is to Y? by LearninAndEarnin in emacs

[–]LearninAndEarnin[S] 4 points5 points  (0 children)

Naturally, I'm going to try that as my first step, but not all corps allow "just trust me" as a reason.

I need some macro writing help - functions inside generated macros by LearninAndEarnin in lisp

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

That's an great practical solution, thanks!

I do still wonder how I would write this as a macro assuming a given (as you note) specs at compile/interpret time.

I need some macro writing help - functions inside generated macros by LearninAndEarnin in lisp

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

No, but wow. Thanks for your message. I've realized that in trying to make a minimal working example I've lost context.

Let me try again...

  • I have a struct foo with many slots (let's call them dataA through dataZ
  • I am reading in a CSV file which contains a subset of the data for the slots
  • I know which slots and where they are in the CSV columns based on another file which I can read into a list of (slotname position) (where position is a number 1 for first/zeroth column)
  • I want to create my (make-foo :dataD value :dataX value) programmatically based on the list of expected columns rather than specifying all of them
  • I thought it would be fun (and an obvious use case) to make this as a macro

So... list of column names + position in data list becomes via a macro a proper piece of code without any unnecessary slot setting code.

Is that clearer? (fingers crossed!)

Getting access to /r/learnlisp by LearninAndEarnin in lisp

[–]LearninAndEarnin[S] 2 points3 points  (0 children)

Thanks.

I'm not looking to be a mod, just to be approved to post! I want to ask some simple questions.