1
157

Hi all, I'm relatively new to this instance but reading through the instance docs I found:

Donations are currently made using snowe’s github sponsors page. If you get another place to donate that is not this it is fake and should be reported to us.

Going to the sponsor page we see the following goal:

@snowe2010's goal is to earn $200 per month

pay for our πŸ“« SendGrid Account: $20 a month πŸ’» Vultr VPS for prod and beta sites: Prod is $115-130 a month, beta is $6-10 a month πŸ‘©πŸΌ Paying our admins and devops any amount ◀️ Upgrade tailscale membership: $6-? dollars a month (depends on number of users) Add in better server infrastructure including paid account for Pulsetic and Graphana. Add in better server backups, and be able to expand the team so that it's not so small.

Currently only 30% of the goal to break-even is being met. Please consider setting up a sponsorship, even if it just $1. Decentralized platforms are great but they still have real costs behind the scenes.

Note: I'm not affiliated with the admin team, just sharing something I noticed.

2
25

cross-posted from: https://lemmy.sdf.org/post/31995242

Archived

Unveiling Trae: ByteDance's AI IDE and Its Extensive Data Collection System

Trae - the coding assistant of China's ByteDance - has rapidly emerged as a formidable competitor to established AI coding assistants like Cursor and GitHub Copilot. Its main selling point? It's completely free - offering Claude 3.7 Sonnet and GPT-4o without any subscription fees. Unit 221B's technical analysis, using network traffic interception, binary analysis, and runtime monitoring, has identified a sophisticated telemetry framework that continuously transmits data to multiple ByteDance servers. From a cybersecurity perspective, this represents a complex data collection operation with significant security and privacy implications.

[...]

Key Findings:

  • Persistent connections to minimum 5 unique ByteDance domains, creating multiple data transmission vectors
  • Continuous telemetry transmission even during idle periods, indicating an always-on monitoring system
  • Regular update checks and configuration pulls from ByteDance servers, allowing for dynamic control
  • Permanent device identification via machineId parameter, which appears to be derived from hardware identifiers, enabling long-term tracking capabilities
  • Local WebSocket channels observed collecting full file content, with portions potentially transmitted to remote servers
  • Complex local microservice architecture with redundant pathways for code data, suggesting a deliberate system design
  • JWT tokens and authentication data observed in multiple communication channels, presenting potential credential exposure concerns
  • Use of binary MessagePack format observed in data transfers, adding complexity to security analysis
  • Extensive behavioral tracking mechanisms capable of building detailed user activity profiles
  • Sophisticated data segregation across multiple endpoints, consistent with enterprise-grade telemetry systems

[...]

3
29
Golang On The PS2 (hackaday.com)
4
36
5
23
6
13

cross-posted from: https://lemmy.world/post/27385536

I have a rather large Python script that I use as basically a replacement for autohotkey. It uses pynput for keyboard and mouse control - and at least on Windows, it works exactly how I expect.

I recently started dual-booting with Linux and have been trying to get the script to work here as well. It does work but with mixed results - in particular, I found that pynput has bizarrely wrong output for special characters, in a way that's both consistent and inconsistent.

The simplest possible case I found that reproduces the error is this script:

import time
from pynput import keyboard

# Sleep statement is just to give time to move the mouse cursor to a text input field
time.sleep(2)

my_kb = keyboard.Controller()

text = 'πŸ†' # Eggplant emoji
my_kb.type(text)

time.sleep(1)

text = 'π•₯𝕖𝕀π•₯' # blackboard bold test
my_kb.type(text)

time.sleep(1)

text = '𝐭𝐞𝐬𝐭' # bold test
my_kb.type(text)

When I run that script right now, it produces the output "πŸ†π•₯π•₯𝕀π•₯𝐭𝐭𝐬𝐭". And if I run it again, it'll produce the same output. And if I change the eggplant emoji to something else, like the regular character 'A', it will still produce the same output (specifically "Aπ•₯π•₯𝕀π•₯𝐭𝐭𝐬𝐭"). But... If I log out and log back in, then the output changes to something else that's still wrong, but differently. For example, when I changed the eggplant to a regular 'A', then relogged, the output became "Aπ•₯𝕖𝕖π•₯𝐭𝐞𝐞𝐭". And then that wrong output will keep being the same wrong output until I log out and back in again. If the test strings don't change, then the incorrect outputs don't change on relog - but if they do, then they do.

In the larger script, errors seemed to chain together somehow - like if I produced an eggplant emoji, then tried to write blackboard bold test, I would get "πŸ†π•–π•€πŸ†". This is despite verifying just before running the pynput.keyboard.Controller.type function that what it was about to type was correct. The issue also happens if I type it character-by-character with press and release functions.

I am very new to Linux. I'm on Linux Mint. I'm running this in a python3 venv that just has pynput and two other external libraries installed. ChatGPT thinks the issue might be related to X11. The issue does not occur at all on Windows, using the exact same code. On Linux there seems to be no issues with typing regular text, just special characters.

7
43
8
43
9
22
10
58
11
13
12
33

