Recent Forum Posts
From categories:
page 1123...next »
Lame-R (guest) 25 May 2017 22:28
in discussion Hidden / Per page discussions » On printing money

You loan me 5 coins you're now out those 5 coins until I pay them back somehow, plus the 1 coin interest we agreed upon. No money was created. Now if somebody comes along and offers to buy that "IOU" note I gave you for 6 coins you can have your money back and let me owe them. Still no money was createdthey're out 6 coins but expecting that back from me any day now. It's not until you get into fractional-reserve lending that money is created. Then it's essentially virtual moneya tangible artifact of an intangible concept: trust. That's ok, though, because the money supply shouldn't be finite—not only is population growing, but so is the value that everybody creates. The problem occurs when it gets out of hand.

At least that's how it all seems to my mind.

by Lame-R (guest), 25 May 2017 22:28

If we always tell that people will not learn language A , we will never make progress.

It would be better to build such a tool but then provide examples of more advanced languages that have already solved these problems.

Some will use the tool, others will learn a better language which will be much better in the end.

by Apostolis (guest), 11 May 2017 10:57

Resembles miniKahren[1] and Clojure/core.logic[2] quite a lot.

[1] http://minikanren.org/
[2] https://clojure.github.io/core.logic/

by Vag (guest), 02 May 2017 16:21

I like actually like prolog, I wish that paradigm was used more and I think it makes sense in this setting. Fortunately you still get some prolog-like benefits in JS with inheritance and the getter syntax. Prolog style input with JSON as an output might be accessible though.

by ash (guest), 01 May 2017 14:28
by martin_sustrikmartin_sustrik, 01 May 2017 10:34

You have a typo: "to explore the machanics ". Feel free to delete this comment once fixed.

by Alvaro (guest), 01 May 2017 09:58

witheve.com, seems to do cartisian/relational programming Isn't this essentialy what Eve is?

by Zubair (guest), 01 May 2017 08:41

Here's the testsuite example rewritten to SQL. I don't know how to model the inheritance relationship though:

CREATE TEMP VIEW boxes AS
SELECT 'box1' AS hostname, 'linux' AS os, 'x86-64' AS arch, 8 AS ram UNION
SELECT 'box2', 'freebsd', 'arm', 16 UNION
SELECT 'box3', 'windows', 'x86-64', 4 UNION
SELECT 'box4', 'illumos', 'sparc', 4;

CREATE TEMP VIEW compilers AS
SELECT 'gcc' AS binary, '4.8.4' AS version, '-o' AS output_option UNION
SELECT 'clang', '3.4.1', '-o' UNION
SELECT 'msvc', '15.00.30729.01', '/Fe';

CREATE TEMP VIEW tests AS
SELECT 'frobnicate' AS name, 'frbonicate.c' AS sources UNION
SELECT 'loadtest', 'loadtest.c helpers.c' UNION
SELECT 'end2end', 'end2end.c helpers.c';

CREATE TEMP view testsuite AS
SELECT *, compilers.binary || ' ' || tests.sources || ' ' ||
    compilers.output_option || ' ' || tests.name AS cmdline
FROM boxes, compilers, tests
WHERE NOT(tests.name = 'loadtest' AND boxes.ram < 8);

SELECT * FROM testsuite;
by martin_sustrikmartin_sustrik, 01 May 2017 08:25

Ack. I've been thinking a lot about Prolog while contemplating the problem. But in the end, I think, most programmers would just not use Prolog (too exotic) while they may be OK with JavaScript.

by martin_sustrikmartin_sustrik, 01 May 2017 05:46

You can to similar things in PostgreSQL, which has the notion of literal tables (not standard SQL though). Instead of declaring variables you can create views. Nested types and inheritance may prove problematic to implement in SQL though.

But all it all, I think you are right: What I called cartesian programming is more or less relational programming, albeit with the focus on generating data rather than querying data.

Here's the code in this article translated to SQL:

CREATE TEMP VIEW datacenters AS
SELECT 'newyork' AS name, 7 AS webservers UNION
SELECT 'london', 4 UNION
SELECT 'tokyo' , 2;

CREATE TEMP VIEW plan AS
SELECT *, webservers * 10 AS backends
FROM datacenters;

CREATE TEMP VIEW webservers AS
SELECT name AS datacenter, '/usr/bin/webserver' AS cmdline, webservers AS instances 
FROM plan;

CREATE TEMP VIEW backends AS
SELECT name AS datacenter, '/usr/bin/webserver' AS cmdline, backends AS instances 
FROM plan;

SELECT * FROM backends;

The clarity of expression is lacking, but, algorith-wise it does the same thing.

by martin_sustrikmartin_sustrik, 01 May 2017 05:30

So what's the Baconian paradigm that complements this?

by owen (guest), 01 May 2017 00:43

