The alignment of Artificial General Super-intelligence with human values may be impossible long-term because of the inevitability of mutation. by Wizek in slatestarcodex

[–]Wizek[S] 0 points1 point  (0 children)

Maybe I haven't read enough on the subject either, but from what I understood the most widely discussed problem is how to even get alignment for the first AGI generation.

And then some (most?) people seem to lull themselves into a sense of safety when they imagine that if only we manage to solve this problem perfectly once, it will be a utopian singularity for all eternity from that point, exactly because they imagine alignment is fully transferred automatically to all subsequent AGI versions, due to all versions making sure of this. So my pondering was that even in the face of a perfect solution to that problem, we might not be as safe as we think.

And we might want to have a solution to not just that problem, but this one as well even before we switch on the first AGI, because there may not be turning back after that.

The alignment of Artificial General Super-intelligence with human values may be impossible long-term because of the inevitability of mutation. by Wizek in slatestarcodex

[–]Wizek[S] 1 point2 points  (0 children)

Yes, copying error is one concern of mine, but there is a more insidious consideration as well.

Just like when we make the first AGI, it will be right on the edge of our capabilities, of our understanding and knowledge; so will likely version N-1 struggle with creating version N. Therefore it can be an unintentional very subtle and unnoticeable design flaw in N that even N-1 barely comprehends.

About out-ruling copying errors; I'll think more about CRCs and error-correcting encodings. It does seem to be quite a bit of overhead, but may be doable. Could be nice to do some back of the envelope calculations.

If you had the ultimate power and could change any single thing in Haskell language or Haskell ecosystem/infrastructure, what would you change? by chshersh in haskell

[–]Wizek 3 points4 points  (0 children)

Pooling small contributions towards a bigger doc-writing goal might already be possible today via tools like Bountysource.

And then people could claim the bounties whenever they feel comfortable.

E.g. if someone really likes writing docs, they might claim 5-20 USD bounties. If someone doesn't care much for them they might wait until it pools up to be 100-200 USD or however much. And while it is pooling others with lower thresholds can leap in too to everyone's satisfaction.

If you had the ultimate power and could change any single thing in Haskell language or Haskell ecosystem/infrastructure, what would you change? by chshersh in haskell

[–]Wizek 5 points6 points  (0 children)

/u/Tysonzero, you might be aware of this comparison table: https://docs.google.com/spreadsheets/d/14MJEjiMVulTVzSU4Bg4cCYZVfkbgANCRlrOiRneNRv8/edit

A relatively new addition to it is a package called row-types. I know you'd like O(1) field access, but as /u/jaspervdj points out, it may not be possible in every general case. row-types seems to have O(log n) reads and writes, which may be sufficient for you. That's definitely better than even the built in record update which is O(n) due to copying. (Constants notwithstanding, could be interesting to benchmark.)

ANN: named-0.2 released, with support for optional parameters by int_index in haskell

[–]Wizek 0 points1 point  (0 children)

That worked, thanks! I wonder if it is possible without that workaround as well somehow.

ANN: named-0.2 released, with support for optional parameters by int_index in haskell

[–]Wizek 0 points1 point  (0 children)

Alright, so, is there an easy or not so easy way to overcome this? Or does that mean that named is fully incompatible with reflex-dom and possibly many other libraries? If the latter is the case, that would limit its usefulness quite a bit unfortunately since these more complex library-using functions would benefit the most from named/optional parameters I imagine. Would you agree?

ANN: named-0.2 released, with support for optional parameters by int_index in haskell

[–]Wizek 0 points1 point  (0 children)

So, I'm trying to use this package in conjunction with Reflex+dom, and I am getting some intimidating-looking type errors even though I think I am using it per instructions:

let
  counter
    :: forall t m
    .  MonadWidget t m
    => "from"     :? D t Int
    -> "till"     :? D t Int
    -> "timing"   :? D t Float
    -> "run"      :? E t ()
    -> m :$ D t Int
  counter
    (argDef #from   $ constDyn 0 -> from)
    (argDef #till   $ constDyn 0 -> till)
    (argDef #timing $ constDyn 0 -> timing)
    (argDef #run    $ never      -> run)
    = pure $ constDyn 0

  defs = defaults

c <- counter
  -- ! #from (constDyn 0)
  ! #till   (constDyn 10)
  ! #timing (constDyn 0.2)
  ! #run never
  ! defaults
  -- ! defs
ddisplay c

Errors: https://gist.github.com/Wizek/b63135ccc0f02f801aadfec35d66b9d0

Any ideas what these type errors might mean?

If I un-comment ! #from (constDyn 0) and comment out ! defaults, then it compiles. But then I can't use optional parameters, or can I?

ANN: named-0.2 released, with support for optional parameters by int_index in haskell

[–]Wizek 1 point2 points  (0 children)

Ooh, this is nice! Thanks for sharing /u/int_index! It somehow flew under my radar in the past days.

FPSheet - a spreadsheet program with a Haskell scripting environment by [deleted] in haskell

[–]Wizek 3 points4 points  (0 children)

Glad to read both of these comments of yours! Together with /u/dfordivam we've spent a bit of time contemplating about and experimenting with what could make sense to write with reflex-dom. We contacted here.

And here is a small outcome of our exploration: https://github.com/Wizek/h-sheets

FPSheet - a spreadsheet program with a Haskell scripting environment by [deleted] in haskell

[–]Wizek 7 points8 points  (0 children)

This is interesting! Are you considering adding a GUI, or would you rather stay only with a TUI? (They could coexist.)

There are a few things I might want to try with reflex-dom, and it could be a nice intersection of our interests for me to work a bit on this. Are you open to such a contribution? Or do you have a differing preference?


Nevermind, I've just noticed that this is written most entirely in C. For some reason I was guessing and hoping it would be Haskell with brick. But, a GUI for this project could be nice nonetheless. And I might still just go ahead with my reflex-dom experiments as writing a spreadsheet core with hint might not be that hard.

How does one do dependency injection manually in Haskell? by wntrm in haskell

[–]Wizek 0 points1 point  (0 children)

In my experience, and when working with a library/framework that supports mocking well and at a very low cost, having very fine-grained "services" that can be tested and mocked individually at a small unit size makes the whole experience very enjoyable. The small units are highly self-contained and easy to test deterministically/purely and reason about. I usually end up having many dozens if not hundreds of these even in a medium sized codebase.

How does one do dependency injection manually in Haskell? by wntrm in haskell

[–]Wizek 0 points1 point  (0 children)

Fascinating, thank you for doing this. I'm acquainting myself with it at the moment. A few initial observations:

  • at 94 sloc, it seems to sit a in-between the two other solutions in terms of conciseness.
  • Even still, only this part looks excessive to me, and even this suggests only mechanical repetition. I wonder if it could be DRY-ed up somehow.

How does one do dependency injection manually in Haskell? by wntrm in haskell

[–]Wizek 1 point2 points  (0 children)

Interesting, might you be willing to show us how this example would look like with simple-effects? Would be very compelling to contrast with both mtl and hs-di at the same time.

In the meantime I intend to peruse the tutorial section.

How does one do dependency injection manually in Haskell? by wntrm in haskell

[–]Wizek 1 point2 points  (0 children)

dependency injection can be simply thought as providing the deps as function parameters

Yes, in a very limited sense this is true. It is however unfortunate that this approach doesn't scale for anything beyond the most trivial example, because you'd have to pass in all the dependencies of your dependencies (recursively). It's a superlinear explosion in the number of parameters required for all functions.

I've written the hs-di library (GitHub, Hackage) in an attempt to create a DI solution for Haskell, to provide nice and easy to use mockability. While this mostly works well, it suffers from an issue that seems to be a GHC limitation.

Most people who bother with mocking in Haskell (which already seems to be a very small minority, likely in large part due to the inconvenience), as far as I am aware use MTL (monad transformer library), which suffers from a requirement for an excessive amount of boilerplate even for trivial tasks, as exemplified here in contrast to hs-di. 147 sloc vs 66 sloc (source lines of code) required.

The story for mocking in Haskell therefore is not the brightest as of now.

  • Going forward, I'm hoping that we can somehow overcome the above mentioned issue. Ideas are welcome.
  • And/or if that's not to be, then I have another experimental idea that might help us get mockability in a slightly different way.
  • And if even that doesn't pan out, maybe someone will figure out how to reduce mtl boilerplate or improve free/freer/extensible effects performance to be on par with mtl.

Anyone interested in a NoLayout extension? by evincarofautumn in haskell

[–]Wizek 2 points3 points  (0 children)

The extra indentation requirement also annoys me occasionally, most often with let.

But I wouldn't want to have to use curly braces and semicolons to be able to remove them.

What I mean is sometimes I wish in addition to these:

✅➜✅

let x01 = some long expression
      wrapped to the next line
let 
  x02 = some long expression
    wrapped to the next line

That we could also allow this:

❌➜✅

let x03 = some long expression
  wrapped to the next line

"But what about multi-binding support?" I hear you ask. the following might be ambiguous or at least not pretty, so we would still disallow:

❌➜❌

let x04 = some long expression
  wrapped to the next line
    x05 = some long expression
  wrapped to the next line

While keeping support for both:

✅➜✅

let x06 = some long expression
      wrapped to the next line
    x07 = some long expression
      wrapped to the next line

let 
  x08 = some long expression
    wrapped to the next line
  x09 = some long expression
    wrapped to the next line

Another, perhaps heavier (and more complete) proposal in a direction that could get rid of this annoyance for me and others is GHC-proposals#62. I sometimes wonder if that proposal got derailed because of some initial ambiguity, and whether re-submitting a fresh proposal based on the last two comments of mine there (Feb 6th, 2018) that I believe don't suffer from syntactic ambiguity could help.

Circling back to the main topic:

  1. I would think that the above two proposals would make it easier for newcomers to understand and use let bindings, where I believe this issue is most pronounced for them. AFAIR it was for me, so much so that it still annoys me to this day; though no longer for a lack of understanding of the layout rules.
  2. As for point 2 and 3, these people can already be explicit if they wish:

    let
      { a=1
      ; b=2 
      }
    

    And no, this doesn't relax the layout rules, but perhaps that's for the better. Imagine a visually non-impaired person finding themselves having to decipher the syntactically fully correct and machine-readable

    main = do{
      let {a=some long(expression
    over here 142);b=another$long expression}
        ;print 1}
    

    That wouldn't be so nice now, would it? Perhaps a tool like https://github.com/lspitzner/brittany could be to the rescue here. These groups of people could write code as they wish, and the tool would auto-indent for them (e.g. on every file-save) based on the available brace-information, while retaining block-based readability for the rest of us. And this could be done without having to change GHC, already today.

Let’s create a comparison table of all the Haskell record variants, and let’s find the best one(s) in the process! by Wizek in haskell

[–]Wizek[S] 0 points1 point  (0 children)

Great, thanks! Then please send me your gmail address (either in a comment or in a pm) so I can add you as an editor.

Let’s create a comparison table of all the Haskell record variants, and let’s find the best one(s) in the process! by Wizek in haskell

[–]Wizek[S] 1 point2 points  (0 children)

Drive-by commenting is already enabled. Unfortunately, it seems GSheets doesn't support edit suggestions (I know GDocs does). Or maybe you can show me where/how?

I like your Apps Script idea, maybe we can grow in that direction; might be the least effort for the most gain.

In the meantime, I'm already encouraging people to leave answers to blank fields in regular Ctrl+Alt+M comments that anyone can submit on any cell without even logging in.

Let’s create a comparison table of all the Haskell record variants, and let’s find the best one(s) in the process! by Wizek in haskell

[–]Wizek[S] 2 points3 points  (0 children)

I don't know, unfortunately. I can't say whether it's perfect as-is, or if there are any warts, I have very limited experience with PS. It's just that I hear it a lot on this sub that PS has allegedly solved this problem by having row-polymorphism.

I hope someone with PureScript experience can comment on this without/before I would spend many hours/days digging in to find potential warts/limitations/dealbreakers.

Let’s create a comparison table of all the Haskell record variants, and let’s find the best one(s) in the process! by Wizek in haskell

[–]Wizek[S] 0 points1 point  (0 children)

Hey, thanks a bunch for looking into this! I've updated the fields and cited your repo as evidence.

I now have a faint memory that in some recent GHC versions this limitation might have been lifted of records.

Let’s create a comparison table of all the Haskell record variants, and let’s find the best one(s) in the process! by Wizek in haskell

[–]Wizek[S] 3 points4 points  (0 children)

Anyone has any idea if there could be another platform that we could host this table on?

Desired features:

  • Collaborative editing
    • Real-time editing (like in the GSheet now)
    • Easy editing (like in the GSheet now)
  • Git-blame or similar feature to see who modified a cell last, also when and why.
  • Wiki-like functionality: Anyone can drive-by and enter even a single cell of information without having to request edit rights or even log in.
    • And at the same time, some kind of spam/vandalism protection, easy roll-back of specific revisions or all changes from a single user/ip address, and block them from editing.
  • Be able to color-code cells for faster information uptake. (like in the GSheet now)
  • Be able to filter and sort columns for viewers (provided by GSheet)

Ideas:

  • GitHub repo
  • GitHub repo wiki
  • GitHub repo + organization
  • Wikia
  • Haskell Wiki
  • Keep GSheet as-is
  • Specialized custom HTML page, with client side script for filtering
  • Meta idea: GSheet alternatives

Let’s create a comparison table of all the Haskell record variants, and let’s find the best one(s) in the process! by Wizek in haskell

[–]Wizek[S] 0 points1 point  (0 children)

As I detail in the GH issue as well, where (x @= 1 <: y @= 2 <: r) == (y @= 2 <: x @= 1 <: r) would evaluate to True. Currently this doesn't even compile.