You are not logged in.
Written by chatgpt with slight human intervention, example usage:
inxi | roundbox
returns
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ CPU: 6-Core Intel Core i7-9750H (-MT MCP-) speed: 2592 MHz Kernel: 4.4.0-19041-Microsoft x86_64 Up: 42m │
│ Mem: 6668.0/16258.1 MiB (41.0%) Storage: 188.66 GiB/Total N/A Procs: 22 Shell: Zsh inxi: 3.3.01 │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
and
date | roundbox | lolcat
returns
╭─────────────────────────────────╮
│ Sun 15 Jan 2023 10:08:52 AM CET │
╰─────────────────────────────────╯
in colors.
Roundbox script:
https://raw.githubusercontent.com/bront … n/roundbox
p.s. If something doesn't work as expected ask chatgpt for tech support.
Last edited by brontosaurusrex (2025-07-11 07:47:01)
Offline
That looks cool. ChatGPT is getting smarter every day it seems.
Real Men Use Linux
Offline
I was part-way through signing up for an openai account so I could play with chatgpt, when they wanted to verify my telephone number.
I don't feel like handing that out to some organization I've never heard of till today...
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
I was part-way through signing up for an openai account so I could play with chatgpt, when they wanted to verify my telephone number.
I don't feel like handing that out to some organization I've never heard of till today...
Noticed that as well and seems sketchy to say the least, so I bailed as well. I can see if using an email where I can set up a throwaway email account anywhere.
Imagine writing code by merely chatting with an AI.
Last edited by DeepDayze (2023-01-16 18:37:34)
Real Men Use Linux
Offline
Imagine writing code by merely chatting with an AI.
Yes that's super impressive.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
With my horrible memory I like the way it can explain code even more, for example, just copy/pasting this alias
alias events='w3m -dump https://en.wikipedia.org/wiki/Portal:Current_events | grep -v -e "^ • edit" -e "^ • watch" -e "^ • history" | cat -s | less +/"$(date "+%B %d")"'
I get:
This is a command to create an alias, or shortcut, for a command in a Unix-based operating system. The alias is named "events" and when it is run, it will open the Wikipedia page for "Current events" using the command-line web browser "w3m", filter out certain lines of text, concatenate all the remaining text, and display the output in the terminal using "less" with the search set to the current date in the format of "Month Day".
I'd call that one magic.
Generally speaking the disruption in human thinking is probably the biggest plus tools like this will may bring, including the rethinking of school system, science in general perhaps (art as well).
More aliases pasted:
dice='echo $(( RANDOM % 6 + 1 ))'
The command dice='echo $(( RANDOM % 6 + 1 ))' sets the variable dice to the command echo $(( RANDOM % 6 + 1 )). This command generates a random number between 1 and 6, inclusive.
The RANDOM variable is a special variable in bash that returns a random number between 0 and 32767. The number is then passed to the expression RANDOM % 6 + 1, which calculates the remainder of dividing the random number by 6 and adding 1 to it. This ensures that the number generated will be between 1 and 6. The echo command is then used to display the generated number on the terminal.
It can be used as a command to roll a dice, for example, running the command dice will give you a random number between 1 and 6, simulating a dice roll.
docx='unoconv -f text --stdout'
The command docx='unoconv -f text --stdout' sets the variable docx to the command unoconv -f text --stdout. This command is used to convert a Microsoft Word document (in the DOCX format) to plain text format.
unoconv is a command line utility that uses the LibreOffice's UNO bindings to convert between different office file formats. The -f text option specifies the output format as plain text, and the --stdout option tells the command to write the output to standard output (i.e. the terminal) rather than to a file.
For example, if you have a file named 'example.docx' and you want to convert it to plain text and see the content in the terminal, the command would be docx example.docx.
launch='unset arr;arr=();arr+=($(compgen -c | fzy -p "launch >> ")) && "${arr[@]}"'
The command launch='unset arr;arr=();arr+=($(compgen -c | fzy -p "launch >> ")) && "${arr[@]}"' sets the variable launch to the command unset arr;arr=();arr+=($(compgen -c | fzy -p "launch >> ")) && "${arr[@]}". This command creates an interactive command launcher.
The command uses the compgen command to generate a list of all commands that are available in the current shell, which is then passed to the fzy command through a pipe. fzy is a command-line fuzzy finder, which allows for interactive filtering of the list of commands. The -p option sets the prompt that is displayed in the fzy interface, in this case "launch >>".
The selected command from fzy then is passed to an array arr, which is then executed using the "${arr[@]}" syntax. This allows for the user to easily launch any command by typing its name and selecting it from the filtered list presented by fzy.
It creates an interactive way of launching command, rather than typing the full command, it allows users to search and pick the command they want to run.
I was expecting fail on this ^ one, but nope.
rndPlay='mpv --no-config --no-video --no-resume-playback --no-ytdl --shuffle *'
This is a command to play media files using the mpv player. The command is using the --no-config, --no-video, --no-resume-playback, and --no-ytdl options, which disable the configuration file, video output, resume playback, and YouTube support, respectively. The --shuffle option is used to play the media files in random order. The command is also using the wildcard (*) to include all files in the current directory. This command will play all media files in the current directory in random order using the mpv player without using any configuration file, video output, resume playback or YouTube support.
lst='exa --sort modified -la --icons --no-permissions'
The string 'lst' appears to be a command for a command line interface. It appears to be using the command "exa" which is a modern replacement for the "ls" command in Linux and Unix systems. The options passed to the command include "--sort modified", which sorts the output by the modification date, "-la" which is shorthand for the options "-l" (long format) and "-a" (shows hidden files), "--icons" which shows file icons, and "--no-permissions" which hides the file permissions in the output. The command will list the files in the current directory and sort them by their last modification date, show hidden files, display file icons, but hide file permissions.
This is a teoretical math question, not based on space flight reality: How long does it take to go straight up to space with a rocket traveling 100 km/h?
If we assume that a rocket can travel at a constant speed of 100 km/h straight up into space, and the altitude at which space begins is considered to be at 100km, then it would take a rocket approximately 1000 hours or 41.67 days to reach space at this speed. However, it should be noted that this is purely a theoretical calculation and in reality, it is not possible for a rocket to travel at a constant speed of 100 km/h as it travels into space as the speed of a rocket increases as it leaves the Earth's atmosphere and gravity well, reaching speeds in excess of 28,000 km/h.
Yeah, ^ nope.
Last edited by brontosaurusrex (2023-01-17 13:08:50)
Offline
Also it can 'explain' the entire script as it seems:
https://raw.githubusercontent.com/bront … gameOfLife
The text you provided is a script written in bash. It appears to be an implementation of "Conway's Game of Life" which is a cellular automaton simulation of the birth and death of cells in a grid.
The script starts with a help section that describes the usage of the script and the different arguments that can be passed to it.
Then it sets some initial variables like the width and height of the grid, the characters to represent dead and alive cells and some other variables.
Then it checks for some command-line arguments like '-h' or '--help' and based on that it will execute the help section or continue with the script.
Then it initializes an array named 'grid' and populates it with random values.
Then it defines a function 'draw' that will be used to print the grid.
Then it calls the 'draw' function to print the first random population of the grid.
Then it defines a function 'fixborders' to handle the cases when cells go beyond the grid boundaries.
Then it defines a function 'alive' that will be used to check if a cell is alive or not.
Then it enters into an infinite loop that will keep generating new generations of the grid, each generation is determined by the number of alive cells around each cell, and it will stop after reaching the maximum number of generations defined by the user.
Finally, it calls the cleanup function before exiting the script to restore the terminal cursor to its original state
The script allows users to configure the grid size, seed, and number of generations, as well as other options like '--noscroll' which will clear the screen and refresh on the face of the place, and "sleep" which will set a delay between the refresh of the grid. Also, the script can be piped to tee command to store output in a file.
Pretty on point, it missed the other exit conditions for some reason (if all the grid is dead & if the grid is the same as previous).
And it is missing to mention an exit condition, which is not implemented, but should be imho (repeating behaviors).
Also 'beyond the grid' is not explained fully, since the scripts doesn't behave exactly like 'standard' game of life. The grid should be infinite (in original specs), but this script will just carry the cells across boundary to the other side of grid (is that called wrap-ing?).
Last edited by brontosaurusrex (2023-01-17 10:53:10)
Offline
I was part-way through signing up for an openai account so I could play with chatgpt, when they wanted to verify my telephone number.
It's just a newer way of dual verification for signins. Quite common now for US banks, etc. When I login to my bank account with my password they then send an SMS with a verification code to my cell which I have to enter to access my account within a short time limit.They have generally abandoned GPG signatures as making email secure because of past events (Snowden), though it is usually still offered as an option but considered as a travel at your own risk thing. Dual verification also is often requested when you have your browser set to never remember history and arrive from a secure search engine like Startpage. They just want to know you're you and that your URL is not spoofed or hijacked.
TC
Offline
I was part-way through signing up for an openai account so I could play with chatgpt, when they wanted to verify my telephone number.
It's just a newer way of dual verification for signins. Quite common now for US banks, etc. When I login to my bank account with my password they then send an SMS with a verification code to my cell which I have to enter to access my account within a short time limit.They have generally abandoned GPG signatures as making email secure because of past events (Snowden), though it is usually still offered as an option but considered as a travel at your own risk thing. Dual verification also is often requested when you have your browser set to never remember history and arrive from a secure search engine like Startpage. They just want to know you're you and that your URL is not spoofed or hijacked.
TC
Okay thanks for the clarification but yes I'd be feeling sketchy when I have to give my phone # to some site I am not sure about. So if this is legitimate perhaps I'll create an account and play with this.
Someday AI will help generate code for websites or even applications that pretty much write themselves from the specifications you tell it. Looks like an interesting future, as long as AI is used for good and not evil.
Real Men Use Linux
Offline
I was part-way through signing up for an openai account so I could play with chatgpt, when they wanted to verify my telephone number.
It's just a newer way of dual verification for signins. Quite common now for US banks, etc. When I login to my bank account with my password they then send an SMS with a verification code to my cell which I have to enter to access my account within a short time limit.They have generally abandoned GPG signatures as making email secure because of past events (Snowden), though it is usually still offered as an option but considered as a travel at your own risk thing. Dual verification also is often requested when you have your browser set to never remember history and arrive from a secure search engine like Startpage. They just want to know you're you and that your URL is not spoofed or hijacked.
TC
OK if my bank asks for my telephone number I have no problem with that. I already have a solid relationship with them - I'm trusting them to look after my money!
But I see no reason why openai have to be able to verify my identity. Anyway, even if they do have a reason, it's not a price I'm prepared to pay until I have some evidence that they're trustworthy enough.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Yeah, is there any chance an unrestricted os text model with similar power will popup in near future? Or is the computation required just to much for current year? (Showstopper in near future might be of legal origin).
Last edited by brontosaurusrex (2023-01-18 09:46:59)
Offline
But those AI powers are awesome indeed.
Look for a throwaway phone number service...
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
@bronto you should put a link to your website in your signature!
@all it's full of interesting stuff.
Back OT, thanks for telling me about perplexity.ai, and just now whatdoesthiscodedo.com
Neither of them require you to sign up for an account.
Perplexity's more like a search engine, but quite a good replacement for Duck2 etc for some queries. The answers come with links back to the original sources.
The code one I haven't tested yet but it looks as if it might be useful.
Warning: remember all the fuss about Google's privacy intrusions and why (some of) the alternative search engines were safer? It's too early yet to say if these new GPT-powered searches are at all OK...
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
@bronto you should put a link to your website in your signature!
Done.
Offline
^
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Yet another one is you.com which has a "Chat" tab: https://you.com/search?q=who+are+you&tb … t&cfr=chat
I tried bronto's rounded box query on perplexity and youchat.
Perplexity:
#!/bin/bash
# Read the input text from standard input
input=$(cat)
# Calculate the width of the box based on the length of the longest line in the input
width=$(echo "$input" | awk '{ if (length > max) max = length } END { print max }')
# Add padding to the input to center it within the box
padded_input=$(echo "$input" | awk -v w=$width '{ printf "%" int((w-length($0))/2)+length($0) "s\n", $0 }')
# Draw the top of the box
top=$(printf '╭%*s╮\n' $((width+2)) '')
# Draw the sides of the box with padding
sides=$(echo "$padded_input" | sed 's/^/│ /; s/$/ │/')
# Draw the bottom of the box
bottom=$(printf '╰%*s╯\n' $((width+2)) '')
# Print out the final result
printf '%s%s%s\n' "$top" "$sides" "$bottom"
What I got:
john@beryllium:~/tmp$ echo "Hello, world!
This is a multiline
text.
It can be any length." | ./rounded_box.sh
╭ ╮│ Hello, world! │
│ This is a multiline │
│ text. │
│ It can be any length. │╰ ╯
And youchat:
#!/bin/bash
# Read multiline input and save it as a variable
read -d '' text
# Calculate the length and width of the box based on the length of the longest line in the input
length=$(echo "$text" | awk '{ if (length > x) { x = length } } END { print x }')
width=$(echo "$text" | wc -l)
# Draw the box
tput setaf 1 # Set foreground color to red
tput setab 7 # Set background color to white
for i in $(seq 1 $((width+2))); do echo -n " "; done # Draw top line
echo "" # Move to next line
echo -n " "
for i in $(seq 1 $((length+2))); do echo -n " "; done # Draw left side
echo " "
while read -r line; do printf " %${length}s \n" "$line"; done <<< "$text" # Draw the text
echo -n " "
for i in $(seq 1 $((length+2))); do echo -n " "; done # Draw right side
echo ""
for i in $(seq 1 $((width+2))); do echo -n " "; done # Draw bottom line
echo "" # Move to next line
tput sgr0 # Reset colors
And got:
john@beryllium:~/tmp$ echo "Hello, world!
This is a multiline
text.
It can be any length." | ./rounded_box.sh
Hello, world!
This is a multiline
text.
It can be any length.
So it's not quite there yet.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Perplexity hasn't been doing incredibly well on my recent coding questions.
Just now I ran into an XSLT stylesheet I'd written myself somehow, maybe 2 years ago, and completely forgotten how it worked.
whatdoesthiscodedo.com did quite a good job of explaining it, but perplexity.ai was close to useless. You.com wasn't much better.
It's for extracting the <theme> part from openbox's rc.xml, minus the namespace which would have messed things up trying to put it back in later.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ob="http://openbox.org/3.4/rc">
<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" />
<xsl:template match="/">
<xsl:apply-templates select="/ob:openbox_config/ob:theme" />
</xsl:template>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@*|node()" />
</xsl:element>
</xsl:template>
<xsl:template match="@*|text()|comment()">
<xsl:copy/>
</xsl:template>
</xsl:stylesheet>
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Well, this https://github.com/nomic-ai/gpt4all runs offline (tested the cpu version with gpt4all-lora-quantized.bin model) and it's just hilarious, example:
> Q: Can you write a short idea for another Alien movie.
> A: Sure! Here is an idea for the next installment of the Aliens franchise... In this film, Ripley's daughter (played by Jaden Smith) discovers that her mother has been abducted and taken to a secret location on LV-426. She teams up with Weyland Industries CEO David (Jason Momoa), who is also searching for his missing wife, Ellen Ripley's clone daughter Amanda (played by Scarlett Johansson). Together they embark upon a dangerous mission to rescue their mothers and uncover the truth behind Weyland Industries.
p.s. This seems to make it slightly smarter:
gpt4all-lora-quantized-linux-x86 --color -t 8 -n 300 --repeat_last_n 128 -s 12345
# -s is seed
# -t is threads
# see --help for all the switches
Last edited by brontosaurusrex (2023-04-08 18:33:34)
Offline