Short version of the situation is that I have an old site I frequent for user written stories. The site is ancient (think early 2000's), and has terrible tools for sorting and searching the stories. Half of the time, stories disappear from author profiles. Thousands of stories and you can only sort by top, new, and 30-day top.

I'm in the process of programming a scraper tool so I can archive the stories and give myself a library to better find forgotten stories on the site. I'll be storing tags, dates, authors, etc, as well as the full body of the text.

Concerning the data, there are a few thousand stories- ascii only, and various data points for each story with the body of many stores reaching several pages long.

Currently, I'm using Python to compile the data and would like to know what storage solution is ideal for my situation. I have a little familiarity with SQL, json, and yaml, but not enough to know what might be best. I am also open to any other solutions that work well with Python.

13
27
submitted 5 days ago* (last edited 5 days ago) by glowing_hans@sopuli.xyz to c/programming@programming.dev

Examples of what I mean by modding:

  • minecraft mods: add some jar file into your mod folder
  • skyrim mods: add some .esp file into your mod folder
  • luanti: put some folder with .lua files and config into your .minetest/mods folder

Mods are basically "turing-complete" and can add different types of computation to your application, while integrating with the (GUI) system.

How to design a program that allow for modding?

With interpreted programming languages like python or lua, you can load code as strings at runtime … but is it done that way for these languages (that would be really bad for security)?

eval("print('mod loading ...')")

So roughly how I imagine modding in python to work, a demo in the python repl …

>>> items = {}
>>> newmod = """
... {"name": "holy-mod-sword", "value": 10, "do-damage": lambda x: x.firedamage(1000)}
... """
# loading the mod
>>> items["holy-mod-sword"] = eval(newmod)
>>> items
{'holy-mod-sword': {'name': 'holy-mod-sword', 'value': 10, 'do-damage': <function <lambda> at 0x7f8c710a9d00>}}

is it done that way or similar?

14
19
15
12
submitted 1 week ago* (last edited 1 week ago) by Endmaker@ani.social to c/programming@programming.dev

Where can you view package details like dependencies and package size on PyPI like on npm?

For example, when I look at React's page on npm, I can see that it has 0 dependencies and an unpacked size of 237kB.

On the other hand, when I visit Flask's page on PyPI, I can't seem to find it's dependencies even after clicking on project details.

16
7

In a project, I've successfully compiled multiple shaders, but at the last fragment shader it just decides to revert back to 110 for no real reason (it's vertex pair just compiled fine), then fails to compile due to me using some 330-related features.

Yes, I requested 3.30 core profile before you ask.

17
67
18
5

Ive used this pattern in quite a few MV(C/P) frameworks. Works well as long as the models dont get huge.

19
-17
submitted 1 week ago* (last edited 1 week ago) by sirico@feddit.uk to c/programming@programming.dev

Got bored of having GPT's explain everything when I'm trying to learn or debug so I made this prompt to give me enough info and point out where I have gone wrong without robbing me of the chance to lean.

20
24
21
7
22
31
submitted 1 week ago* (last edited 1 week ago) by randomname@sh.itjust.works to c/programming@programming.dev

I'm a junior in highschool and will be graduating next year, and the degree that makes the most sense to me is computer science. I've always loved using and tinkering with technology, and learning about it when I can.

I've taken the CS50p course as an introduction to coding, and have really enjoyed the problem solving nature of programming. I just don't know what the industry is like, and people keep saying the job market for CS majors is terrible. so I'm not 100% sure that a computer science degree would be right for me. any advice?

update: I've gotten a lot of good advice from comments and have decided to start a personal project of some sort, to test the waters and see if this is something I can do and enjoy as a hobby outside the CS50p course. thanks to everyone who responded!

23
3

Creating Fluid Animations with Framer Motion https://chat-to.dev/post?id=VTFYcDg4aHdmRHlDVUx0eTBrbGdaQT09 #react #reactnative #javascript #webdesign #frontend

24
52
25
21

Hi all,Β 

I'm working on my personal website, my first forway into javascript and web development.

I wanted to create a flip dot style display which has since morphed into more of a CRT look.Β 

You can take a look here if you like:Β  https://343f-66-113-2-158.ngrok-free.app/main.html

However, I've recently, when sending it to a friend, we found it only seems to work with any performance on Safari, sometimes in fact failing entirely on Chrome and Firefox.

I'm wondering if anyone has any ideas on how I might change my design to migigate this or whether there is some way to give myself more resources on firefox and chrome.

A cursary look into fixing this seems to suggest I should use RequestAnimationFrame, however, this drawing of all elements smoothly at once, while efficent, destroyes the organic effect that the timeouts gave both on the individual dot level and when refreshing line by line.

My general design is outlined here:Β 

I'm using HTML5 canvas; each dot is a class which redraws its section of the canvas with a 50-300 ms delay to emulate the per dot lag of a given hinge on a flip dot display. The display class again using setTimeOut(), schedules each line of the display, consisting of dots, to update at a slight offset so that you can see the display refresh from left to right. Then the rest of the program modifies the "next frame" array with text or images which I wish to be displayed.Β 

Β 

Thank you!

view more: next β€Ί

Programming

19291 readers
81 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS