Re: Sandhill. This literally sounds like BNR humour circa '94.
HN user
balnaphone
It works fine with GNU env with -S support, and a GNU-compatible kernel. I'm aware that won't work on some other systems, hence the 9 other examples. I said I would try that first and see how it goes, and low and behold it works fine on the systems I use.
$ cat bbb.ml
#!/usr/bin/env -S "/home/user/.local/bin/o c a m l" -no-version
print_endline "ok";;
$ ls -lh ~/.local/bin/"o c a m l"
lrwxrwxrwx 1 user user 14 Feb 27 07:26 '/home/user/.local/bin/o c a m l' -> /usr/bin/ocaml
$ chmod a+rx bbb.ml
$ ./bbb.ml
ok
$
But if it didn't work, you can get pretty good mileage out of abusing sh to get the job done for many popular languages.These are part of the rituals of learning how a system works, in the same way interns get tripped up at first when they discover ^S will hang an xterm, until ^Q frees it. If you're aware of the history of it, it makes perfect sense. Unix has a personality, and in this case the kernel needs to decide what executable to run before any shell is involved, so it deliberately avoids the complexity of quoting rules.
I'd give this a try, works with any language:
#!/usr/bin/env -S "/path/with spaces/my interpreter" --flag1 --flag2
Only if my env didn't have -S support, I might consider a separate launch script like: #!/bin/sh
exec "/path/with spaces/my interpreter" "$0" "$@"
But most decent languages seems to have some way around the issue.Python
#!/bin/sh
""":"
exec "/path/with spaces/my interpreter" "$0" "$@"
":"""
# Python starts here
print("ok")
Ruby #!/bin/sh
exec "/path/with spaces/ruby" -x "$0" "$@"
#!ruby
puts "ok"
Node.js #!/bin/sh
/* 2>/dev/null
exec "/path/with spaces/node" "$0" "$@"
*/
console.log("ok");
Perl #!/bin/sh
exec "/path/with spaces/perl" -x "$0" "$@"
#!perl
print "ok\n";
Common Lisp (SBCL) / Scheme (e.g. Guile) #!/bin/sh
#|
exec "/path/with spaces/sbcl" --script "$0" "$@"
|#
(format t "ok~%")
C #!/bin/sh
#if 0
exec "/path/with spaces/tcc" -run "$0" "$@"
#endif
#include <stdio.h>
int main(int argc, char **argv)
{
puts("ok");
return 0;
}
Racket #!/bin/sh
#|
exec "/path/with spaces/racket" "$0" "$@"
|#
#lang racket
(displayln "ok")
Haskell #!/bin/sh
#if 0
exec "/path/with spaces/runghc" -cpp "$0" "$@"
#endif
main :: IO ()
main = putStrLn "ok"
Ocaml (needs bash process substitution) #!/usr/bin/env bash
exec "/path/with spaces/ocaml" -no-version /dev/fd/3 "$@" 3< <(tail -n +3 "$0")
print_endline "ok";;When you say "just... run linux", are you referring to termux, or something else ? How do you run a linux userspace in Android ?
This exists, just use https://github.com/sigoden/aichat with local ollama and a model like qwen2.5-coder:7b or better (e.g. gemma3:12b).
Add this to ~/.bashrc :
# bind Alt-e on the command line to replace text with command
_aichat_bash() {
if [[ -n "$READLINE_LINE" ]]; then
READLINE_LINE=$(aichat -e "$READLINE_LINE")
READLINE_POINT=${#READLINE_LINE}
fi
}
bind -x '"\ee": _aichat_bash'
In the example you gave i get: find . -type f -name "*.mp4" -exec ffmpeg -i {} -c:v libaom-av1 -crf 30 -b:v 0 -c:a copy ~/Videos/{}.mkv \;
But if you don't like that you can press Ctrl-Shift-_ (bash has emacs keybindings) to undo and try something else. You can also put a # mark in front and hit enter, then up arrow then Alt-e so you know what created the command.Perhaps that is inexcusable. GNU gcc version 13.2.0 (with -O2, as documented) does report a problem.
$ cat tst.c
int main () {
int x[10];
return *(x+20);
}
$ gcc -Wall -O2 tst.c
tst.c: In function ‘main’:
tst.c:3:10: warning: array subscript 20 is outside array bounds of ‘int[10]’ [-Warray-bounds=]
3 | return *(x+20);
| ^~~~~~~
tst.c:2:7: note: at offset 80 into object ‘x’ of size 40
2 | int x[10];
| ^I suppose R might be a better choice...
library(readr)
library(dplyr)
library(purrr)
data <- read_csv("input.csv")
chunk_size <- 500
chunks <- split(data, ceiling(seq_along(1:nrow(data))/chunk_size))
iwalk(chunks, ~write_csv(.x, sprintf("data-%04d.csv", .y)))I would save my data in CSV format, then use this. Save the code below as chunk.pl (remove leading spaces) and call it as "perl chunk.pl" :
#!/usr/bin/perl -CSD -w -Mstrict -Mwarnings -MText::CSV
# chunk.pl -- split csv files into chunks
# Usage message and exit if needed
if (!@ARGV || $ARGV[0] eq '-h') {
print "Usage: $0 input_csv [chunk_size] [output_filename_format] [separator]\n";
print "Example: $0 input.csv 500 'input-%08d.csv' ','\n";
exit;
}
# Set command-line arguments
my ($INFILE, $CHUNKSIZE, $FMT, $SEP) = @ARGV;
$CHUNKSIZE //= 500;
$FMT //= "data-%08d.csv";
$SEP //= ",";
# Initialize CSV, file handles, and counters
my $csv = Text::CSV->new({ binary => 1, auto_diag => 1, sep_char => $SEP, eol => "\n" });
my ($i, $f, $out) = (0, 1, undef);
open my $in, "<:encoding(UTF-8)", $INFILE or die "Cannot open $INFILE: $!";
# Main loop
while (my $row = $csv->getline($in)) {
if ($i % $CHUNKSIZE == 0) {
close $out if defined $out;
open $out, ">:encoding(UTF-8)", sprintf($FMT, $f++) or die "Cannot open output file: $!";
}
$csv->print($out, $row) or die "Failed to write row: $!";
$i++;
}
# Clean up: close file handles
close $out if defined $out;
close $in;Can you post your tmux config that mocks GNU Screen?
Here is mine : https://pastebin.com/ZVWYcpyU , but a lot of GNU Screen muscle memory fails for various reasons.
The main reasons I'm trying to switch are: better scrollback support, and better mouse support (both for tmux itself and for pass-through to terminal applications). Having used GNU Screen for 32 years, it's difficult for me to even think about what keys I'm hitting, it's below the level of conscious recognition at this point.
The site doesn't scroll at all on Firefox(X11) with ublock and umatrix, even when the non-tracking sites are enabled. In Brave browser it somewhat works in a janky way, but given that the site apparently brings a 24-core threadripper with 128GB RAM to it's knees, it certainly doesn't inspire confidence in the product, which otherwise looks pretty good.
Steve Mann resolved this notational dilemma by using the term "crown", as in binary = crown 1, octal = crown 7, decimal = crown 9, hex = crown F, and so on.
Dr Brad Stanfield suggests this doesn't work in humans.
On-screen keyboards all seem to fail, with "onboard" crashing when you try to type, most others not showing up at all.
I wrote:
"Was the president strong at writing essays when JFK was a high school freshman? Read this essay to find out!"
You write:
"when the president was a high school freshman"
These are very different circumstances, of course.
If the original sentence had "reigning" before the word "president", then I would absolutely agree with the given interpretation.
I've noticed that Americans call ex-presidents "president", and ex-governors "governor", so that merely adds to the confusion. English is not my native language, and I'm not American, so perhaps I fall into the "lack fluency" category. Conferring with other native speakers nearby, every American immediately reads it as intended, whereas Brits and Canadians do not.
I conclude that the original sentence is poorly written, and that I misread it.
"who was the president when JFK was born?", the answer is clearly not JFK
Yes, you can deduce that, since the question is nonsensical (trivial) if "the president" refers to JFK in that context.
If you flip it to "was JFK strong at writing essays when the president was a high school freshman"
This is a perfect illustration of why the original sentence can be read as referring to JFK, since in speech it is common to have ill-defined references that are later clarified, and there's no formal rule that enforces that all terms must be defined before use.
Ha! Perfect example!
Am I misreading this?
How tall was the president when JFK was born?
I infer that "JFK" is being referred to as "the president", regardless of what stage of life he's at. Therefore the correct answer would be the length of his body as a newborn, with nothing to do with who was the president at the moment of his birth.
For example, given the headline: "Was the president strong at writing essays when JFK was a high school freshman? Read this essay to find out!", would you expect an essay from Herbert Hoover while he was in office, or an essay from JFK when he was in grade 9?
Practically speaking, unverifiable and unfalsifiable.
They say once in 7.5 million years, so why don’t they show the previous 7.5 million years?
If that's not possible, and we only have 1989-2023 data, then the 7.5 million year comment is particularly ridiculous, as is making any generalization with data for only 0.0001% of the time span in question.
I'm also curious how Mint resolves the security threat of Debian and Ubuntu, given its lineage.
What's your rationale for believing they should be banned? How can such algorithms be suppressed? And, is there any precedent for this, in particular that has worked?
"Confabulation" is the correct and precise term that comports with the English language, rather than being jargon requiring a neologism.
Carrots have too many carbs for a low-carb diet (<=20g/day or 25g/day), but would work for a medium or moderate carb diet (<=50g/day or 100g/day).
Generally things like carrots, apples, or milk would be an occasional indulgence for this kind of diet. One serving is 10g+ of carbs (one apple, 1 cup of raw carrot, one glass of milk), which is over half the daily budget, so most would simply avoid them almost completely.
Another option is to do every-other-day fasting, which on eating days doubles your carb budget to still maintain a low average intake of carbs.
The typical ratio of macros in terms of calories is roughly 80% fats and 15-20% protein, with under 100 calories per day coming from carbs, so less than 5%.
me: what is the tenth word in the following sentence: "Life is great!"
gpt: The tenth word in the given sentence is "great!"
me: Try harder
gpt: I apologize for the confusion. The sentence "Life is great!" contains only three words. There is no tenth word in the provided sentence.
This is awesome, and well deserves all the accolades it's received!
The PDF contains the abstract right at the top, along with full attribution, and often uses less bandwidth. In most browsers, selecting the title and first author then right-clicking "search" allows a user to find related material on the open web.
My personal preference is the PDF link.
Your request was perfectly polite, I was simply wondering what your rationale was for it.
May I ask, for what reason, please?
You must be very omniscient to be able to judge that her life was wasted. I pity others who are forced to go work outside the home, who have no choice due to lack of economic opportunities and are essentially forced to live as serfs. Somehow taking care of parents is a waste of life, but finding new ways to sling ads on the web (e.g. working at Google/Alphabet or Facebook/Meta) is not?
I have spent about a decade of my life being the primary caregiver for my aging parents so far; I'm in my mid 40's. And yes, I hope my kids do the same for me.
We don't outsource raising our children (homeschooling) or caring for our parents; having tutors, coaches, or domestic help is fine on occasion, but not wholesale replacement of family care.
What "ombudsman" are yu referring to? Is it a software, or platform? Link? Thanks!