The concept seems closely related to the “constraint programming” paradigm — more specifically, with finite domains. You declare a set of variables, each one taking its value in some finite domain. A program in this paradigm describes a set of assignments of these variables. It uses constraints to do this. If there is no constraint, then the “output” of the program is the whole Cartesian product. Constraints eliminate some assignments: by declaring “x == y * 2’, you're eliminating all assignments in which x and y do not satisfy the equality.

The CP frameworks I used did not feature struct-like objects as in your examples, but I suppose there are some that do. I'm not saying it's exactly equivalent to what you described in this article, but there are interesting similarities, and I think it's worth mentioning.

by Alexandre Niveau (guest), 30 Apr 2017 15:57

Does SQL match your notion of Cartesian paradigm? It's declarative (not procedural or functional), and works over sets. The "larger scope" would be the whole set of data; the "smaller scopes" would be projections, selections, etc.

by B. K. Oxley (binkley) (guest), 30 Apr 2017 15:42
ixy (guest) 27 Apr 2017 05:47
in discussion Hidden / Per page discussions » Why is my TCP not reliable (expert edition)

Since the client has not received an ACK for its packet, shouldn't it wait for it anyway? After all, the FIN and ACK could always have been reordered in transit, so the ACK could still be coming.

by ixy (guest), 27 Apr 2017 05:47
Sean Conner (guest) 18 Apr 2017 05:06
in discussion Hidden / Per page discussions » Why is my TCP not reliable (expert edition)

Would using two descriptors for a binary stream (TCP) work, as mentioned in https://cr.yp.to/tcpip/twofd.html ?

by Sean Conner (guest), 18 Apr 2017 05:06

Because FIN means that server has closed the server->client half of the connections. No more bytes are going to arrive.

by martin_sustrikmartin_sustrik, 14 Apr 2017 06:11
Dan (guest) 13 Apr 2017 13:37
in discussion Hidden / Per page discussions » Few thoughts on current political situation

I noticed this blog talks about technology a lot, so let's phrase this in technology terms. How about running society in a fully distributed fashion? There's about 477 million people in North America. It's like a 477M core CPU!

We can distribute to all those CPU cores all sorts of tasks:
1. What should I eat? (get rid of farm subsidies.)
2. How should I educate my kids? (get rid of local/state/federal taxes for education.)
3. Where do I find the funds to provide housing? (get rid of HUD, Fannie Mae, tax breaks for mortgage interest.)
4. Etc.

By the time you eliminate the central command and control megalomaniac OS (taxes and regulation) there will be so many resources available we'll have much more prosperity as a whole.

Of course, some CPUs will screw up. That's what private charity is for (another massively distributed system that also does not need a central command and control system.)

https://en.wikipedia.org/wiki/Minarchism

by Dan (guest), 13 Apr 2017 13:37
Rajiv Ram V (guest) 12 Apr 2017 19:53
in discussion Hidden / Per page discussions » Why is my TCP not reliable (expert edition)

"But look at the client now: It's waiting for responses and considers incoming FIN to mean "no more responses". But, actually, there were responses! It was just the server was unable to send them."
How can the client assume that there were "no more responses" when it hasn't gotten an ACK back?

by Rajiv Ram V (guest), 12 Apr 2017 19:53
Norswap (guest) 11 Apr 2017 10:01
in discussion Hidden / Per page discussions » Why is my TCP not reliable (expert edition)

Let fools complain.

It seems obvious you need some form of application level acknowledgement: receiving data is no guarantee it will be processed, for a multitude of reasons (which may have nothing to do with networking). Because one can pull the plug on a server, does it means TCP is unreliable? If your message queue is dead and all packets go round and round in a circular buffer?

The protocol is well-named: it ensures reliable transmission. If you get an ack, well the server has the bits on it somehow, whatever happens they haven't been lost in transit. At this point the important thing to ensure is that either the packets hit the application OR the connection is shutdown (orderly or abruptly). In other words, what we really want is (1) avoid is somehow losing SOME of the packets between the NIC and the application, (2) if packets never hit the application, the connection should probably die at some point (although even this can be argued).

People that don't understand this shouldn't be allowed to touch TCP, and much less listened to.

This probably sounded way too much like a lecture — force of habit — but I realize you're probably not the one I need to convince.

The thing is, I believe just adding app-layer acks is as clean and conceptually simple as it gets. Do you really think muddling with the boundaries will help, or is it just addressing complaints?

by Norswap (guest), 11 Apr 2017 10:01

So what do you propose? Sure, server can drop packets after it called shutdown(). However, if it does so and sends FIN to the client, client will believe the packets were processed and will complain that "TCP is not reliable".

by martin_sustrikmartin_sustrik, 08 Apr 2017 03:37
page 1123...next »
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License