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
Notorious b.s.d.
Jan 25, 2003

by Reene

Xarn posted:

It wouldn't be a Saturday evening without nbsd being completely wrong about poo poo. :allears:

oh boy a white noise poster adding absolutely no content to the thread

thank you for blessing us with your careful, sober judgment, what would we do without a peanut gallery

Adbot
ADBOT LOVES YOU

Nomnom Cookie
Aug 30, 2009



Notorious b.s.d. posted:

a good deployment/update story

jusched.exe is out of scope here, I presume

Notorious b.s.d.
Jan 25, 2003

by Reene

Nomnom Cookie posted:

jusched.exe is out of scope here, I presume

i don't even know what that is, so let's say "yes"

Xarn
Jun 26, 2015
Sheesh, calm down before you spittle on your shoes.

Xarn
Jun 26, 2015
Apart from the amazing take that loving Perl is best of plangs (I too like contagious and silent undefs), CPython has had GC fallback for years.

Notorious b.s.d.
Jan 25, 2003

by Reene

Xarn posted:

Apart from the amazing take that loving Perl is best of plangs (I too like contagious and silent undefs), CPython has had GC fallback for years.

ok cool python has now reached parity with perl, great

now they're only equally bad instead of one of them being slightly worse

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Space Whale posted:

I still just don't 'get' people acting like types slow you down. How the gently caress? HOW!?

have you ever known just what you want to accomplish but had to go through absurd ritual just to appease a type system?

if you haven’t either you think in different ways than a lot of developers or you haven’t worked on systems that are sufficiently complex, with a sufficient number of moving parts, owned by different teams, and modified at different rates, and that have to interact with the real world

“types solve everything” is just as much bullshit as “objects solve everything” is just as much bullshit as “types are useless” is just as much bullshit as “inheritance is never good” etc.

types, inheritance, polymorphism, different kinds of dispatch, they’re all tools that can be wielded in more or less appropriate ways for addressing different problems

it can be good to break out of your bubble and try solving some real problems in idiomatic ways in languages like Haskell, and Smalltalk, and Common Lisp, and APL, and Rust, and assembly, etc.

then not only will you have a better feel for when different tools are appropriate, you may also appreciate what others like about tools that you don’t, and what others don’t like about the tools that you do

Notorious b.s.d.
Jan 25, 2003

by Reene
common lisp taught me that i really, really like having a repl

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."

redleader posted:

ok we need to brainstorm up some other bad and/or failed technologies for other posters to pick up and shill as their gimmicks. who wants perl? anyone want to be known as the ms access defender?

i would like to adopt hypercard

lately i started using it as my gimmick for some small informal presentations and i'm having a lot of fun with it

Vomik
Jul 29, 2003

This post is dedicated to the brave Mujahideen fighters of Afghanistan

Notorious b.s.d. posted:

type annotations are totally optional in typescript

like, literally the first example from the typescript website is untyped:

code:
function greeter(person) {
    return "Hello, " + person;
}

let user = "Jane User";

document.body.textContent = greeter(user)
this is 100% valid typescript

smdh

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Space Whale posted:

https://vimeo.com/74354480

So I actually say through this
Turns out bugs really aren't of the typey... type? :shrug:

I have seen exceptionally few bugs in literal decades of working with Objective-C that were due to the wrong types of objects being accidentally passed in ways additional type checking would have prevented

I have seen plenty of the kind of “type” bug a language-level type-checker can’t prevent in a large system, where a memory address has been reused due to a runtime memory management bug

I’ve also seen tons of boilerplate have to be written to deal with the fact that real world data can be heterogeneous, and it’s useful to be able to represent it in semi-uniform ways (like plist and JSON); what’s most important in that code is validating the assumptions about the data itself, rather than appeasing the type checker at compile time, but often the latter can get in the way of the former

in other words the ability to work with heterogeneous collection types like Dictionary<key=String, value=PlistType> is important, and your type system really needs to accommodate that reasonably

Swift’s enum-as-ADT functionality strikes a good balance here

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Notorious b.s.d. posted:

type annotations are totally optional in typescript

type inference is not the same as an optional type system

I don’t know typescript; is the type of your example function (Any → Any) because no types are declared, or is it (String → String) because that’s what can be inferred?

now, I like having types spelled out explicitly in the code, but in a system with inference not having them spelled out doesn’t mean they’re not present—at compile time, no less, not just runtime

