specter

joined 1 year ago
MODERATOR OF
12
Neovim 💚 Fennel! (git.minimally.online)
submitted 1 year ago* (last edited 6 months ago) by [email protected] to c/[email protected]
 

cross-posted from: https://board.minimally.online/post/20318

I just recently discovered TIC-80 and then Fennel. I was already liking Lua but now I'm hooked on LISP!! Here's my Neovim config using lazy.nvim, all written in fennel thanks to hotpot

It's not marketed like one of those "template Neovim config repos" but it could be one of those if your heart desired. I based it loosely off kickstart.nvim.

1
Neovim 💚 Fennel! (git.minimally.online)
submitted 1 year ago* (last edited 6 months ago) by [email protected] to c/[email protected]
 

I just recently discovered TIC-80 and then Fennel. I was already liking Lua but now I'm hooked on LISP!! Here's my Neovim config using lazy.nvim, all written in fennel thanks to hotpot

It's not marketed like one of those "template Neovim config repos" but it could be one of those if your heart desired. I based it loosely off kickstart.nvim.

 

cross-posted from: https://board.minimally.online/post/12268

The math behind the game is atan2 which I use to get the angle from a thing to another thing:

function ato(from,to)
  return atan2(
    to.x-from.x,
    to.y-from.y
  )
end

And then when you give that angle to cos for the x axis and sin for the y axis you get (x,y) coords that can be multiplied by the number of pixels you want to "move" in that direction. So this function assumes a table like {x,y,a,s} and returns new a new x,y multiplied by s for "speed"...

function amove(●,s)
  s=s or ●.s
  return ●.x+cos(●.a)*s,
    ●.y+sin(●.a)*s
end

I use both those together like this to move the worms each frame. (This symbol: ∧ looks more like a worm in the Pico-8 font. If you didn't notice I like the emoji for variables 😋)

for ∧ in all(∧s) do
  ∧.a=ato(∧,웃)
  ∧.x,∧.y=amove(∧)
end

The astitue reader may have noticed amove allows one to supply their own s instead of the table's s... this is useful when you want to calculate things along something like a line, I mean the length of a worm. For example if we put everything together then we get this loop that, after a bullet () moves, checks every part of a worm (for ∧t=0,∧.l do where ∧.l is worm length and ∧t is each "tail" pixel) and if they collided deletes both and plays a sound effect. amove is given each ∧t but it's not actually used to move the worm, just to reconstruct it's body for collision detection.

for ∧ in all(∧s) do
    for ∧t=0,∧.l do
      ∧x,∧y=amove(∧,∧t)
      if flr(✽.x)==flr(∧x)
        and flr(✽.y)==flr(∧y)
      then
        del(bullets,✽)
        del(∧s,∧)
      if #∧s==0 then
        sfx(2)
      else
        sfx(1)
      end
    end    
  end
end
 

The math behind the game is atan2 which I use to get the angle from a thing to another thing:

function ato(from,to)
  return atan2(
    to.x-from.x,
    to.y-from.y
  )
end

And then when you give that angle to cos for the x axis and sin for the y axis you get (x,y) coords that can be multiplied by the number of pixels you want to "move" in that direction. So this function assumes a table like {x,y,a,s} and returns new a new x,y multiplied by s for "speed"...

function amove(●,s)
  s=s or ●.s
  return ●.x+cos(●.a)*s,
    ●.y+sin(●.a)*s
end

I use both those together like this to move the worms each frame. (This symbol: ∧ looks more like a worm in the Pico-8 font. If you didn't notice I like the emoji for variables 😋)

for ∧ in all(∧s) do
  ∧.a=ato(∧,웃)
  ∧.x,∧.y=amove(∧)
end

The astitue reader may have noticed amove allows one to supply their own s instead of the table's s... this is useful when you want to calculate things along something like a line, I mean the length of a worm. For example if we put everything together then we get this loop that, after a bullet () moves, checks every part of a worm (for ∧t=0,∧.l do where ∧.l is worm length and ∧t is each "tail" pixel) and if they collided deletes both and plays a sound effect. amove is given each ∧t but it's not actually used to move the worm, just to reconstruct it's body for collision detection.

for ∧ in all(∧s) do
    for ∧t=0,∧.l do
      ∧x,∧y=amove(∧,∧t)
      if flr(✽.x)==flr(∧x)
        and flr(✽.y)==flr(∧y)
      then
        del(bullets,✽)
        del(∧s,∧)
      if #∧s==0 then
        sfx(2)
      else
        sfx(1)
      end
    end    
  end
end
 

Now the known way to do XSS on a lemmy is patched 👍

1
Solstice School 2023 (solsticeschool.scholar.social)
 

Scholar Social is hosting Solstice School 2023, an informal online conference covering a variety of topics, with presentations occurring between 2023-07-24 and 2023-08-05.

There are a ton of talks and you can download .ics files for one or all of them

 

You can read more about it here: https://board.minimally.online/post/8765

 

This has happened to me way too many times. I think it remembers being on an external monitor or something and then you can't get to it with a mouse and also the PowerToys FancyZones shortcuts don't work.

Use Shift+Right Click on the taskbar icon for the window and select "Move". You may also need to fiddle the arrow keys a bit if moving the mouse doesn't immediately snap the window to that location.

"Windows" is an awful window manager as it turns out.

1
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

iperf3 is installable via scoop and yay. You simply run the server on one computer and point the client at that IP from another computer.

# On one computer
iperf3 --server
# On another computer
iperf3 --client <ip>

You can get your IP address on Linux like this. For Ethernet look under (probably) end0 and for wifi (probably) wlan0.

ip addr

On Windows you can use Get-NetIPAddress.

# For Ethernet
Get-NetIPAddress -InterfaceAlias Ethernet*
# For Wi-Fi
Get-NetIPAddress -InterfaceAlias Wi-Fi

If you're diligent about firewalling then you'll probably need to open up the port (default is 5201)

 

I go to bed stoned, I got some walls up.

Someday we'll find a way to make these billionaires obey us.

1
Capturing your screen on Windows (board.minimally.online)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

The native Windows Snipping Tool is pretty good. It is bundled with an editor and the built-in key bind Win+Shift+S is easy enough to remember. Unfortunately (maybe because they are working on screen recording?) its been busted for a few weeks now at the time of writing (check out the recent reviews) and I needed a work around.

Turns out that snipaste is way better anyway! For some reason installing it with scoop didn't work for me but getting it from the Microsoft Store did. It's feature packed and quite intuitive. The first customization I made was change the default f1 and f3 copy/paste keybinds to Alt+S and Alt+V 👍

Also for screen recording I poked around ScreenToGif which I think I'll keep around and see if I like...

view more: ‹ prev next ›