lexi_lambda

@lexi_lambda@mastodon.social

forever arguing that things can be understood • she/her, ⚢ • Chicago

This profile is from a federated server and may be incomplete. Browse more on the original instance.

markusde, to random
@markusde@mathstodon.xyz avatar

is it really too much to ask for

  • free money

  • job

  • perks

  • NO! work

lexi_lambda,
lexi_lambda, to random

[I am linked to an HN discussion thread] please do not ascribe meaning to the statements produced by programmers. they’re just sampling from a large corpus of things they’ve seen before. they aren’t really intelligent and don’t really “understand” anything

lexi_lambda, to random

had a dream last night that I was giving a talk in like 30 mins and had no memory of agreeing to give the talk or making slides. then I realized I was dreaming and therefore decided I would simply give the talk and see what slides my subconscious came up with. in fact it turned out the talk was about how linear types are bad (something I don’t in any way believe) and the slides involved an unhinged interactive #lang slideshow presentation with an embedded REPL for reasons unknown to me

lexi_lambda,

@regehr literally just searched for this on google scholar just to make sure you were making this up

lexi_lambda,

@regehr it will be a very dark day indeed when scholar also falls

lexi_lambda, to random

The Astonishing, Unfailing GHC Runtime System (1967)

regehr, to random
@regehr@mastodon.social avatar

"Lambda Obfuscation"

https://home.cse.ust.hk/~shuaiw/papers/LO.pdf

if there was some kind of computer science alignment chart, I think one of the axes would be whether you think making use of lambda calculus as a code obfuscation mechanism is hilarious

lexi_lambda,

@regehr SIGBOVIK-ass paper

lexi_lambda, to random

so many people I know are going to be at ICFP this year. I’m not even presenting anything. feel like I should probably just abandon all pretense that I am attending for any reason other than to partake in a weeklong party with my friends

lexi_lambda, to random

so, the way this next optimization works is that GHC stares sternly at your program until it feels bad about itself and runs faster,

palvaro, to random
@palvaro@discuss.systems avatar

Chicago’s a fucking awesome city. I had no idea.

lexi_lambda,

@palvaro many are saying this

lexi_lambda, to random

bad malloc impls create weak symbols. weak symbols create good malloc impls. good malloc impls create strong symbols. strong symbols create

lexi_lambda, to random

@bhaktishh want you to know that I somehow stumbled upon this sequence of tweets several months ago and I still periodically think about it

lexi_lambda, to random

@lindsey PLMinusContext came up this evening in a group chat and we miss it :(

lexi_lambda, to random

I am pleased to announce the release of Part 1 of my new video series in which I attempt to convince you that lazy evaluation is good, actually. (Yes, I said I would make this six months ago, and yes, there’s probably a joke to be made there.) https://www.youtube.com/watch?v=fSqE-HSh_NU

lexi_lambda,
lexi_lambda,

@phairupegiont Oh, stop catastrophizing. First of all, GHC is still required to pick one of the bottoms that is actually in your program, not some random one it invented out of thin air, so obviously the argument to error matters. Also, even though it has a choice of which one it reports, they’re all genuinely demanded, so they all indicate bugs in your program. It’s not like it’s somehow choosing a “wrong” exception; they’re all right exceptions.

lexi_lambda,

@phairupegiont Second of all, it is not the case that print ([0..10^99]:error "bang") is free to die before printing anything because there are side effects involved. I haven’t discussed how IO interacts with laziness yet; everything has been restricted to pure code. We’ll get there.

lexi_lambda,

@phairupegiont Why would you ever want that?

lexi_lambda,

@phairupegiont But why should that error take precedence? They are both equally significant problems with the program: they both need to be fixed before it can run successfully. I don’t see why you’d demand that one error be reported before the other; it seems totally arbitrary to me.

lexi_lambda,

@phairupegiont I think perhaps you are confusing two scenarios. If you write

if y == 0 then error "bad" else x div y,

then GHC will never raise “divide by zero”—it doesn’t speculatively execute in such a way, as there would be no reason to do so. In the example in the video, it’s more like x happens to be ⊥ in addition to y happening to be 0. These are unrelated issues, simultaneously present, so which one gets reported is arbitrary.

lexi_lambda,

@phairupegiont If you have some guard that raises a nice error message around some code that raises a worse error message, GHC will respect your wishes. But this is very different from passing a ⊥ to a function that demands that argument! In the first case, the innate control flow structure expresses a dependency between the exceptions, but in the second case, there is no such dependency.

lexi_lambda,

@phairupegiont Having said all of this, it is true that if you care about knowing exactly what error message will be produced from pure code, you should be using Either (or something like it), not exceptions. Exceptions are for panicking.

lexi_lambda,

@phairupegiont No, that program is indeed entirely equivalent. But there is a difference between addMaybe and the expression I gave above: in the example involving div, neither x nor y is ⊥, so the bottoming call is lexically inside the else branch. In addMaybe, one of the arguments is ⊥. This is different!

lexi_lambda,

@phairupegiont I simply disagree that the evaluation order is being “messed up”! Haskell does not define an evaluation order, it defines a semantics, and that semantics includes imprecise exceptions. If you absolutely need a specific error to be produced by pure code, then you must model it as a value, not as an exception.

lexi_lambda,

@phairupegiont The fact that you’ve never noticed this suggests that the way GHC currently behaves is entirely compatible with using error that way, so I wouldn’t worry too much about it if it’s just for debugging. GHC is allowed to do many things, but that does not mean that it will. Compiling with -O0 also makes evaluation much more naïve, so debugging with an unoptimized build might help if it ever did become an issue. I think giving GHC the flexibility is well worth it!

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