Programming

keithjgrant,
@keithjgrant@front-end.social avatar
nosherwan,
@nosherwan@fosstodon.org avatar

@keithjgrant is BEM out of style now?
I didnt use it to begin with.

jensimmons,
@jensimmons@front-end.social avatar

@nosherwan @keithjgrant Oh I’ve been involved with that spec. It’s very interesting. Talked about it on Shop Talk Show last year. (CSS Cascade level 6 — not a different spec with "Scope" in the title. @davatron5000 made fun of me sighting spec level numbers, :P rightly so...)

paulox, (edited )
@paulox@fosstodon.org avatar

I'm Paolo Melchiorre, aka , hiker, swimmer, reader, traveler, living in 🏖️

graduated from the of 🎓

developer, member of and 🐍

contributor, member, and organizer and coach 🦄

Organizer of and co-organizer of the 🇮🇹

Conference , at , , etc 🗣️

user and advocate 🥑

blogger 🐦

paulox,
@paulox@fosstodon.org avatar

I forgot to use the hashtags and 😅

paulox,
@paulox@fosstodon.org avatar

@wsvincent In , however, it is not allowed to drink after noon, and only use ( or ) on . 🍕

interfluidity,

[Announcing] fossilphant — a static-site generator to self-host your posts from Mastodon archives https://github.com/swaldman/fossilphant#readme

Check out examples, themes with paging https://www.mchange.com/projects/fossilphant/example/shatter/ or as one tall page https://www.mchange.com/projects/fossilphant/example/tower/

My current instance is sunsetting, and I want to make sure the banalities I posted here remain forever public.

If you are in similar straits, I'd love it if you gave this a try!

cc @isomorphismes @jpkoning @mattlehrer @paulgp

gimulnautti,
@gimulnautti@mastodon.green avatar

@interfluidity whaaa!!? Awesome 🥳🫶

interfluidity,

@gimulnautti (thanks! i’d love it if you’d give it a shot and let me know whatever’s not so awesome!)

keithjgrant,
@keithjgrant@front-end.social avatar

📝 New Post: Transitioning to height: auto (two ways)

https://keithjgrant.com/posts/2023/04/transitioning-to-height-auto/

dmc,

@keithjgrant Nice! Seems like these should work in iOS but neither demo is working on my phone?

nemzes,

@keithjgrant pretty sure it was me who discovered that transitioning grid could enable transition to auto (it wasn't even possible in Chrome back then). I know, I knit-pick, but I do like to brag about it. I'm just quite happy it's possible at all. 😊 https://nemzes.net/posts/animating-height-auto/

rml,
@rml@functional.cafe avatar

"The focus of my research is applying , in particular , to low-level problems — the type of situations that usually call for or #c"

— highly recommended talk on programming with serialized data from @vollmerm @

https://www.twitch.tv/videos/1803057942

rml,
@rml@functional.cafe avatar

@theruran @vollmerm
heavy wager:
"While I'm a long time , most of my research deals with using to improve performance... I promise I'll convince everyone here that types are good by the end of this talk"

(quoting from memory, not entirely accurate)

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@rml @theruran @vollmerm
I love how the minimal interpreter (without the compiler) on x86_64 Linux is only 346800 bytes. That is small and minimal. But the Chez compiler is best-in-class, producing the among the fastest and smallest binaries of any Lisp.

That said, Guile's licensing and it's use in , and it's extensive collection of libraries and SRFI support, make a superior choice for practical applications (IMHO). Also now I know of someone working on porting the "PreScheme" compiler from Scheme48 (a Scheme subset with no garbage collector) to Guile for use in building low-level performance binaries: https://gitlab.com/flatwhatson/guile-prescheme

> "I promise I'll convince everyone here that types are good by the end of this talk"

As a Haskeller, I do not need convincing at all. One thing that got me to even pay attention to however was a conversation with a friend, William Byrd -- by the way, who's dissertation is in relational logic programming from the University of Indiana under Dan Friedman, same school as the presenter in this video -- explained to me that the power of Scheme comes from both it's minimalism, but also it's macro system which you can use to implement any type system you might want. Byrd told me he is frustrated by the world kind of gravitating toward the Hindley Milner type checking algorithm used by OCaml, F#, Haskell, Typed-Racket, Coalton, Carp, and PreScheme, as if it is the end-all-be-all of type systems.

So anyway, Will Byrd convinced me how cool it is being able to use any type system at all in Scheme. Hindley-Milner, CSP, Pi Calculus, Calculus of Constructs, Separation Calculus, Location Calculus (which I just now learned about!), or maybe even more exotic constraints systems modeled on physics -- use whatever is best for your problem domain.

kushal,
@kushal@toots.dgplug.org avatar

Questions to the : What are the different python build systems do you use to build your package?

  • pip
  • poetry
  • flit
  • hatch

^^ to name a few. In the reply can you please tell me what do you use? I am trying to come up with a good list of such projects.

Please share the toot for more reach.

ubernostrum,

@kushal Another vote for build, with setuptools backend.

kfdm,
@kfdm@social.tsun.co avatar

@kushal I use a Makefile with pip and pip-compile to manage things. I try to ensure every project I maintain has a make test command

faassen,
@faassen@fosstodon.org avatar

Over the years as a software developer I've had projects where I spent intensely collaborating in a team, and projects where I work by myself. I feel the tension between the two.

When I'm in a team I want to collaborate, even though the human interaction is quite draining to me. This means pairing and discussing plans and strategy.

But when I am working alone I feel pleasure of being in the flow and cranking out code.

1/?

faassen,
@faassen@fosstodon.org avatar

I've had the pleasure of working in a highly effective team for a few years. The team didn't start out that way, but we got there together. The team wasn't composed of extraordinary developers, but a mixture of normal devs each with our own strengths and weaknesses. We just collaborated well and frequently.

2/n?

faassen,
@faassen@fosstodon.org avatar

The other reason teams have the wrong defaults for collaboration is because the culture and tools are heavily influenced by open source development practices.

In many ways that has been a good thing, but in this case it's not. Open source collaboration is optimized for asynchronous collaboration, different intensity of contribution, low default levels of trust.

And that's not like a tight-knit effective software development team at all.

#7/7

mjgardner,
@mjgardner@social.sdf.org avatar

There’s nothing more permanent than a temporary fix that works.

godeater,
@godeater@hachyderm.io avatar

@mjgardner I wrote a 200 line Proof of Concept, that by the time I left last job had turned into a ~14K LOC behemoth that should never have been put into production for all these reasons.

mjgardner,
@mjgardner@social.sdf.org avatar

@godeater “...[T]here are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.

“The first method is far more difficult.”

— C.A.R. “Tony” Hoare, 1980 @ACM Turing Award Lecture: https://doi.org/10.1145/358549.358561

shafik,
@shafik@hachyderm.io avatar

"So you think you know C?": https://wordsandbuttons.online/so_you_think_you_know_c.html

For folks who regularly answer my quizzes this is right up your alley.

For others you know this b/c you have been burnt before or you spend way too much time dealing with cursed code or your involved in standards.

penryu,
@penryu@hachyderm.io avatar

@alexr @shafik

"We were just looking for 'It depends' ..."

penryu,
@penryu@hachyderm.io avatar

@alexr @shafik

...which betrays the double-standard.

If they ask "How many bits in a byte?" we assume they're working from a mickey mouse script.

But if they ask how many bits in a pointer, we start to suspect some depth.

array,
@array@fosstodon.org avatar

I have a silly question for you, Fedi. I have a 1:N relationship between artists and countries table. I know countries may change, but let's assume that it's a fixed list for now. What would you do to retrieve the countries data to use in a form to create a new artist: query the DB, or just declare a constant array in the form view, and why? Thank you in advance. :)

ascherbaum,
@ascherbaum@mastodon.social avatar

@array @dani I think this kind of fits here:

"There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors"

You will always find problems keeping your fixed list up to date. In the most egregious ways.

array,
@array@fosstodon.org avatar

@ascherbaum @dani That's a good point indeed. As I'm mostly playing around now, I don't really expect that many showstoppers... But, little experience as I have, and it's been more than enough to know that things tend to grow, and then a little change needed somewhere breaks too many places... Specially if you weren't ready for that in advance. :) Thanks!

omenos,
@omenos@fosstodon.org avatar

Decided to try and compare the general base program size of several languages. I wrote a handful of Hello World programs, and stripped them of everything. Here's the final results in KiB:

strip -s -o ${lang}_strip
du *_strip

C: 16
C++: 76
Go: 1204
Hare: 220
Rust: 352

#c

drewdevault,
@drewdevault@fosstodon.org avatar

@omenos are these all statically linked?

orsinium,
@orsinium@fosstodon.org avatar

@omenos

For , you should try @TinyGo. The main Go compiler is designed to prioritize performance and runtime safety over binary size. But TinyGo is designed for small places.

IDK what's TinyGo Linux binary size for Hello World but we recently optimized a lot for , and a wasm binary hello world with stripped out debug info is something like 40 bytes.

mjgardner,
@mjgardner@social.sdf.org avatar

59 years ago today, the first computer program written in was run.