Notorious b.s.d.
Jan 25, 2003

by Reene

eschaton posted:

I don’t know typescript; is the type of your example function (Any → Any) because no types are declared, or is it (String → String) because that’s what can be inferred?

if i add one line to the example program, it becomes Any -> Any

that is the problem; it will happily infer garbage unless you get explicit. that's what makes it "optional"

you're free to not be explicit, and then it will "just work" the way javascript "just works"

mystes
May 31, 2006

Don't they just allow that so you can convert your code to typescript incrementally?

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

eschaton posted:

type inference is not the same as an optional type system

I don’t know typescript; is the type of your example function (Any → Any) because no types are declared, or is it (String → String) because that’s what can be inferred?

now, I like having types spelled out explicitly in the code, but in a system with inference not having them spelled out doesn’t mean they’re not present—at compile time, no less, not just runtime

it's string -> string. i haven't touched typescript since last year but iirc if you try to pass anything that can be inferred as a non-string the compiler will give you an error

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.

Internet Janitor posted:

the language i like: centered around order, justice, and all that is good in the world. mom, apple pie, the laugh of a child

the other languages: an engine of hatred and wickedness. cruelty, violence, screeching noises

users of the language i like: philosopher-kings of grace and enlightenment, weaving tapestries of pure thought and deftly solving the world's ills. novices are drawn to the language by its self-evident virtue, and experts savor its delicate refinement as one would a fine leather chair or a particularly peaty scotch

users of other languages: brutish troglodites who fear beauty and worship filth. novices are victims of a terrible joke, which will twist and warp their minds long before the horrifying punchline reveals itself. when they are not using the language, experts are presumed to pass the time torturing small animals

nbsd didn’t get that this post was mocking his “programming language choice as moral panic” tone

repiv
Aug 13, 2009

Notorious b.s.d. posted:

if i add one line to the example program, it becomes Any -> Any

that is the problem; it will happily infer garbage unless you get explicit. that's what makes it "optional"

you're free to not be explicit, and then it will "just work" the way javascript "just works"

that's why you enable strict mode so the compiler errors out and forces you to annotate the cases it can't infer, rather than shrugging and inferring Any

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
I think the world needs one definitive language to handle everything

let’s call it juche, I’ll start the wiki

Notorious b.s.d.
Jan 25, 2003

by Reene

Xarn
Jun 26, 2015

eschaton posted:

I think the world needs one definitive language to handle everything

let’s call it juche, I’ll start the wiki

Let's copy Agda's type system, but make it optional for rapid prototyping.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Notorious b.s.d. posted:

common lisp taught me that i really, really like having a repl

the console in every browser is the best part of javascript development. too bad about the almost everything else

Soricidus
Oct 21, 2010
freedom-hating statist shill
what language doesn’t come with a repl as standard these days though. c++ I guess? and go obviously because go devs can’t have nice things

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
so, legit question: why even use repls?

i mean if im figuring out the best way to write an algorithm i just write everything in a big unit test so i can just use my regular editor etc

Kazinsal
Dec 13, 2011

Soricidus posted:

what language doesn’t come with a repl as standard these days though. c++ I guess? and go obviously because go devs can’t have nice things

rust doesn't come with a repl because it's mozilla's go

e: okay I take it back, no one at mozilla is using rust as a way to write bullshit products to bait out promotions

Cybernetic Vermin
Apr 18, 2005

Soricidus posted:

what language doesn’t come with a repl as standard these days though. c++ I guess? and go obviously because go devs can’t have nice things

on the one hand most do, on the other most have bad repls. partially it is just easy for lisp since it has a few core data structures which pretty-print well (though this is heavily helped by the language poisoning the users mind to be able to read the nested parenthesis needed), but e.g. the python repl, which is pretty typical, you're going to spend a lot of time staring at '<XYZ object 0x188f1a>' (or whatever the notation is) and writing vars(x) to try to walk it incredibly inefficiently.

again the javascript consoles do really shine with their visualized walkable objects and so on. even on terminal though it is certainly possible to do a lot better by just having some sane defaults for pretty-printing, with defaults for cutting long lines, listings, recursions, etc., but a lot of standard tools fall to do it, and rarely does better (maintained) tools actually exist.


e:

Sagacity posted:

so, legit question: why even use repls?

i mean if im figuring out the best way to write an algorithm i just write everything in a big unit test so i can just use my regular editor etc

