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
Fiedler
Jun 29, 2002

I, for one, welcome our new mouse overlords.

Plorkyeran posted:

there was pretty clearly someone working on vs who made it their pet project to make all sorts of things hotkeyable because most of those sorts of things are doable with the keyboard. probably not changing the width of the memory window.

other way around. it's the result of a top-down mandate to invest in accessibility.

Adbot
ADBOT LOVES YOU

animist
Aug 28, 2018

redleader posted:

love "periodic' tables that miss the point entirely

the one for rust types is quite good 'cause it's actually, yknow, a table


unrelated: can somebody explain the difference between prolog and SAT/SMT solvers to me? They seem really similar from a user's perspective ("specify an NP-hard logic problem, wait an hour for a mysterious algorithm to solve it") but they seem to be entirely separate fields. i can't find anything connecting them aside from some blog posts implementing SMT solvers in prolog

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
it's like poetry, it rhymes

edit: this was about aperiodic tables

Cybernetic Vermin
Apr 18, 2005

animist posted:

unrelated: can somebody explain the difference between prolog and SAT/SMT solvers to me? They seem really similar from a user's perspective ("specify an NP-hard logic problem, wait an hour for a mysterious algorithm to solve it") but they seem to be entirely separate fields. i can't find anything connecting them aside from some blog posts implementing SMT solvers in prolog

the core evaluation mechanism for prolog is a solver for a kind of Horn formulas, and boolean Horn formulas are solvable in linear time by a simple propagation procedure (Horn clauses have at most one unnegated term, which can be abused to by depth-first search on a sequence of goal clauses try to satisfy the formula, helped by the fact that you always start by unifying your goal to the unnegated term for the clauses in order).

the reason prolog, as a general programming language, can nonetheless encode NP-complete and undecidable problems is due to it not using *Boolean* Horn formulas, instead it has complex terms (trees of symbols) which are built up by unification as part of that propagation (as well, of course, as a bunch of functions which do extra stuff beyond the simple search). if you write a "sufficiently pure" prolog program where no variable is ever bound to anything but the symbols 'true' and 'false' it will always run in linear time.

SAT are general boolean formulas, we do not have the nice horn clause property, so it is NP-complete to solve these in themselves. you'd solve one in prolog by having a variable bound to a complex term which describes a mapping from the variables in the underlying sat formulas to 'true' and 'false' (well, something amounting to that). this prolog program may at once use exponential time (as we'd expect solving an NP-complete problem) since the linear horn propagation may now (through unification) rebind the variable to each of its exponentially many values.

SMT related closely enough to this to be potentially confusing, it is a technique to use SAT solver to solve formulas with more general predicates and/or quantification. it basically operates by having a SAT solver run away setting its booleans on predicates, where SMT part breaks in adding facts which are consequences of the SAT solvers current state, but which the SAT solver cannot derive itself within its simple boolean view of things (e.g. if the SAT solver is on a path where it thinks that the "variables" 'x<y' and 'y<z' are both true the SMT procedure is prepared to leap in and assert that the "variable" 'z<x' is false). one can take the view that the term unification part of prolog is a kind of like SMT on top of its Horn solver, the Horn solver puttering along and just asserting 'unify(some mess of a term, another mess of a term)', and backtracking when the "SMT" says that it has stated a contradictory series of unifications.

e: to actually cover the practical too: you'd never encode a linear-time algorithm as a SAT formula and hand it over to a SAT/SMT solver, since you are liable to have it run in the exponential time required by the logic involved. in prolog you can write efficient algorithms just fine. in the other direction you'd never solve an NP-complete problem in Prolog (unless you have some custom heuristics which make it make sense) as a SAT/SMT solver will almost always be faster.

Cybernetic Vermin fucked around with this message at 11:27 on May 23, 2020

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



anyone say bool poo poo yet

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

Cybernetic Vermin posted:

the core evaluation mechanism for prolog is a solver for a kind of Horn formulas, and boolean Horn formulas are solvable in linear time by a simple propagation procedure (Horn clauses have at most one unnegated term, which can be abused to by depth-first search on a sequence of goal clauses try to satisfy the formula, helped by the fact that you always start by unifying your goal to the unnegated term for the clauses in order).