The easy-to-learn and -use language revolutionized . A decade later, would co-found to develop and sell the BASIC interpreter for the 8800, the first commercially successful desktop microcomputer.

More from when celebrated BASIC’s fiftieth anniversary: https://www.dartmouth.edu/basicfifty

mjgardner,
@mjgardner@social.sdf.org avatar

@bazcurtis @Cloudguy I’m still in touch with my elementary school math teacher that introduced me to the . I slightly repaid the favor thirty years later by rehabilitating a collection of XO laptops for her to bring to kids in Africa

bazcurtis,
@bazcurtis@mastodon.social avatar

@mjgardner @Cloudguy That is fantastic. I think a lot of teachers set children on their career path and never know. That computer club changed my life.

walkerb,

I'm playing with just now (never done anything serious in it) and I had setup my environment recently as well (playing with different options for a linux/windows GUI that didn't need different code for each).

I saw a language speed comparison chart that listed a formula used to calculate Pi to a given accuracy. It showed a 10x difference in speed in favor of Java.

As a little end of work day jolly I thought I'd recreate that on my local machine and see.

I wasn't familiar with the formula so I used to get the formula. That took some clarification to get the correct formula out, but it got there in the end ( -1 to the power and not -1 times).

I wrote the Python version first, and then wrote the same thing in Java.

Running the test I came up with a 5x difference in Javas favor (24s for Python, 5s for Java).

Fun end to a sunday.

Part of the conversation with chatgpt to get the forumla used. Took a little back and forth to clarify the top term
Python taking about 24 seconds for 100M iterations
Java taking about 5 seconds for 100M iterations

julioj,

@walkerb this is pretty cool, and I like seeing how other languages measured up, especially Common .

diazona,
@diazona@techhub.social avatar

@walkerb @cathodion Not that it's wrong to try "the defaults" just for fun, but I do think it's important to avoid attaching too much meaning to the results. I mean, different languages are designed to do different things well, and this code sample specifically exercises one of the things Python is not designed to do well: efficient numerical computation (and runtime speed in general). IMO it would be misguided to dismiss the huge potential for improvement by using a dedicated numerical library in Python, because that's one of the things Python does do (relatively) well: it lets you seamlessly(ish) use extension modules to make up for the shortcomings of the language itself.

Incidentally, I tested it with Numpy because I was wondering the same thing. On my system:
Pure Python: 26s
Java: 3.5s
Python+Numpy: 0.8s

Edent,
@Edent@mastodon.social avatar

🆕 blog! “Why aren't there more visual programming languages? (An ode to DRAKON)”

I think the computer programming industry is about to reach a reckoning. No, not because ChatGPT can poorly plagiarise buggy code - but because a whole generation of kids have grown up with Scratch. And they'll want professional tools which have Scratch's level of usa…

👀 Read more: https://shkspr.mobi/blog/2023/04/why-arent-there-more-visual-programming-languages-an-ode-to-drakon/

iphigenie,

@Edent what fun it'd have been to grow up with scratch instead of basic and assembly peek/poke and every other language something you needed to save money for a year to buy.

sakiamu,

@Edent I will happily embrace visual tools based on Scratch when they build something akin to Vim keybinds.

I do think it's possible, though building this sort of block-based tool for a programming language is not easy, and there are key fluencies that text has that don't seem as easily reproduced for tools like this.

vwbusguy,
@vwbusguy@mastodon.online avatar

When I say , I mean anything from Dartmouth up to and including Q/uickBASIC. I do not consider VisualBasic, VB.net, etc, to be BASIC any more than I consider Javascript to be Java. Newer ones in the same spirit - FreeBASIC and qb64, do count, however.

This is my personal opinion and I'm sure many draw the line somewhere else, but when I use that word, it's somewhere in that range (including Atari, Commodore, CP/M, Altair, etc flavors).

zxm,

@vwbusguy very much so. vb1 was qbasic with bells and whistles and each version after that pushed basic further and further into the background. i went from zx spectrum basic, basic on a dec pdp, gwbasic, qbasic 4-7, vb1-vb6. beginners now have to jump into programming with python or javascript which are just awful in my opinion compared to the simplicity and elegance of basic.

vwbusguy,
@vwbusguy@mastodon.online avatar

@zxm By the way, if you want to relive those days on your current system, there's a GUI builder for QBasic that works with @qb64.

https://git.qb64.dev/QB64/InForm

ChristosArgyrop,
@ChristosArgyrop@mstdn.science avatar

Popularity of languages from August ( is 28 at 0.68%).
Has its limitations, but a couple of points worth noting :

  1. and are holding rather well
  2. languages that are involved in some sort of data analysis and processing (, /c++) are doing very well. Not sure what to make of ; are ppl in seeing through the reality is a scripting over extremely performant c/c++ and that there are other lang that can glue as well?
    & are ⬆️