i think it is pretty useful to think about it as a mode of debugging. load up bits of your program and exploratively check that you can put them together in the way you expect and the data resulting looks sane.

Cybernetic Vermin fucked around with this message at 11:04 on May 17, 2020

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Sagacity posted:

so, legit question: why even use repls?

i mean if im figuring out the best way to write an algorithm i just write everything in a big unit test so i can just use my regular editor etc

in the webdev/javascript case it's usually poo poo like "okay, what elements actually match this selector?" also just exploring the data structures when stopped at a breakpoint

Xarn
Jun 26, 2015
If you are using Python repl and aren't using IPython, you are wrong.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
the more statement-oriented a language is, and the more values tend to not have natural prettyprintable forms, the bigger a pain in the rear end it will be to work with it at a repl

the more expression-oriented and homoiconic a language is, the more useful repls tend to be. languages with good support for functional programming help too, since you'll have lots of tools available for non-destructively trying things. chaining together higher-order functions works well at a repl. writing for loops sucks at a repl

concise langs (you guys already know what i mean by this) are especially well suited to being a command-line interface for playing around with data

i often find that doing simple experiments at a repl can be faster and more informative than reading documentation

SAVE-LISP-AND-DIE
Nov 4, 2010
Inline REPL evaluation in the IDE is cool and good. Specifically being able to evaluate the exact expression at the point of your text cursor with a hotkey is like TDD without the tedium

MononcQc
May 29, 2007

having a repl just creates new ways to interact with your programs and software, a lot of it for introspection and discovery. The big point is about having an option to make things interactive rather than only iterative with tests.

Part of it is the feedback loop’s size; imagine that instead of running a single unit test when you change a thing, each change has to be pushed over the CI pipeline and you must go fetch the report to know if your test passed.

often the repl is good to try a few things, experiment, and help figure out what the test might look like.

Notorious b.s.d.
Jan 25, 2003

by Reene

Sagacity posted:

so, legit question: why even use repls?

i mean if im figuring out the best way to write an algorithm i just write everything in a big unit test so i can just use my regular editor etc

if i go to write a unit test that process starts at a repl

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

MononcQc posted:

having a repl just creates new ways to interact with your programs and software, a lot of it for introspection and discovery. The big point is about having an option to make things interactive rather than only iterative with tests.

Part of it is the feedback loop’s size; imagine that instead of running a single unit test when you change a thing, each change has to be pushed over the CI pipeline and you must go fetch the report to know if your test passed.

often the repl is good to try a few things, experiment, and help figure out what the test might look like.

this is how our fpga loop eventually works, build for hours hope the timing works

it often does, sometimes you have to reseed the placement thing lol

Zaxxon
Feb 14, 2004

Wir Tanzen Mekanik

Sagacity posted:

so, legit question: why even use repls?

i mean if im figuring out the best way to write an algorithm i just write everything in a big unit test so i can just use my regular editor etc

I think the best of both worlds was one of the commercial common lisps (I think maybe Franz Common Lisp , it was a million years ago) had a thing where you could just hover over a paren and hit F3 or something and it would evaluate the statement and pop you into a lil REPL to play with it. So you would write like (defun butts (blah) "" (...) ) and then pop down and say (butts "lol") and see if it worked the way you wanted.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
“evaluate form” has been a thing since the Lisp Machine

Pardot
Jul 25, 2001




MononcQc posted:

having a repl just creates new ways to interact with your programs and software,

yes, it's also extremely powerful to have a repl in a production environment to do one-off maintenance operations that it'd make no sense to build apis for or whatever you have to do when you don’t have a repl

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Pardot posted:

yes, it's also extremely powerful to have a repl in a production environment to do one-off maintenance operations that it'd make no sense to build apis for or whatever you have to do when you don’t have a repl

lol if you’ve never used gdb as a repl to poke some piece of production software into shape

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Subjunctive posted:

lol if you’ve never used MacsBug as a repl to poke some piece of production software into shape

Bloody
Mar 3, 2013

the only time I have found a repl useful at all is when learning haskell and that's largely because there are no other tools in that ecosystem. in civilized languages like c# I am going to run my application with the debugger that provides substantially more powerful inspection, introspection, exploration, and iterative development capabilities. if the best debugger you know is like gdb at a command line or something then yeah sure you probably need a repl but you also just need to stop living in the 80s

mystes
May 31, 2006

How about if we have a good debugger but also a good repl?

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

that's like asking for Ms paint inside photoshop

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