Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
UraniumAnchor
May 21, 2006

Not a walrus.

Munkeymon posted:

Makes me want to make an NPM clone that filters out anything tainted by his work.

You could be like that one guy who posts to C++ repos about using leading underscores, except you're submitting PRs against anything that has one of his packages as a dependency.

Adbot
ADBOT LOVES YOU

canis minor
May 4, 2011

Nolgthorn posted:

His 'ansi-cyan' library is used in 223,321 other repositories. It's enough to make me quit programming.

I guess this read: https://hackernoon.com/im-harvesting-credit-card-numbers-and-passwords-from-your-site-here-s-how-9a8cb347c5b5 was inspired by that repo (?)

LOOK I AM A TURTLE
May 22, 2003

"I'm actually a tortoise."
Grimey Drawer
Just gonna chime in in the waning moments of this monadchat to once again recommend Eric Lippert's series of monad tutorials:
https://ericlippert.com/category/monads/page/1/
Or just start with this one: https://ericlippert.com/2013/02/21/monads-part-one/

There are countless monad tutorials out there, and I've read way too many of them. Eric's series is probably the one that gave me the best practical understanding of the pattern. After reading through those posts I was able to later go back to some of the more technical descriptions and actually get most of it. It felt a lot like being 5 years old and learning how to add numbers together for the first time.

Happy Thread
Jul 10, 2005

by Fluffdaddy
Plaster Town Cop

ryde posted:

I honestly wonder if we need something akin to a cyclomatic complexity check for dependencies in package managers.

These guys did that, and used it to mark anything with complexity <= 10 (and at or below 35 lines long) as a "trivial dependency"

http://das.encs.concordia.ca/uploads/2017/07/Abdalkareem_FSE2017.pdf

necrotic
Aug 2, 2005
I owe my brother big time for this!

Dumb Lowtax posted:

These guys did that, and used it to mark anything with complexity <= 10 (and at or below 35 lines long) as a "trivial dependency"

http://das.encs.concordia.ca/uploads/2017/07/Abdalkareem_FSE2017.pdf

They did complexity checks on the packages themselves, not the dependency tree (which I think is what ryde was talking about).

ryde
Sep 9, 2011

God I love young girls

necrotic posted:

They did complexity checks on the packages themselves, not the dependency tree (which I think is what ryde was talking about).

Yes, basically something that says "Your dependency tree is bad and you should feel bad, clean it up!" built into the package manager to push back against the situation going on in NPM (and Maven to a lesser degree)

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



ryde posted:

I honestly wonder if we need something akin to a cyclomatic complexity check for dependencies in package managers.

Finally JavaScript's native support for Infinity has a real-world use case.

Soricidus
Oct 21, 2010
freedom-hating statist shill

ryde posted:

Yes, basically something that says "Your dependency tree is bad and you should feel bad, clean it up!" built into the package manager to push back against the situation going on in NPM (and Maven to a lesser degree)

Is this happening in maven? My experience of java has been more the opposite, everything ends up depending on a handful of huge libraries like guava and the popular bits of apache commons

poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice
code:
gradle --console plain dependencies
You'd be surprised just how many libs your project depends on. But for Java, the chances of you depending on some bullshit weekend project that throws deprecated warning every other build but is completely abandoned by the author is slim to none.

Qwertycoatl
Dec 31, 2008

Also: The Monad Tutorial Fallacy

tldr: an explanation for something abstract like monads suddenly "clicking" for you (after a bunch of others don't) doesn't necessarily mean that explanation was a particularly good one, it's just that you've hit the critical mass of examples and ways of looking it at that you can understand it

Soricidus
Oct 21, 2010
freedom-hating statist shill

poemdexter posted:

code:
gradle --console plain dependencies
You'd be surprised just how many libs your project depends on. But for Java, the chances of you depending on some bullshit weekend project that throws deprecated warning every other build but is completely abandoned by the author is slim to none.

surprised by how few, maybe. i just tried this (well, the maven equivalent) on our main java project and nearly all the dependencies are things we depend on directly. the only place the dependency tree even starts to get deep is where we use batik to rasterise svg and that's split into a bunch of jars that depend on each other for some reason.

poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice

Soricidus posted:

surprised by how few, maybe. i just tried this (well, the maven equivalent) on our main java project and nearly all the dependencies are things we depend on directly. the only place the dependency tree even starts to get deep is where we use batik to rasterise svg and that's split into a bunch of jars that depend on each other for some reason.

I'm on Spring Boot so there's a lot of dependencies but it's mostly apache stuff and other easily recognizable libs.

McGlockenshire
Dec 16, 2005

GOLLOCKS!

Suspicious Dish posted:

monads and strife,

:emptyquote:

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
Frankly, I think a lot of enthusiasm for monads comes from that a lot of people were just never really taught abstract mathematics, and then suddenly they "need" to learn this one abstraction that a bunch of people are talking about, and it's their first real introduction to that kind of formalism and it's a bit mindblowing. There's a cute little functional-programming-for-professionals mini-conference I've gone to a few times where these dudes get up and gush about the amazing things you can do with semigroups and monoids, and it's the same thing. Anybody who actually took algebraic structures in college is going to be massively non-plussed, but that doesn't mean it's not legitimately interesting to people who haven't.

iospace
Jan 19, 2038


Suspicious Dish posted:

monads and strife,

Mods?

Arsenic Lupin
Apr 12, 2012

This particularly rapid💨 unintelligible 😖patter💁 isn't generally heard🧏‍♂️, and if it is🤔, it doesn't matter💁.


(crossposted from infosec thread)

Ladies, gentlemen, and friends, Eric S. Raymond.

https://twitter.com/mjg59/status/1141786872387010561

For people with screenreaders:
Bug report

ESR posted:

Hi,
Our fuzzer found a crash on gif2png (the latest commit on master 34b4105c) due to an invalid read.
Valgrind says: valgrind gif2png PoCPoC
...
Eric S. Raymond @esr · 1 hour ago
Maintainer

Crash confirmed. Buthis program is not expected to be able to deal with arbitrarily broken input. All I'm going to do about it is add a SIGSEGV handler.


Project news

quote:

2.5.14: 2019-06-20::
Redirect segfault to a graceful exit. Tired of meaningless fuzzer bugs.
:commissar:

ryde
Sep 9, 2011

God I love young girls

Soricidus posted:

Is this happening in maven? My experience of java has been more the opposite, everything ends up depending on a handful of huge libraries like guava and the popular bits of apache commons

Less trivial libraries, more a bunch of libraries with the same functionality. My projects usually end up with Jackson and GSON, plus some sort of layer over Jackson, and three different logging libraries just by default. My current project also has a few serialization formats, a "retrier", joda time (despite the library being Java 8), has two embedded HTTP servers, and something like three HTTP clients.

Qwertycoatl
Dec 31, 2008

Arsenic Lupin posted:

(crossposted from infosec thread)

Ladies, gentlemen, and friends, Eric S. Raymond.

https://twitter.com/mjg59/status/1141786872387010561

For people with screenreaders:
Bug report



Project news

:commissar:

My "favourite" ESR advice is that if you have a heisenbug it's probably because your compiler's optimiser is buggy so dial back the optimiser settings until it goes away

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

rjmccall posted:

Frankly, I think a lot of enthusiasm for monads comes from that a lot of people were just never really taught abstract mathematics, and then suddenly they "need" to learn this one abstraction that a bunch of people are talking about, and it's their first real introduction to that kind of formalism and it's a bit mindblowing. There's a cute little functional-programming-for-professionals mini-conference I've gone to a few times where these dudes get up and gush about the amazing things you can do with semigroups and monoids, and it's the same thing. Anybody who actually took algebraic structures in college is going to be massively non-plussed, but that doesn't mean it's not legitimately interesting to people who haven't.

I think you may be onto something. Grade school courses are practically designed to make a person despise math. I'm all for people realizing that math can actually be pretty interesting and engaging.

Soricidus
Oct 21, 2010
freedom-hating statist shill

ryde posted:

Less trivial libraries, more a bunch of libraries with the same functionality. My projects usually end up with Jackson and GSON, plus some sort of layer over Jackson, and three different logging libraries just by default. My current project also has a few serialization formats, a "retrier", joda time (despite the library being Java 8), has two embedded HTTP servers, and something like three HTTP clients.

oh, yeah, that kind of thing is totally real and an issue. just not very similar to the npm thing with single-line libraries

there's an npm package called "zero" and i was legit surprised that it isn't a single line that exports the constant 0

Qwertycoatl
Dec 31, 2008

Soricidus posted:

oh, yeah, that kind of thing is totally real and an issue. just not very similar to the npm thing with single-line libraries

there's an npm package called "zero" and i was legit surprised that it isn't a single line that exports the constant 0

How many packages does it import?

JawnV6
Jul 4, 2004

So hot ...

Dumb Lowtax posted:

I never understand when someone hates on another poster just for posting a lot of text.

editing is a virtue

Ola
Jul 19, 2004

Qwertycoatl posted:

How many packages does it import?

Well, there's Not1, Not2 and Not3... *scroll scroll* Not23, Not24...

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Arsenic Lupin posted:

(crossposted from infosec thread)

Ladies, gentlemen, and friends, Eric S. Raymond.

https://twitter.com/mjg59/status/1141786872387010561

For people with screenreaders:
Bug report



Project news

:commissar:

for those of us who don't know much about C programming, what are the implications of this? does it demonstrate an exploitable defect in the software (e.g. I could run code on your computer with a carefully crafted GIF file), or does it just show cavalier and sloppy practice?

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Yes.

It means that for some input, instead of saying "hey thats bad input" it just crashes. That implies there could be a security issue, but there is a bug at least. ESR's response is like that sega game that you could punch to get to the secret level select menu, when an error happens just pretend like it didn't and do something else.

e: https://www.youtube.com/watch?v=i9bkKw32dGw

taqueso fucked around with this message at 21:48 on Jun 20, 2019

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
It's possible that you could provide some input that doesn't produce a segfault, but still fucks poo poo up. The whole purpose of a parser is to reject arbitrarily broken input.

iospace
Jan 19, 2038


Unrelated I've gotten a BIOS to segfault once. That was fun.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Segfaults are the best case scenario -- the computer detected something went wrong and exited. The implication is that someone determined can make the program do something far worse than segfaulting by setting things up in stupid ways. Basically, it's an invitation to dig deeper. Perhaps some rogue GIF file can steal you bank account information.

Gracefully exiting after a segfault misses the point; the segfault isn't the problem here.

Soricidus
Oct 21, 2010
freedom-hating statist shill

Hammerite posted:

for those of us who don't know much about C programming, what are the implications of this? does it demonstrate an exploitable defect in the software (e.g. I could run code on your computer with a carefully crafted GIF file), or does it just show cavalier and sloppy practice?

not all memory corruption bugs can be turned into code execution. but some can, and it isn't always easy to tell which, hence why they're generally considered something you should drat well take seriously and fix whenever you find them. unless you're esr apparently

Arsenic Lupin
Apr 12, 2012

This particularly rapid💨 unintelligible 😖patter💁 isn't generally heard🧏‍♂️, and if it is🤔, it doesn't matter💁.


Hammerite posted:

for those of us who don't know much about C programming, what are the implications of this? does it demonstrate an exploitable defect in the software (e.g. I could run code on your computer with a carefully crafted GIF file), or does it just show cavalier and sloppy practice?
A "fuzzer" throws a lot of weird data at a piece of code, repeatedly, and watches if it can force the program to do something it's not supposed to do. The reason for this is that people *will* be trying to break the code in the wild, and you want to reduce the chance that they'll hit on an input you never considered. Fuzzers can locate trapdoors into code.

In this case, a lot of C bugs trace back to improperly managing memory one way or another. This triggers a SEGFAULT. The consequences of messed-up memory are serious enough that (A) they can gently caress up the way the program runs and (B) they can be used to overwrite working code with new code. This is why SEGFAULT normally crashes a program, to prevent its continuing after the memory has been tampered with.

A good detailed explanation; if you want less detail, skip to "Since strcpy does not check "

ESR has decided that it's really annoying to sanitize input when a fuzzer detects a problem, so he's just redirected the feature that crashes on a memory leak .... to continue in working code. Which it's at least possible that the segfault has successfully overwritten.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Here's a dumb piece of garbage: gcc 9.0

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90947

megalodong
Mar 11, 2008

in other esr news, he's made a "loadsharer" page for people that hold up the internet with things like the timezone database, dnsmasq etc.

of course where would the internet be without raymond? nowhere, that's where!

quote:

Me. Also now on SubscribeStar for those of you unhappy with Patreon. GIFLIB, GPSD, NTPsec, irkerd, repository conversions for major projects, my 17-year effort to clean up the manual-page corpus - all that and now organizing a network to fund other LBIPs. Need: High. Criticality: High: Past service: High.

yes, ers's hostile fork of ntpd is just as critical to the internet as the tz database.

Arsenic Lupin
Apr 12, 2012

This particularly rapid💨 unintelligible 😖patter💁 isn't generally heard🧏‍♂️, and if it is🤔, it doesn't matter💁.


Bruce Byfield posted:

In addition, Sons claims that some of the developers working on key projects like NTP are "are older than my father" -- presumably, in their fifties or sixties -- and so out of date that they should retire. Aging developers will shortly become a growing concern throughout free software, and Sons is right that younger recruits should be encouraged.

Barf. Experience is bad, and people should stop working when they're old enough to be grandfathers. There are rigid and out-of-date developers in their middle age, true, but this does not magically start at age 50.

xtal
Jan 9, 2011

by Fluffdaddy
Old people made computers, computer science, basically all the software we use today. Young people just write the same JavaScript app in a new framework every 6 months.

Absurd Alhazred
Mar 27, 2010

by Athanatos

xtal posted:

Old people made computers, computer science, basically all the software we use today. Young people just write the same JavaScript app in a new framework every 6 months.

Lots of young people are doing really interesting stuff in graphics if nowhere else. :shrug:

Arsenic Lupin
Apr 12, 2012

This particularly rapid💨 unintelligible 😖patter💁 isn't generally heard🧏‍♂️, and if it is🤔, it doesn't matter💁.


xtal posted:

Old people made computers, computer science, basically all the software we use today. Young people just write the same JavaScript app in a new framework every 6 months.
Depends on the old people. A friend of mine once said, "Fred doesn't have ten years of experience in Smalltalk, he has one year ten times." There exist people who haven't met a new idea they liked since 1990. There also exist people who keep growing and changing.

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

zergstain posted:

I was only familiar with functor being used to mean "function object," i.e. a type that defines operator()().


I was asking specifically about C++ STL containers. If std:: appears in other languages, my bad.

Does the STL provide equivalent methods to pure and bind that can be applied to monad types, or is that just a Haskell specific thing?

I think it’s like having a template trait over containers like

C++ code:
template <typename Contained>
class Monad<Contained> {
 public:
 T pure();
 template <typename U>
 Monad<U> apply(std::func<U, T> functor);
}
(Syntax errors etc to taste, phoneposting) and anything that fulfills that contract is a monad. Uh this probably has to be a trait or something whatever. You get it.

Absurd Alhazred
Mar 27, 2010

by Athanatos
https://twitter.com/gravislizard/status/1141871110192914432

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof
programmers of every age from 10 to 100 are making worthwhile and significant contributions to all kinds of software projects

esr is not one of them

Adbot
ADBOT LOVES YOU

zergstain
Dec 15, 2005

I tried writing a SIGSEGV handler once. That was a long time ago when I was much newer to programming, and I was just playing with stuff, so it's not in the wild anywhere. If I remember, I thought I could "uncrash" the program. Never got anywhere beyond an infinite SIGSEGV loop, and gave up on the idea shortly.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply