pezi_pink
2019-4-19 10:53:39

hi all, finally wrote something about my wip language Fairylog, for programming FPGAs http://pinksquirrellabs.com/blog/2019/04/17/fairylog/


jim.lee
2019-4-19 12:56:02

@jim.lee has joined the channel


samth
2019-4-19 13:02:07

@pezi_pink very cool!


notjack
2019-4-19 16:45:29

Philosophy and terminology question: if modules can enter contacts with each other, does that mean modules have rights? If there was a “software module bill of rights” what would you expect it to contain?


samdphillips
2019-4-19 17:04:08

@notjack have you seen this? https://www.youtube.com/watch?v=LIEX3tUliHw


samdphillips
2019-4-19 17:04:23

(maybe related content)


notjack
2019-4-19 17:12:25

@samdphillips Yes! It’s what originally got me thinking about whether or not the term “bill of rights” makes sense for more kinds of code than just macro implementations


samdphillips
2019-4-19 17:18:03

I think that at a base level provides give the right to access a name. And with contracts (and blame) modules have the right that those names will deal with certain values.


samdphillips
2019-4-19 17:18:52

(or rather “access a value with a specific name”)


alexknauth
2019-4-19 17:27:47
  1. Free speech: a module has the right to provide bindings with data, print stuff, open gui windows, etc. when run.
  2. Soldiers need consent before staying in someone’s house: a module has the right to guard its functions with contracts that say (not/c soldier?).
  3. Unreasonable search and seizure: Encapsulation and being able to hide information from inspectors? For this to work no one should be able to get a root-inspector unless they have a warrant with probable cause, so this right isn’t being protected completely.
  4. Due-process, no double-jeopordy, no forced self-incrimination, etc: When a contract blames a module, it must have the correct reasons, it can’t just assign blame without a proper trial. A contract can’t blame a module twice for the same contract-value instance. A module can’t be forced to blame itself for a contract it didn’t invoke. This right is violated all the time. The contract form just takes positive and negative blame as arguments and trusts the programer, the module being blamed doesn’t have any say in that.
  5. Trial, impartial jury, right to legal counsel and witnesses in your favor: When a contract blames a module it has a right to a trial with legal counsel to defend it? When a contract blames a module there is no trial, the programmer just assumes it’s guilty. This right is also violated all the time. 7,8. um this analogy is starting to break down.
  6. Don’t misinterpret enumurations.
  7. Powers not delegated to the federal government or prohibited by it, are given to the states or the people: I don’t know how this would apply to modules or contracts.

notjack
2019-4-19 17:36:44

Clarifications: in this context, “software module” does not necessarily mean “Racket module”. Functions can be modules, as well as Java classes, command line programs, web services, virtual machine images, and linkable object code files. Also, a software bill of rights doesn’t have to map one-to-one (or at all) to the US bill of rights (and it probably shouldn’t).


alexknauth
2019-4-19 17:37:48

But reflection systems that prevent proper encapsulation are still a violation of the module’s rights.


notjack
2019-4-19 17:47:30

I think so, yes. I think “right to privacy” is a reasonable demand


notjack
2019-4-19 17:48:33

Meaning the right for a module to hide information from another module if it is not relevant to the contract between them


jjwiseman
2019-4-19 19:17:06

@greg thanks for the logging config pointer, i’ll check that out.


greg
2019-4-19 19:21:35

@notjack Hobbes might argue that, beneath the veneer of social contracts lurks a state of nature imposed by the generational garbage collector, in which the lifetime of objects ought to be solitary, poor, nasty, brutish, and short.


notjack
2019-4-19 19:39:37

Alas I don’t know enough about to Thomas Hobbes to properly appreciate that joke. I just know he was a philosopher and one of the two namesakes of my favorite comic strip.


notjack
2019-4-19 19:40:32

Oh right, you’re a lawyer! Perfect!


greg
2019-4-19 19:42:49

It’s a barely coherent joke, anyway. ¯_(ツ)_/¯


notjack
2019-4-19 19:44:03

To me (a US-centric non-lawyer) those do sound like separate notions, and it sounds like a useful distinction


notjack
2019-4-19 19:49:09

In the context of software, I’d associate the first with contacts between two parties of similar authority, like module-to-module or server-to-server. The second sounds kind of like agreements between different levels of authority like module-to-programming-language or server-to-hypervisor


notjack
2019-4-19 19:49:44

That’s fine, sometimes all you need is a vague direction :p


tgrelsson
2019-4-19 20:22:16

@tgrelsson has joined the channel


notjack
2019-4-19 20:40:13

Not saying I’m actually going to, but if I wrote a scribble doc about this would you want to read it?


jesse
2019-4-20 06:26:05

I can’t seem to find a way to attach contracts to parameters. Imagine I’d like a parameter, current-characters, to be such that (current-characters) is either #f or a list of char? values. I’d like (parameterize ([current-characters “haha!”]) …) to raise a contract violation. I don’t think parameterize works like that, but I’d imagine that there’s something that would. I can write my own thing, but perhaps I’m overseeing something simple here.



jesse
2019-4-20 06:28:06

oh. d’oh. yes, that’s what I have in mind. thanks!