programming

311 readers
1 users here now

  1. Post about programming, interesting repos, learning to program, etc. Let's try to keep free software posts in the c/libre comm unless the post is about the programming/is to the repo.

  2. Do not doxx yourself by posting a repo that is yours and in any way leads to your personally identifying information. Use reports if necessary to alert mods to a potential doxxing.

  3. Be kind, keep struggle sessions focused on the topic of programming.

founded 2 years ago
MODERATORS
76
77
 
 

Informative post (with tons of examples!) from a genuine CSS wizard. Definitely check out her projects css clicker and antonymph, or if cybersecurity is more your thing, her recent talk on CSS exploits.

78
 
 

Anyone here have experience with arcpy? I've been working on a wrapper library that tries it's best to bring in into compliance with the Python data model and would like some testers.

I'll dm you a link to the repository if you have any interest. It's still pretty barebones and focused mainly on simplifying interaction with file databases and project files.

79
 
 

I get dizzy looking at C-like languages, they just feel incredibly hard to follow compared to an S-expression.

Everything this just so verbose and there's so much negative space between the lines. To be fair, this course is making us program using Java so maybe it has to do more with that.

80
 
 

Don't let the title mislead you into thinking this is a polemic—it's an excellent talk that traces the lineage of object-oriented programming (which goes back way further than you might imagine) and helps elucidate why it became such a dysfunctional pattern. It's really well-researched, citing a bunch of primary sources, and the speaker is clear and engaging. Never would have thought a nearly 2 hour lecture^[There's about ~35 minutes of Q&A, hence the runtime] on OOP would engender such rapt attention—there are so many fascinating tidbits that were dug up from ancient academic papers.

So much of computing is about the newest and shiniest thing that it's easy to lose sight of how—and importantly, why—we got here, and I think reexamining these foundations can help prevent us from propagating the mistakes of the past.

81
82
83
 
 

A lot of what I've found seems to assume C knowledge, or other things that I just don't understand. I know a little bit of python, I've mostly made small scripts for webscraping/data management/discord bots. My ultimate goal is a gameboy emulator, but plan on making a chip-8 interpreter first along with any other test programs ect I need. There's a lot of guides and resources for making either of those projects but I need to understand Rust first.

Picking Rust because its modern, memory management seems a lot easier, and I've generally heard good things about it. Also heard some errors that cause runtime issues on something like C are caught by Rust's compiler.

84
1
submitted 1 year ago* (last edited 1 year ago) by roux@hexbear.net to c/programming@hexbear.net
 
 

It's probably not gonna happen but I might have a job opportunity but it hinges on me learning and knowing Angular. Does anyone have any suggestions on tutorials and/or is the Tutorial on the official site good enough?

I have a background in Vanilla JS, some ReactJS, TypeScript(need to work on it), AstroJS Java, and some Kotlin. All of that is self-taught. But I also have C# and ASP.net experience from college. Just to put it in perspecitve on where I am at. Also I probably use ChatGPT as a crutch too much but that is because I don't have anyone to really ask for help when I get stuck.

85
 
 

Which shells do you guys tend to use the most?

I've been trying to get into fish lately, have also used xonsh because I'm really comfortable with python so why not use that instead of bash and just inject subshells into my python scripts

86
87
 
 

CMake

spongebob-i-fucking-love bird-screm-2 monke-rage doggirl-growl what-in-the-goddamn

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  include(cmake/macOS/macOSBuild.cmake)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
  include(cmake/win32/Win32Build.cmake)
elseif(UNIX AND NOT APPLE)
  include(cmake/linux/LinuxBuild.cmake)
endif()

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

if (POLICY CMP0141)
    cmake_policy(SET CMP0141 NEW)
    set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
endif()

target_include_directories(${OUTPUT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include")
    find_package(PkgConfig REQUIRED)

if(WIN32)
    set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
    if(BUILD_AS_PORTABLE)
        add_definitions(-DPORTABLE_BUILD)
    endif()
endif()

Meson

doggirl-sleep commiku catgirl-happy

project(
  'myproject',
  'c',
  meson_version : '>= 1.3.0',
  version : '0.1',
  default_options : ['warning_level=3'],
)

dependencies = [
]

exe = executable(
  'myproject',
  'myproject.c',
  dependencies : dependencies,
  install : true,
)

test('basic', exe)

No this is not biased, you are dean-sussy

88
89
 
 

I have a ton of books in my to read pile, and I always have analysis paralysis trying to pick a new book to read. Getting recommendations based on stuff I already enjoyed reading helps make the decision quicker.

90
1
Typopy (github.com)
submitted 1 year ago* (last edited 1 year ago) by invalidusernamelol@hexbear.net to c/programming@hexbear.net
 
 

I got bored today and made a little python script that takes text and spits out a version of it with typos that maintains readability.

The algorithm is really simple (shuffle all runs of ASCII letters and maintain the first and last letter). Added some options to preserve double letters and prevent the shuffling from moving letters to the other side of the word.

I don't think this has any real world applications beyond maybe messing with text on your site when you detect a bot. ChatGPT can pretty easily decode the typos from my initial testing, but I'm not sure if it would do as well if it's training data was polluted with this type of text obfuscation.

91
 
 

If they didn’t exist in a language would you be upset? Any obvious things that can’t be done without global variables? I don’t think there is, but I could have missed something. I know that Haskell doesn’t have them and I think some newer ones like V also don’t have them.

92
 
 
93
94
95
96
 
 

is it easy to create/host a bot to mirror posts from a reddit board?

97
98
99
100
 
 

seriously, trying to use this crap is making me APEX-pilled

view more: ‹ prev next ›