Skip to main content

Search

Items tagged with: c


My paper about the @metacpan module Task::MemManager is done!
Join me Dec 18th for the talk at Winter 2024 Perl Community #Conference
blogs.perl.org/users/oodler_57…
, showing how one can use the module to share memory between components of multi-language (#C #assembly , #Perl , #PDL) applications .

The package will be discussed in a more applied context in my 2nd talk ("Quest for Performance") in which I will illustrate its use in #OpenMP #C / #Perl @openmp_arb workflows. #Fortran is next!


One of the reasons I keep dropping hints about #perlffi , #pdl and #openmp is that one can literally have five multithreading frameworks in the same #perl application of a master process: 1) PDL, and FFI intefacing with 2) #Fortran coarrays, 3) Fortran openmp, 4) #c openmp and 5) #cplusplus #openmp. All these frameworks can share memory addresses for array and vector objects, and #perl aided by #PerlAlien makes the authoring of the high-level code a pleasure ! hgpu.org/?p=29403

submitted by /u/ReplacementSlight413
[link] [comments]


This is a fun computer project: apparently there was a DOS program called Edna's Cook Book where you had to type in & save your own recipes. This program reads that old data file to recover your family recipes.

github.com/dangarbri/save-edna

#cooking #cookbook #programming #c #cprogramming


Fun project: a #memory manager for multi-lang applications (#c, #cplusplus #assembly #fortran) in which workflow management is done by #Perl. Currently allocates using either #perl strings or #glibc malloc/calloc. Other allocators #jemalloc coming soon.
github.com/chrisarg/task-memma…


@oalders No, I have not. This is on my to-do list for the #bioinformatics and signal processing projects. Those involve a substantial amount of object creation and destruction targeting the #edge (the objects being used for safe memory management for low-level code and MOP for said code). I have a couple of #openmp #perl #c examples lined up for the blog , perhaps I should run them with that one as well).


This is something you are probably NOT supposed to be doing with #perl but consider my innocent looking C code found in an Inline::C region (which will be discussed in my talk).
If my understanding of the API is correct, then this macro allocates a buffer of known size in bytes and puts the buffer under the #Perl garbage collector. One only needs an entry point from Perl to #C and one just enhanced their #Clang code with a garbage collector
for safe memory management.
@Perl


#Python : Batteries included

#Perl : Flint and tinder included

#Java : PHB included

#PHP : Notepad included

#C : Screw you

#Rust : Arcane eldritch data guardian forbidding memory blasphemy included.


Direct (non-LinkedIn-shortened) link: catonmat.net/ftp/perl1line.txt

I’m also pleased that its author ranked Perl as one of his top 5 best #programming languages: catonmat.net/5-best-programmin…
1. #C / #Clang
2. #PHP
3. #Perl
4. #GoLang
5. #JavaScript (but only version 1 circa 1995 plus #jQuery)

His 5 worst? catonmat.net/5-worst-programmi…
1. #Haskell
2. #Rust / #RustLang
3. #CPlusPlus
4. #Python
5. modern #JavaScript

“My only metric... is time to get things done and ship to customers.”


Yes, #Perl deliberately borrows familiar things from #Unix culture, including #C, #shell, #sed, and #awk. The goal isn’t necessarily to replace them, but to remove friction when combining their capabilities.

@randalschwartz's Perl solutions to #Usenet Unix questions usually demonstrated such reductions.


#CS Teachers Panic as Replit Pulls the Plug on Educational IDE. m.slashdot.org/story/421727

First they said, "you no longer need to learn #assembly language." Later this expanded to include #C." Then they said the same thing about #Perl. Eventually #emacs and #vim were also forgotten in favor of the new and the novel.

Now no one can code without an IDE that holds their hand and everyone thinks this is normal.


If you've a background in #C and #Perl and have thought about contributing to the Perl core, you know it's daunting hacking on the core of a language.

@leonerd is offering to help you learn.

nntp.perl.org/group/perl.perl5…

Also, he's written a tutorial on how to contribute a core feature: leonerds-code.blogspot.com/202…


I turned up the font size I use in VSCode tonight.

Why ?

Because I spent the last two weeks trying to run down a bug with weirdness in redrawing items in a game port I was working on.

It was a capital I instead of i (both are in scope, I is a global) in the red box... 🤦‍♂️

#inthedark #c #C64


Holy crap! A ton of #BASIC games rewritten in modern scripting languages, including #Perl. That's too cool.

The only downside in my mind is that the project is focused on memory safe languages. You kids and your memory safe languages.

I'd like to port some of this to #C.

github.com/coding-horror/basic…

#perl #basic #c


@mjgardner even it's boilerplate #c code is broken. One can go 000s miles further by implementing Ben Klemens ideas and using features post the 1989 ANSI standard.
I have 20 days of laughter before the free trial terminates


I see same stuff being passed around about #c #clang by people who are stuck into the 1st edition of K&R.
#c #clang


@grin @sullybiker The main problem with #shell scripts is that they’re glue for other commands that may or may not be installed and may or may not be the same as those used by the author.

It’s why #dehydrated has so much logic detecting the installed flavor of awk, sed, grep, diff, et al. “Portable” shell is like portable #C—riddled with brittle environmental tests (thus begetting things like #GNU #Autotools).

Even #testssl admitted defeat and can run from a #Docker #container now.


@Perl A couple of us were discussing #Perl and #FFI for #MachineLearning applications at tonight’s #Houston Perl Mongers meeting, and I mentioned the #Platypus project (a/k/a FFI::Platypus).

Lead #developer @plicease has spoken about it at various #conferences, so I thought I’d collect those in a playlist: youtube.com/playlist?list=PLiV…

More info: pl.atypus.org or follow @PerlFFI

#libffi #PerlXS #C #Cpp #Go #GoLang #Rust #RustLang #Pascal #Fortran


Rust Never Sleeps

people.kernel.org/linusw/rust-

#tallship #Pascal #C #OCaml #ML #ALGOL #Rust #history

.


Rust Never Sleeps

people.kernel.org/linusw/rust-…

#tallship #Pascal #C #OCaml #ML #ALGOL #Rust #history

.


“[Larry] Wall [creator of the #Perl #programming language] lets others man the defenses against Perl’s assailants. When I asked him for a response to a point-by-point critique from [Eric S.] Raymond, he sent me a one-line e-mail quoting Leo #Tolstoy:

“’It is amazing,’ wrote Tolstoy, ‘how complete is the delusion that beauty is goodness.’”

salon.com/1998/10/13/feature_2…

#coding #SoftwareDevelopment #Python #Unix #C #shell


All I could find was some decade-old code by Robert Krimen that looks like a port of the relevant #OpenSSH #C code to #Perl as part of a package to store secrets in YAML and JSON files: metacpan.org/release/ROKR/App-…

Here’s the corresponding OpenSSH `fingerprint_randomart` function: github.com/openssh/openssh-por…


Yes, the headline is “A #Lisp Interpreter Implemented in Conway’s #GameOfLife.” But this is *really* burying the lede: “Using the build system for this project, you can also compile your own C11-compatible #C code and run…” woodrush.github.io/blog/posts/…