There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

gratux , in It's a mass extinction event
@gratux@lemmy.blahaj.zone avatar

no love for godot?

HolyDuckTurtle ,
@HolyDuckTurtle@kbin.social avatar

I hear Godot's own scripting language is preferable to C# if you're willing to learn it.

jmcs ,

C# is technically faster, but according to one of the cassette beasts’ co-directors, you can maximize productivity and performance by doing most stuff in gdscript and skipping directly to c++ for the bottlenecks.

AshLassay , (edited )

Also currently no C# iOS support in Godot 4. And probably makes porting to non-MS consoles difficult since it relies on .NET

funkless_eck ,

we could hang ourselves instead… we’d get an erection.

poVoq , in Markdown everywhere
@poVoq@slrpnk.net avatar

Wait until you learn about Org-mode.

keegomatic ,
@keegomatic@kbin.social avatar

I’m vaguely aware of Org-mode but only as an alternative to Markdown. Last time I looked into it, though (years ago), Markdown seemed like a much better option for me for various reasons. Do you have a good argument for why Org-mode is a better choice for common use cases than the relatively universal GitHub-flavored Markdown?

poVoq ,
@poVoq@slrpnk.net avatar

Much better ToDo list system with calendar integration and notifications via mobile apps.

lupec ,

Do you happen to have more info on mobile integration? I can only find one or two apps which claim to support org-mode notes at all, so I’m interested. Kinda assumed it wasn’t much of a thing, honestly.

poVoq ,
@poVoq@slrpnk.net avatar
benneti ,

depending on what you do there are large benefits, for me they are executable code blocks (i.e. jupyter like experience) and way better latex support (if you type equations that are more involved this is rather important).

Chobbes ,

Org mode is great, particularly if you’re already in the Emacs ecosystem because it can do a lot of stuff. Calendars, executable code blocks, spreadsheets, time tracking, org-roam for more ad-hoc notes and searching, capture templates for ingesting data…

I like org mode’s markup format a lot better than markdown’s. It’s a bit easier to do complicated things with escaping and stuff, and it supports syntax highlighting for different languages in code blocks, and LaTeX markup and stuff (which it can even display inline if you want).

As far as I am concerned the only reason to use markdown is that more people are familiar with it and there’s better support for it on certain platforms. These are certainly good enough reasons to use markdown, but in my experience if you’re in the position to use org-mode it’s just so much better.

Kodemystic , in Haskell researchers announce new discovery
@Kodemystic@lemmy.kodemystic.dev avatar

Noob here. What’s wrong with Haskell and why doesn’t it get used more often?

asdfasdfasdf ,

It’s extremely heavy on functional programming terminology and patterns which are notoriously not approachable by normal people.

Kodemystic ,
@Kodemystic@lemmy.kodemystic.dev avatar

You mean Haskell is a language more for mathematical gurus? I can add, subtract multiply and divide. Would this be enough?

bdesk ,

A monad is a monoid in the category of endofunctors

oce ,
@oce@jlai.lu avatar

I read about those about once every two years and forget what it means a week later.

Kamek_pf ,

They never tried to push the language and make it mainstream, but this is somewhat changing since the Haskell Foundation started a couple years ago.

Also, if you only know C or Java, then it looks a bit alien.

I’ve been using it exclusively at work for about 4 years and it makes writing correct code and maintaining it much easier than anything else I’ve tried so far.

uniqueid198x ,

haskell is one of the mathematically founded functional languages, which is a whole family of loosely related languages that have seen lower uptake over the years. Other examples include ML and variants, and F#.

There are a few reasons why adoption has been slow:

  • poor outreach by language founders
  • less focus on commercial use
  • novel syntax
  • core abstractions that differ from mainstream

Many of these are seeing some change. Haskell is getting better at outreach and comercial focus, and Rescript (ml for the web) has a lot of syntactical similarity to ja|ascript.

starman OP ,
@starman@programming.dev avatar

