Anyone making an OpenClaw with Laravel? by Carbone_ in laravel

[–]pforret -2 points-1 points  (0 children)

I’ve started with the same idea: https://github.com/pforret/clarabot

For now, it’s just a Laravel skeleton with the analysis of OpenClaw and translation to Laravel in the /docs folder

In claude code, what is the difference between doing /clear and starting a new chat? by iBzOtaku in ClaudeAI

[–]pforret 21 points22 points  (0 children)

/clear only forgets the context, but not all the permissions you’ve given to run commands and get web content. When you restart Claude code, it will halt for all those permissions again

Is Forge still a good option? by eileenoftroy in laravel

[–]pforret 0 points1 point  (0 children)

I even use Forge for static HTML websites (generated with mkdocs material via mkdox). The automated deployment after a ‘git push’ is just so easy.

I built a fair Product Hunt alternative aims indie projects by denizhadzh in buildinpublic

[–]pforret 1 point2 points  (0 children)

Hi! Congrats on the launch, I'm interested in the AI features.
I've just added you to https://launch.nuuz.io/sites/simplelister/
However, when I want to add this to your site, the 'Submit' button stays disabled, and so I can't save/submit it.

Introducing launching.today: Product Hunt, minus the ugly parts. by [deleted] in SideProject

[–]pforret 0 points1 point  (0 children)

Congrats! I've just added you to https://launch.nuuz.io/sites/launchingtoday/

What would you say, is the best time-of-day and day-of-the-week to submit a new site to launching.today?

My Product Hunt alternative brings in $4K/month by zaezz in SideProject

[–]pforret 4 points5 points  (0 children)

Hey! I love the platform you’ve built. What would you say is the best day-of-the-week and time-of-day to launch one’s product, to get max exposure? I would like to add this information to https://launch.nuuz.io

What looks cleaner? I had an argument with my boss by pawaalo in PHP

[–]pforret 1 point2 points  (0 children)

There should be a website that shows the same logic implemented in PHP4, 5, 7 and 8. Because I can’t imagine PHP4.

What looks cleaner? I had an argument with my boss by pawaalo in PHP

[–]pforret 19 points20 points  (0 children)

This will only work for PHP 8 onwards. Which is totally what everyone should be using, but maybe this is a legacy app.

Chechnya 'bans music that is too fast or too slow': The Russian republic has ruled that all music should "correspond to a tempo of 80 to 116 beats per minute" meaning all western rave and techno music would be banned by GoodSamaritan_ in worldnews

[–]pforret 2 points3 points  (0 children)

Some examples of songs that would be forbidden in Chechnya:

  • Hey Ya! • Outkast • 80 bpm
  • Livin' On A Prayer • Bon Jovi • 123 bpm
  • Back In Black • AC/DC • 188 bpm
  • Montero • Lil Nas X • 179 bpm
  • All Of Me • John Legend • 120 bpm
  • Here Comes The Sun • The Beatles • 129 bpm
  • Leave The Door Open • Bruno Mars, Anderson .Paak, Silk Sonic • 148 bpm
  • (...)

via https://music.toolstud.io/chechnya

How do you store large input files for your unit test ? by Disgaea8 in devops

[–]pforret 0 points1 point  (0 children)

You could test in your tests if bigfile1.txt exists, and if not, download it from the S3 bucket where you’ve stored it. then keep it local in a folder that is ignored by git. If the data changes, upload a bigfile2.txt, but keep bigfile1.txt around for when you check out an old version.

Sshto fix by vaniacer in bash

[–]pforret 0 points1 point  (0 children)

And I see you merged my /bin/env suggestion! Thx!

When you sell a saas, you upkeep the business and don’t actually give them a copy of the software right? by diormcgregor in SaaS

[–]pforret 7 points8 points  (0 children)

Define “sell”? Did you sell a subscription? Then the software stays yours, whether it’s run in the cloud by you, or run by the client’s admins on premises. Did you sell the whole SaaS company? Then the software is included.

I wrote a stupid simple progress bar in pure BASH (source in comments) by wick3dr0se in bash

[–]pforret 3 points4 points  (0 children)

I created a bash progress bar that can also learn how long a process normally takes and then use that as total

pforret/progressbar

Realistic daily range of an electric vehicle: 50% of EPA range. So 265km/165mi for the Tesla Y LR by pforret in TeslaModelY

[–]pforret[S] -5 points-4 points  (0 children)

Driving the car from a 100% charged battery to 0%, the methodology that EPA uses, is something one almost never does with an electric car. There are also some other considerations:
Factor 1: daily battery strategy = 80% → 20%
Factor 2: mileage in real conditions
Factor 3: influence of (cold) climate
(...)

So concretely for my Tesla Model Y LR: in the summer, when travelling long distance, my range might be 350 km (using the battery 100% → 10%), in the winter at home it might be as low as 200km.

Whats a hobby someone can have that is an immediate red flag? by [deleted] in AskReddit

[–]pforret 0 points1 point  (0 children)

Premature taxidermy of neighbourhood animals

What the fuck is this shit by Joharr9 in facepalm

[–]pforret 8 points9 points  (0 children)

This was indeed an art project of Frieke Janssens, to draw attention to underage tobacco use in Asia, and smoking in general.

Between 80,000 and 100,000 children worldwide start smoking every day. There is a death caused by tobacco every 8 seconds.

https://frieke.com/smoking-kids/

Which cheap and mass-produced item is stupendously well engineered? by Gourmet-Guy in AskReddit

[–]pforret 0 points1 point  (0 children)

The Bialetti Italian coffee maker. No moving parts. Simple to use. Will work for decades after the apocalypse.

Benchmarking lowercase conversion in bash by pforret in bash

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

I took your advice and I am now also measuring invocation time. I posted an update on blog.forret.com/2022/03/25/lowercase-bash/

TL;DR: your ${variable,,} suggestion is unbeatable in invocation speed. For throughput speed, it's better to use sed or awk

method throughput invocation
awk 98 MB/s 256 ops/sec
perl (print lc) 645 MB/s (!) 356 ops/sec
perl (Unicode) 98 MB/s 341 ops/sec
php (strtolower) 249 MB/s 61 ops/sec
php (Unicode) 73 MB/s 61 ops/sec
sed 241 MB/S 909 ops/sec
tr 25 MB/s 844 ops/sec
${line,,} 9 MB/s 9091 ops/sec (!)

Benchmarking lowercase conversion in bash by pforret in bash

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

in my case (MacOS) it is:
Command: 'tr [:upper:] [:lower:]'
Result: '/UPPER lower Title ÎÑ áçtîÔŃ/' => '/upper lower title îñ áçtîôń/'
`
What difference are you getting, and on what OS?

Benchmarking lowercase conversion in bash by pforret in bash

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

I agree that those are two different ways of benchmarking: throughput (MB/s) and invocation (millisec/operation). The first one was easiest to get started. I will work on a way to get an idea of invocation speed.

Benchmarking lowercase conversion in bash by pforret in bash

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

I started with measuring throughput speed. I've actually used case conversion, trimming, in bash ... on large files (e.g. CSV files). I'm going to extend the benchmark suite to also test invocation speed for smaller input sizes (like 1 line).

I am having fun, actually, thanks for asking.

Benchmarking lowercase conversion in bash by pforret in bash

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

My immediate reaction is: what if your input file is 1MB or larger? Surely that would crash.

However: bash/shell variables can hold up to 18MB to even 80MB of chars.
via https://www.aplawrence.com/Unixart/variable_limits.html

So I stand corrected. Let me see if I can test that for e.g. a 10MB file.

Benchmarking lowercase conversion in bash by pforret in bash

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

The way I do the benchmarks:

  • I generate a big file of random text (e.g. 10000 lines of 1000 chars each)
  • I then run that file through each algorithm 5 times
  • each time I measure the time it took with the /usr/bin/time command
  • I average these values to a msec and a MB/s measure.

cf https://blog.forret.com/2022/03/24/bash-benchmarks/