pranabekka
pranabekka@mastodon.social
<p>Pranab (he/him)</p><p>i like programming, the terminal/cli, inclusive multiplayer games (digital or not), ux design, plus cool art/ui</p><p>pls forgive for spouting out nonsense</p><p>see featured/pinned posts for more</p>
Posts
-
Post #2896111
#rustlang rust could get away with global mutables, no? functions would capture globals and prevent other functions from implicitly mutating them. if the top-level allowed function calls and mutation, then globals would be explicitly mutated by passing them in as params to globals. basically, the problems with mutable globals disappear with rust&#39;s design.
-
Post #2896110
is there any way to serve a webpage from #godot and make a websocket connection with whoever loads the page? i want to create a &quot;controller&quot; on the page so that players can quickly open the page in the browser to control their characters on the main computer running the game.
-
Post #2896109
``` // ranged.gleam pub opaque type Ranged { Ranged(value: Int, min: Int, max: Int } pub fn new(value, min, max) -&gt; { Ranged( value: int.clamp(value, min:, max:), min:, max:, ) } pub fn set(current: Ranged, to new: Int) -&gt; Ranged { Ranged( value: int.clamp( new, current.min, current.max, ), min: current.min, max: current.max, ) } ``` 1 of 2 #gleam #gamedev #functionalprogramming edit: noo, my indentation :(