mjgardner,
@mjgardner@social.sdf.org avatar
ChristosArgyrop,
@ChristosArgyrop@mstdn.science avatar

@mjgardner Let me know if you join, then I can search you porn and xvideos for COBOL 🤣🤣🤣🤣

Turbo 8 is dropping TypeScript (world.hey.com)

By all accounts, TypeScript has been a big success for Microsoft. I've seen loads of people sparkle with joy from dousing JavaScript with explicit types that can be checked by a compiler. But I've never been a fan. Not after giving it five minutes, not after giving it five years. So it's with great pleasure that I can announce...

maxim,
@maxim@mastodon.gamedev.place avatar

Programmers, developers, coders!

Let's get to know each other in Mastodon

📻 Make a repost, write what you do and where you are from
🤝 Subscribe each other
🛰️ Let this signal pass through all obstacles

Let the wave flow! Halt and Catch Fire!

DanielaKEngert,
@DanielaKEngert@hachyderm.io avatar

@maxim Hi folks, I'm building computers and developing software professionally since my teen years when 6502 and Z80 were all the rage. These days I do almost only C++ in a small engineering company in the south of Germany. The problem domain is mostly applied signal processing, machine control, data visualization, inter-device communication, interaction with enterprise resource planning, and the like. I'm also a member of the C++ Standard committee, involved in the future core language.

rokku,

@maxim Hi everyone, I am a developer for 20+ years. I code mostly in , , , and many more . A bit of . I am from Europe. Additionaly I am a for life. So if you need some help, my DM are open or ping me public. Have a nice one eyerybody!

AstraKernel,

Guess the programming language.

simonzerafa,

@AstraKernel

JavaScript? 🙂🤷‍♂️

leonadato,

@AstraKernel Honestly, I'm (pleasantly) surprised

felixxm,
@felixxm@fosstodon.org avatar

I wrote ✏️ 🎉 an article about Running Tasks Concurrently in Django Asynchronous Views :django: Buckle-up for our async-journey together! 🚗

https://fly.io/blog/running-tasks-concurrently-in-django-asynchronous-views/

paulox,
@paulox@fosstodon.org avatar

@apollo13 @felixxm I actually worded the sentence very badly. 😅

Mariusz showed in his article how you can make a fully asynchronous database query by manually creating an asynchronous connection and raw SQL statements. 👇
https://fly.io/django-beats/running-tasks-concurrently-in-django-asynchronous-views/#using-the-orm

It would be useful to make this possible directly in Django, at least when using PostgreSQL and Psycopg 3.1+ but I couldn't find an issue about it in the tracker, and I don't know if it doesn't exist or I couldn't find it. 🤷

apollo13,
@apollo13@chaos.social avatar

@paulox @felixxm probably doesn't exist. It is also not clear what the API would look like?

preslavrachev,
@preslavrachev@mastodon.social avatar

My talk proposal got declined a few times. I’m trying to make sense of that. Does it have to do with the pitch, or is it a topic the Go community is generally not interested in?

I was expecting a little more enthusiasm when it comes to giving chance to non-cloud/infra/tooling topics. Why would you go to a conference talk, if it tells you the same story over and over again? I think that conference organizers should strive for more topic diversity.

https://preslav.me/2023/06/02/my-golang-conference-talk-proposal-got-declined-a-few-times/

Merovius,
@Merovius@chaos.social avatar

@preslavrachev To me, the pitch is missing some concrete details. You mention desirable qualities in software, but what are you actually doing? Are you using Go in the frontend? Server-side rendering? Did you built a MVC framework?

E.g. I'd describe a REST Go backend with a Typescript frontend as "using Go for a web service". That would a fairly common story. Yet, you paint your choice as "audacious", so probably not that?

That's what I'm missing from the pitch, at least.

jonbodner,

@Jdreben @preslavrachev @shuLhan I 100% agree that could be a good conference talk. A conference focused on web development might be a better fit.

joachim,
@joachim@drupal.community avatar

Is there a concept in for whether an is inward or outward? For example, suppose I have an interface whose intention is that other code can implement it, but it's only supposed to be called by the internals of my code: it's public for implementation, but internal for callers.

aaronfc,
@aaronfc@mastodon.social avatar

@joachim do you have an example of an API that is supposed to be implemented but not called? Can't think of any useful case.

joachim,
@joachim@drupal.community avatar

@aaronfc Yes, plugins. You implement them to extend them, but the inventing module is in charge of calling them.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • anitta
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • megavids
  • JUstTest
  • All magazines