the reason prolog, as a general programming language, can nonetheless encode NP-complete and undecidable problems is due to it not using *Boolean* Horn formulas, instead it has complex terms (trees of symbols) which are built up by unification as part of that propagation (as well, of course, as a bunch of functions which do extra stuff beyond the simple search). if you write a "sufficiently pure" prolog program where no variable is ever bound to anything but the symbols 'true' and 'false' it will always run in linear time.

SAT are general boolean formulas, we do not have the nice horn clause property, so it is NP-complete to solve these in themselves. you'd solve one in prolog by having a variable bound to a complex term which describes a mapping from the variables in the underlying sat formulas to 'true' and 'false' (well, something amounting to that). this prolog program may at once use exponential time (as we'd expect solving an NP-complete problem) since the linear horn propagation may now (through unification) rebind the variable to each of its exponentially many values.

SMT related closely enough to this to be potentially confusing, it is a technique to use SAT solver to solve formulas with more general predicates and/or quantification. it basically operates by having a SAT solver run away setting its booleans on predicates, where SMT part breaks in adding facts which are consequences of the SAT solvers current state, but which the SAT solver cannot derive itself within its simple boolean view of things (e.g. if the SAT solver is on a path where it thinks that the "variables" 'x<y' and 'y<z' are both true the SMT procedure is prepared to leap in and assert that the "variable" 'z<x' is false). one can take the view that the term unification part of prolog is a kind of like SMT on top of its Horn solver, the Horn solver puttering along and just asserting 'unify(some mess of a term, another mess of a term)', and backtracking when the "SMT" says that it has stated a contradictory series of unifications.

e: to actually cover the practical too: you'd never encode a linear-time algorithm as a SAT formula and hand it over to a SAT/SMT solver, since you are liable to have it run in the exponential time required by the logic involved. in prolog you can write efficient algorithms just fine. in the other direction you'd never solve an NP-complete problem in Prolog (unless you have some custom heuristics which make it make sense) as a SAT/SMT solver will almost always be faster.

hello effort-poster. i will read and digest what you have written here

i wish to ask, do you know about alloy and if so what do you think of its "make rules in set theory and then search for instances and counterexamples" functionality?

Cybernetic Vermin
Apr 18, 2005

prisoner of waffles posted:

hello effort-poster. i will read and digest what you have written here

i wish to ask, do you know about alloy and if so what do you think of its "make rules in set theory and then search for instances and counterexamples" functionality?

nah, i've never found myself very far from SAT myself. do beware also that i am not a very deep expert on these matters, so there may be mistakes lurking in the above.

animist
Aug 28, 2018

ty for the detailed answer, this is really helpful. i get the shape of these things more now, i think.

Xarn
Jun 26, 2015
Alloy, and formal verification in general, is great. It forces you to really write down and state all of your assumptions. If you don't, then it will find weird-rear end counterexamples, and show you just how wrong you are.

Bloody
Mar 3, 2013

alloy appears to be a javascript framework?

mystes
May 31, 2006

Bloody posted:

alloy appears to be a javascript framework?
Every word has a javascript framework named after it. That doesn't mean that there can't also be useful things with the same name.

Bloody
Mar 3, 2013

alloy is unusually poorly named for internet searching

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

Bloody posted:

alloy is unusually poorly named for internet searching

this one https://alloytools.org/

most of the available presentations of it are papers or tutorials or a book; this https://alloy.readthedocs.io/en/latest/ is iiii thiiink the official online reference but like, the idea of it is novel enough that it makes more sense to learn about it from a book or scholarly paper rather than just being like, "gieb me language spec plox"

Truga
May 4, 2014
Lipstick Apathy
speaking of javascript

Soricidus
Oct 21, 2010
freedom-hating statist shill
lmao of course node modules all say “please like and subscribe”

Bonfire Lit
Jul 9, 2008

If you're one of the sinners who caused this please unfriend me now.

Truga posted:

speaking of javascript


there is, of course, also "is-even" by the same author, which imports is-odd and then returns the negation of that. somehow they needed four releases to get to that point

e: it has >4M downloads

Bonfire Lit fucked around with this message at 10:34 on Jun 9, 2020

Cybernetic Vermin
Apr 18, 2005

Bonfire Lit posted:

there is, of course, also "is-even" by the same author, which imports is-odd and then returns the negation of that. somehow they needed four releases to get to that point