Yeah, I wish F# was used more often. I actually learned it for fun, and it would be great to work with it. Unfortunately I haven’t heard of any F# job in my country yet.

nintendiator ,

So… they don’t give a F#?

(I wonder if the F# people have tried doing outreach via F# memes, should work IMO, good names that also fit slang abbreviations are a very contested and already expended word space)

herbert ,

Rust stole its koolaid.

floofloof ,

Functional programming requires quite a shift in how you think about designing and debugging code. If you’ve spent your whole programming life thinking procedurally and approaching debugging by stepping through, it’s not an easy mental reset to make. And many languages these days can give you a taste of the functional style without taking away so much that is familiar, giving you some of the advantages of functional programming, such as clean code that’s thread safe and free of side effects. People under time pressure are likely to stop there.

magic_lobster_party ,

It’s a cool language. Main problem is that it’s difficult to recruit for. Not many developers know Haskell well enough.

Haskell also makes many huge sacrifices for purity. Accessing the file system is quite wonky. Basic stuff like maps aren’t easy to implement either. In the end, it’s a language great for toy examples, but turns into a massive hassle once you want to do real practical stuff.

I think everybody should at least learn it. You’ll learn some cool stuff that will be of use in other languages.

Pipoca ,

Basic stuff like maps aren’t easy to implement either.

This is mostly due to a preference for immutable data structures. That said, the standard library has a balanced tree-based map that’s not too complex.

If you want a good immutable data structure with O(1) find and update, you’re unfortunately looking at something like a hash array mapped trie, but that’s the same in e.g. clojure or Scala.

Pipoca ,

Haskell started out as an academic language.

The problem Haskell was trying to solve was that in the late 80s, there was a bunch of interest in lazy functional programming but all the research groups had to write their own lazy language before writing a paper on whatever new feature they were interested in. So they banded together to create Haskell as a common research program that they could collectively use.

It’s been remarkably successful for a research language, and has become more practical over the years in many ways. But it’s always had the motto “avoid (success at all costs)”.

lasagna , in You can never really trust someone to turn off the remote desktop connection
@lasagna@programming.dev avatar

Remote is something I’d only enable while using it. Once found my ubuntu (I use arch btw) with the setting on for some reason. Might be worth checking even if you never turned it on.

Sternout ,

How do you switch it on when you don’t have physical access to the computer?

PoolloverNathan ,

SSH, most likely

AVincentInSpace ,

Remember kids, remote access only counts if it’s graphical! A hacker is legally not allowed to hack into your device if you stop the VNC service.

kamen , in Its not wrong though

Joke aside, that’s kind of like claiming that any web frontend is open source because you can access the built, minified and often obfuscated source of it.

JockerBlack ,

So true! I have been “hacking” some chrome extensions recently, do you know of a tool for reverse engineering JS?

FQQD , in Who did this one

It’s great. I definitely recommend watching ${hot_search_word} rn. it’s a masterpiece

TheFerrango , in Hi Ricardo

Someone has a Motorola! 😀

carpelbridgesyndrome OP , (edited )

Just got another. Seems they still haven’t caught their intern

ImpossibleRubiksCube ,

Exactly how many Ricardos work there?

30p87 ,

I only got one and accidentally swiped that away :(

Notnotmike , in “Hire me”
@Notnotmike@beehaw.org avatar

Probably the hardest part of React, for me, was getting used to the callbacks. Passing data up to the parent component using a function. It’s a little difficult to get used to if you haven’t encountered it already

tsonfeir OP ,
@tsonfeir@lemm.ee avatar

Just shove it in the state! I watched a few react videos over the last TWO WHOLE DAYS, it works!! ;$

traveler ,

You can pass data to top components from the child ones using the useContext. Use it only if you have data where you want to pass data from multiple child components to the parent one, if you just want to use from one component you are good with states.

zorlan ,
@zorlan@aussie.zone avatar

I think you’re being down voted because context should be used sparingly. You can pass data back up the parent chain through prop functions.

traveler ,

Yes I’m aware, was just giving a suggestion. I even linked to its documentation where all that information is available.

To be fair couldn’t care less if Im voted down or not, if I could I’d have an option to just hide that vote bullshit it’s just visual garbage in the UI. Basically a remnant from centralised social networks from the web2 era.

DrQuint ,

If there’s a parent component that has some data that it expects to always receive from its children, then that data should be in the parent’s state and the children should receive it and maybe some relevant methods as props. Even if it’s an unknown number of children. Don’t muck with useContext for basic inheritance stuff, you’ll mess with the render cycle for no good reason.

Now, if we’re talking about a very distant “top” component, that’s fine, it’s what it was made for. Although many people end up using stores if it’s some data with broad impact (like user data)

frezik ,

I had gone through Structure and Interpretation of Computer Programming before, and feel like that gave me all the foundational stuff I needed to understand what React is doing. The new third edition is in JavaScript, and while I haven’t read it, I imagine that would be an even better match.

EherVielleicht , (edited ) in The legend

Amy Wong: He knows when you are sleeping,
Hubert J. Farnsworth: He knows when you’re on the can,
Turanga Leela: He’ll hunt you down and blast your ass from here to Pakistan.
John A. Zoidberg: Oh…
Hermes Conrad: You’d better not breathe, you’d better not move,
Bender Bending Rodriguez : You’re better off dead, I’m telling you, dude.
Philip J. Fry: Santa Claus is gunning you down!

slampisko , in e = error in syntax

You explained it in the title and I was still wondering where the difference was 😅

GigglyBobble , in History repeats itself

I usually merge because I like to see commit history as it happened and because rebasing multiple commits with conflicts is more time-consuming than fixing it in one merge commit.

I do rebase smaller changes though to reduce merge commit clutter and like interactive rebase to clean up my local commit mess before pushing.

colorado ,

I create a new branch locally with git switch --create, pull everything from main, sacrifice a small squirrel, and run the project to make sure everything still works.

If something doesn’t work or I can’t figure out how to resolve conflicts, I quietly switch back to my previous branch like nothing happened. That problem is for future me.

ramjambamalam ,

You can just undo the last commit with git reset --soft HEAD~1

pomodoro_longbreak ,
@pomodoro_longbreak@sh.itjust.works avatar

If the changes are small enough I just do rebase -Xtheirs main, and look to see if anything looks fucky (git diff main…).

fauxerious , in Golang be like

you can assign it to itself and it’ll be just fine. can’t put a breakpoint right on it, but it works

magnetosphere , in Scammers vs Impossible Password Game
@magnetosphere@kbin.social avatar

“This is Ohio… or maybe EPCOT?” almost had me crying.

altima_neo , in data secured
@altima_neo@lemmy.zip avatar

Pretty sure it saves it to “my documents”

That fucking no man’s land. Who actually stores shit there?

Zink ,

I’ve started doing that at work, since the documents folder is one of the handful automatically backed up to MS onedrive.

At home the documents folder is on a network share and backed up from that little server.

6xpipe_ , in It always gets me
@6xpipe_@lemmy.world avatar

"What did that code look like two minutes ago?"

  • Cmd+A
  • Cmd+C
  • Cmd+ZZZZZZZZZZZZZZZZZZZZZZ

"Oh, ok."

  • Cmd+Shift+ZZZZZZZZZZZZZZZZZZZZZZ
ytrav OP ,

why is this so true,

janAkali ,

lol, just use time travel, Vim time travel:
:earlier 2m
and back:
:later 2m

nogrub ,

wait that seems really usefull is that in standart vim ?

janAkali , (edited )

Yes, plain vanilla Vim
Here’s help entry (see section 4 if link doesn’t redirect to it).
And it is even more useful with an undo-tree plugin.

nogrub ,

oh thank you good sir ^^

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines