demesisx

joined 1 year ago
MODERATOR OF
[–] [email protected] 4 points 2 weeks ago

Don’t get me started on how difficult CSS is with Purescript! I tend to just admit defeat eventually and throw tailwind into the project.

[–] [email protected] 4 points 2 weeks ago (2 children)

Be my guest. I felt like this community needed SOMETHING! :)

I like to try to emulate pure JS stuff with Purescript where possible.

[–] [email protected] 7 points 2 weeks ago* (last edited 2 weeks ago)

module Main where

import Prelude
import Effect (Effect)
import Effect.Aff (launchAff_)
import Effect.Aff.Timer (setInterval)
import Effect.DOM (window)
import Web.HTML (document)
import Web.HTML.Document (getElementById)
import Web.HTML.Element (Element, toElement)
import Web.HTML.HTMLCanvasElement (getContext2D, getCanvasElementById)
import Web.HTML.Canvas.Image (newImage, getWidth, getHeight, setSrc)
import Web.HTML.Canvas.CanvasRenderingContext2D (CanvasRenderingContext2D, drawImage)
import Web.HTML.Types (CanvasElement, Image)
import Web.DOM.Node.Types (Node)

foreign import requestAnimationFrame :: (Effect Unit -> Effect Unit) -> Effect Unit

-- Loads the image and begins the animation
startAnimation :: Effect Unit
startAnimation = do
  img <- newImage
  setSrc img "example1.jpg"
  canvas <- getCanvasElementById "myCanvas"
  context <- getContext2D canvas

  -- We defer animation start until the image is loaded
  imgOnLoad img (beginAnimation context img)

-- Sets the image `onload` handler, safely deferring canvas drawing until the image is ready
imgOnLoad :: Image -> Effect Unit -> Effect Unit
imgOnLoad img action = do
  foreignOnload img action

foreign import foreignOnload :: Image -> Effect Unit -> Effect Unit

-- Initializes the animation loop
beginAnimation :: CanvasRenderingContext2D -> Image -> Effect Unit
beginAnimation context img = do
  imageWidth <- getWidth img
  imageHeight <- getHeight img
  let row = imageHeight
  requestAnimationFrame (animate context img row imageWidth imageHeight)

-- Animates drawing row by row
animate :: CanvasRenderingContext2D -> Image -> Int -> Int -> Int -> Effect Unit
animate context img row imageWidth imageHeight = do
  drawImage context img 0 row imageWidth 1 0 0 imageWidth row
  let nextRow = if row > 0 then row - 1 else imageHeight
  requestAnimationFrame (animate context img nextRow imageWidth imageHeight)

main :: Effect Unit
main = do
  startAnimation

Not at my computer but I generated a rough chatGPT translation that I’m sure doesn’t compile to get me started later if I want to attempt this with the safety of Purescript.

Ps. Yes, I know Purescript generated by chatGPT generally sucks and is filled with hallucinations.

[–] [email protected] 13 points 2 weeks ago

Israel reminds me of the villain in Team America:

https://youtu.be/5TEvacFETvM

They act as if they are above the law.

[–] [email protected] 13 points 2 weeks ago* (last edited 2 weeks ago)

They’re talking about disease transmission not the actual thing that will end our world: the insane amounts of greenhouse gases these monstrosities put into the air. I guess I shouldn’t be surprised since this was posted in /c/travel where most people are still intent on boiling the oceans for their vacation plans.

[–] [email protected] 13 points 2 weeks ago

Looked it up. Yes

[–] [email protected] 8 points 2 weeks ago

OP seems to think that’s a good thing. Animated films are the studios’ way of getting cheap products using non union labor.

[–] [email protected] 51 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

No new movies and TV shows are being made. I’m a 43 year old industry veteran, forced to look for a new career.

Anecdotally, I used to make $120k/year for the past 10 years like clockwork. The past two years, though: I made $18,00 and $22,000.

https://www.latimes.com/entertainment-arts/business/story/2024-07-11/production-activity-report-hollywood

This article says 40% but that’s in LA. In other places, production is down 90%.

[–] [email protected] 14 points 2 weeks ago* (last edited 2 weeks ago)

Great article but line 1 is wrong. The genocide has been going on for far, FAR longer than a year.

[–] [email protected] 17 points 2 weeks ago* (last edited 2 weeks ago)

99%/.9%/0.1% Subscribed thanks to all of the shit users on default communities.

I’m subscribed to the communities I moderate and around 700 others. So, it’s rarely an empty feed. If the feed is empty, it means I’m slacking and I need to step away from Lemmy for a day or two.

[–] [email protected] 112 points 2 weeks ago* (last edited 2 weeks ago) (5 children)

The film industry is dead and streaming killed it. Pirate movies over a vpn as much as you want.

Movie studios are now just landlords. They’re run by boards of directors, focused on nothing but number go up. They want money for sitting like a dragon on top of a stockpile of content. Fuck them.

 
 