e: it has >4M downloads

don't forget that it has a dependency on "is-number" by the same author.

otoh what is a number is a pretty deep question in javascript land.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Cybernetic Vermin posted:

don't forget that it has a dependency on "is-number" by the same author.

otoh what is a number is a pretty deep question in javascript land.

dependency hell is a fun vacation spot for the javascript programmer

pseudorandom name
May 6, 2007

lol https://www.npmjs.com/package/is-is-odd

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
step 1: write a trivial package
step 2: write more packages which intricately depend upon it
step 3: submit pull requests to every open source project you can find which introduce your packages as dependencies
step 4: wait
step 5: prominently display your status as the author of the most-downloaded package on npm on your resume

it's more grift and malice than idiocy, hth

CPColin
Sep 9, 2003

Big ol' smile.
Don't forget to reject pull requests, then incorporate their changes yourself, while also making idiotic mistakes, and do both in one commit, despite being unrelated:

https://github.com/jonschlinkert/is-odd/commit/de4ce1b35c905f0e029e93ef171775c40e24f69d

Asleep Style
Oct 20, 2010

CPColin posted:

Don't forget to reject pull requests, then incorporate their changes yourself, while also making idiotic mistakes, and do both in one commit, despite being unrelated:

https://github.com/jonschlinkert/is-odd/commit/de4ce1b35c905f0e029e93ef171775c40e24f69d

from that guys profile:

"🤔 Trying to stay in the best branch of the wave function."

gently caress off

Shaggar
Apr 26, 2006

Truga posted:

speaking of javascript

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
the weird thing is that there's more than one person with jon schlinkert's gimmick, who all have competing "is-odd" packages and all fight to the death over it

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Suspicious Dish posted:

the weird thing is that there's more than one person with jon schlinkert's gimmick, who all have competing "is-odd" packages and all fight to the death over it

as someone who has ever searched npm, this is the least surprising thing

"node package quality inspector" should be a highly-paid job title

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
code:
npm install package-quality-inspector

const pqi = require('package-quality-inspector');

console.log(pqi("any-package-name")); // -> 0

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
code:
npm install package-quality-inspector

const pqi = require('package-quality-inspector');

console.log(pqi("package-quality-inspector")); // -> 1

mystes
May 31, 2006

Suspicious Dish posted:

the weird thing is that there's more than one person with jon schlinkert's gimmick, who all have competing "is-odd" packages and all fight to the death over it
That's why you need to use the "is-is-odd-odd" package to determine which one to use.

Athas
Aug 6, 2007

fuck that joker

Asleep Style posted:

from that guys profile:

"🤔 Trying to stay in the best branch of the wave function."

gently caress off

The Javascript man has other interesting opinions, too:



Well actually, the police wearing cameras at all times would be very cool & good, but I'm guessing that's not where he wanted to go with this.

Xarn
Jun 26, 2015
Of course he has

Bloody
Mar 3, 2013

quote:

works with strings and numbers

Shaggar
Apr 26, 2006

Athas posted:

The Javascript man has other interesting opinions, too:



Well actually, the police wearing cameras at all times would be very cool & good, but I'm guessing that's not where he wanted to go with this.

is this the effect javascript has on people or do terrible people just choose javascript?

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

yes

Notorious b.s.d.
Jan 25, 2003

by Reene

Shaggar posted:

is this the effect javascript has on people or do terrible people just choose javascript?

two things can be true

akadajet
Sep 14, 2003

Truga posted:

speaking of javascript


Jon Schlinkert is a disgrace to Jon's everywhere

Soricidus
Oct 21, 2010
freedom-hating statist shill
code:
function isOdd(x) {
    return x === "odd"
}

Kuvo
Oct 27, 2008

Blame it on the misfortune of your bark!
Fun Shoe
you forgot a semicolon

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
say no more fam

code:
; isOdd =odd =>('odd') ==eval('odd')

animist
Aug 28, 2018

Internet Janitor posted:

say no more fam

code:
; isOdd =odd =>('odd') ==eval('odd')

:stonk:

Adbot
ADBOT LOVES YOU

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

Bored Online posted:

help

my boss really really likes go

i really really really really really really like go
and i want you
to want go
like i want go too

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