This guy is absolutely incredible. He does a great job at breaking down advanced concepts into understandable and even entertaining content; an absolutely brilliant engineer undoubtedly but also great at making videos.

 

In this episode of Unshielded: A Blockchain & Data Podcast by Midnight, a team of experts introduces the groundbreaking Midnight network.

Join them as they cover:

  • The challenges in current data management and blockchain adoption
  • Midnight's innovative approach to data protection and blockchain utility
  • The architecture and design of the Midnight network
  • The Compact programming language and its benefits
  • Real-world use cases for Midnight
  • Midnight's unique token system with NIGHT and DUST
  • The roadmap from Devnet to beyond Mainnet
  • Ecosystem development and support for various participants
  • And much more!

If you enjoyed this episode, make sure to subscribe, rate and review on Apple Podcasts, Spotify and Google Podcasts, instructions on how to do this are here.

Episode Highlights: [00:00:10] Introduction to Midnight and the data management challenge [00:02:31] Midnight's key features and improvements over existing blockchain technologies [00:06:45] The Compact language and its role in Midnight's architecture [00:08:18] Midnight's architecture and lightweight design [00:10:00] Use cases for Midnight, including digital identity and asset tokenization [00:11:56] Token utility: Night and Dust [00:14:39] Midnight's roadmap: from Devnet to beyond Mainnet [00:17:01] Ecosystem development and support for developers and app operators

Episode Resources:

  • Eran Barak on LinkedIn: / eranbarak
  • Ben Beckmann on LinkedIn: / benjamin-beckmann-ph-d-a19b0520
  • Thomas Kerber on LinkedIn: / semihonest
  • Mauricio Magaldi on LinkedIn: / magaldi
  • Anthony Day on LinkedIn: / anthonyjjday

To learn more about the Midnight Network, visit us: https://midnight.network/ docs.midnight.network midnight.network/whitepaper

 

cross-posted from: https://infosec.pub/post/17544659

In this keynote from Rooted in Research: Pushing the Boundaries of Blockchain Technology in Tokyo, Charles Hoskinson reflects on 10 years of groundbreaking research in blockchain and distributed systems. He discusses key achievements, ongoing challenges, and the future direction of research in the industry. After his keynote, Charles answers questions from the audience.

 

cross-posted from: https://infosec.pub/post/17544659

In this keynote from Rooted in Research: Pushing the Boundaries of Blockchain Technology in Tokyo, Charles Hoskinson reflects on 10 years of groundbreaking research in blockchain and distributed systems. He discusses key achievements, ongoing challenges, and the future direction of research in the industry. After his keynote, Charles answers questions from the audience.

 

cross-posted from: https://infosec.pub/post/17544659

In this keynote from Rooted in Research: Pushing the Boundaries of Blockchain Technology in Tokyo, Charles Hoskinson reflects on 10 years of groundbreaking research in blockchain and distributed systems. He discusses key achievements, ongoing challenges, and the future direction of research in the industry. After his keynote, Charles answers questions from the audience.

 

In this keynote from Rooted in Research: Pushing the Boundaries of Blockchain Technology in Tokyo, Charles Hoskinson reflects on 10 years of groundbreaking research in blockchain and distributed systems. He discusses key achievements, ongoing challenges, and the future direction of research in the industry. After his keynote, Charles answers questions from the audience.

 

cross-posted from: https://infosec.pub/post/17408639

Since it was founded in 2015, Input Output | Global has been at the forefront of blockchain innovation, delivering groundbreaking solutions firmly rooted in peer-reviewed academic research. By collaborating with the brightest minds from the world's leading research institutes, Input | Output has made it its ongoing mission to develop robust, real-world solutions built upon the most solidly researched academic foundations.

In celebration of our longstanding research partnership with the world-renowned Tokyo Institute of Technology, IO is hosting a symposium of leading minds from across the blockchain and academic spaces to unlock the future of research in our industry.

 

cross-posted from: https://infosec.pub/post/17408639

Since it was founded in 2015, Input Output | Global has been at the forefront of blockchain innovation, delivering groundbreaking solutions firmly rooted in peer-reviewed academic research. By collaborating with the brightest minds from the world's leading research institutes, Input | Output has made it its ongoing mission to develop robust, real-world solutions built upon the most solidly researched academic foundations.

In celebration of our longstanding research partnership with the world-renowned Tokyo Institute of Technology, IO is hosting a symposium of leading minds from across the blockchain and academic spaces to unlock the future of research in our industry.

 

Since it was founded in 2015, Input Output | Global has been at the forefront of blockchain innovation, delivering groundbreaking solutions firmly rooted in peer-reviewed academic research. By collaborating with the brightest minds from the world's leading research institutes, Input | Output has made it its ongoing mission to develop robust, real-world solutions built upon the most solidly researched academic foundations.

In celebration of our longstanding research partnership with the world-renowned Tokyo Institute of Technology, IO is hosting a symposium of leading minds from across the blockchain and academic spaces to unlock the future of research in our industry.

skip to 19:00 and miss nothing

view more: ‹ prev next ›