Recent Forum Posts
From categories:
page 1123...next »
John Freeman (guest) 09 Apr 2019 14:36
in discussion Hidden / Per page discussions » Select Statement Considered Harmful

Two problems with your argument against select for timeouts:

1. Separation of concerns. When I'm writing code, I don't want to be thinking "oh I need to remember to add a timeout parameter to every function." I want to handle timeouts orthogonally to everything else.

2. Composition. If I want to compose N sub-operations into one operation governed by a single timeout, then without select I must record the running time of every sub-operation, subtract it from the time remaining, and feed that as the timeout to the next sub-operation. It's onerous and causes drift in the timeout that scales with the number of sub-operations.

by John Freeman (guest), 09 Apr 2019 14:36
karim_manaouil (guest) 21 Mar 2019 13:17
in discussion Hidden / Per page discussions » Advanced metaprogramming in C

That's beautifully done. My mind had too much fun reading this. Thanks.

by karim_manaouil (guest), 21 Mar 2019 13:17
by Dave (guest), 16 Mar 2019 12:34
Stefan (guest) 12 Mar 2019 06:41
in discussion Hidden / Per page discussions » Muqaata'a by Fahad Himsi (I.)

Interesting idea, I’m looking forward for part 2!

by Stefan (guest), 12 Mar 2019 06:41

Oh, I am sorry. It's just a mystification a la Borges. (Was it Borges who said: "Why write a book if you can write a review instead"?) Anyways, if you found it interesting, I am plannig to write part II. of the review.

by martin_sustrikmartin_sustrik, 11 Mar 2019 21:12
Max (guest) 11 Mar 2019 17:29
in discussion Hidden / Per page discussions » What Can Philosophers Learn from Programmers?

"All the other vehicles of mathematical rigor are secondary [to definitions], even that of rigorous proof." - Yuri Manin, see, for example, a discussion here.

by Max (guest), 11 Mar 2019 17:29
Stefan (guest) 11 Mar 2019 17:11
in discussion Hidden / Per page discussions » Muqaata'a by Fahad Himsi (I.)

I would like to read Muqaata'a book, do you know where I can get it? Thank you, Stefan

by Stefan (guest), 11 Mar 2019 17:11

As for ribosome/tiles comparison, the crucial difference is that ribosome doesn't provide symbolic names for blocks of code. Each line of the generator can thus produce exactly one line of output that goes straight to the output file and that's it. With tiles, a block of code is a datatype and can be thus stored in a variable. Obviously, you can also have many variables and combine them in any way you see fit. You can write them to different files, combine them, store them to database, do transformations on them etc.

I've looked at cgen and notices that it was inspired by Pieter's writing on model-oriented programming. We've used to worked together on a fairly large project that was almost entirely code generated (OpenAMQ). The takeaway from that was that code generation is fun to write but hassle to read. Consequently, the code is virtually dead because no one wants to touch it.

That being said, sometimes there's just no other option than to generate code. E.g. when you want to do generic programming in Go. It's a tough problem.

by martin_sustrikmartin_sustrik, 10 Mar 2019 07:36
Matthew (guest) 09 Mar 2019 08:16
in discussion Hidden / Per page discussions » Programmatic Code Generation: Composability

I actually found your ribosome library to be pretty nice for generating code, and it’s also composable in surprising ways. I need to actually play around with Tiles but on first glance it seems harder to read and looks a lot more like straight text manipulation than ribosome or other template-based solutions.

If you’re curious, I wrote a C code generator with ribosome just for fun that you can find here (and I’d love to hear your thoughts on it, though perhaps via email since that’s a bit off-topic): https://github.com/saltzm/cgen

by Matthew (guest), 09 Mar 2019 08:16
nanjjnanjj 07 Mar 2019 02:34
in discussion Hidden / Per page discussions » Bus Messaging Pattern

in your pattern, only p1 connects directly to p2, so p2 hello, p1 heard.

you can try: p1, p2, p3 listen, p1 dial p2, p2 dial p3, p3 dial p1. so anyone send, the other two receive.

If you using pubsub, say p1 pub, p2, p3 sub. Only p1 can send, p2 and p3 can receive.

by nanjjnanjj, 07 Mar 2019 02:34
nanjjnanjj 05 Mar 2019 17:36
in discussion Hidden / Per page discussions » The Birch

For Orlando nightclub shooting?

by nanjjnanjj, 05 Mar 2019 17:36
Martin Vahi (guest) 25 Feb 2019 21:23
in discussion Hidden / Per page discussions » Soviet-era Jokes, Common Knowledge, Irony

The way I understand, the ~2%…3% of the population is the active part that does something at all. That 3% is then divided between different sides: some form the Regime, some form the dissidents, etc. Another sociological figure that I do not know any causal explanation for is that supposedly social movements require about 100k participants to take off, regardless of what % that 100k forms from the whole population.

I do not know, if it is true, but the 100k "group size" looks very suspiciously the same that supposedly is the "rough minimum" of a population that has to survive a plague to regrow the population. I suspect that in the case of plague/earthquake/meteor_strike survivors the population size of 100k might have something to do with genetic diversity and some hard limits are the time that it takes for a female to go through pregnancy and recover from giving birth. Add to that the various other factors like how much food can a cave man bring home/cave while his female sex partner is at least partly occupied with children and other issues like being slow with a big belly or vomiting due to pregnancy.

The 3% part I know from practice. The version 1.0 of the Estonian Green party (I haven't been involved with that for a long time and probably never will) had about 1600 members and about 40 people formed the core that had the inner-party fights/debates/confrontations (among each other) and those 40 people also did most of the "good" and "bad" deeds. That's ~2.5%<3%

by Martin Vahi (guest), 25 Feb 2019 21:23
Martin Vahi (guest) 25 Feb 2019 20:41
in discussion Hidden / Per page discussions » Confessions of an Abstraction Hater

One of the arguments of the Linked Editor at the paper was that constructing proper abstractions requires thinking things trough and thinking things trough takes time and if the Linked Editor allows to avoid creating a proper abstraction, the time that it would take to construct the proper abstraction could be saved. Honestly, at the time of writing this comment here I sincerely HATE THAT APPROACH on the IDEOLOGICAL BASES: having a goal of thinking things through and designing things thoroughly WITHOUT USELESS BLOAT THAT CAN BE OPTIMIZED OUT is a matter of professional honor for me and I really do NOT want to have anything to do with colleagues or code, where sloppiness is the norm, much less if sloppiness is even a "company policy".

I also see a fundamental flaw in that "Linked Editing" approach. Namely, meaning depends on a context and one version of the cloned/multiplied function might fit to all places, where the clones are used, but the edited, next, version might be OK for one client-code region, but NOT OK for some other client-code/dependent_code region. To avoid introducing that flaw the person using the Linked Editor still has to analyse the different client-code regions that use the different linked-editable-function-clone instances. That might eliminate the time savings that the Lined Editor promised.

On the other hand, I do understand that for runtime_speed or modularization reasons duplication might be sometimes needed even after thorough thinking and careful consideration. In that case one GUI-less option might be to have the project build system incorporate a code generation step, where the "code generation" is a plain copying of function text from one central copy to the "blanks" where the clones are suppose to be. The content of the "blanks" should be overwritten every time the "code generation" build step is run. I even have a Ruby command-line tool that can be used for that(among other things): Renessaator (under BSD license):

https://github.com/martinvahi/mmmv_devel_tools/tree/master/src/mmmv_devel_tools/renessaator

Thank You for reading my comment.

by Martin Vahi (guest), 25 Feb 2019 20:41
Henk (guest) 24 Feb 2019 16:39
in discussion Hidden / Per page discussions » The Cost of Abstraction

I think it should be the other way around actually. If there's social consensus about something, this warrants an abstraction. Even if this makes code technically more complicated. Maintainers then know where to start analysis when there's a bug, and new features tie in more easily. I wish they had done that with sql, html, javascript, etc. rather than putting everything into a string. I cannot even imagine the cost of all the injection vulnerabilities resulting from -not- creating an abstraction for all those things.

by Henk (guest), 24 Feb 2019 16:39
coldtea (guest) 24 Feb 2019 11:54
in discussion Hidden / Per page discussions » The Cost of Abstraction

If function specification is completely defined with it's type and validated by a compiler, then this cost of abstractions goes away. Coq, Idris, Agda and, to a bit smaller degree, Haskell have strong enough type systems to avoid this cost in majority of cases.

So, the cost of abstractions goes away for languages almost nobody uses, and the 99% of programmers wont ever touch.

Isn't that like saying, "the inner city violence problem can be solved by moving to Tokyo which has almost no violent crime"? Sure, but how's that a solution that the average person can apply?

by coldtea (guest), 24 Feb 2019 11:54

That sounds pretty similar, especially the @* operator. Thanks for the reference!

by martin_sustrikmartin_sustrik, 23 Feb 2019 07:01
Brian Oxley (guest) 22 Feb 2019 01:46
in discussion Hidden / Per page discussions » Tiles: Report on Programmatic Code Generation

What do you think of Perl forms?

https://perldoc.perl.org/perlform.html

by Brian Oxley (guest), 22 Feb 2019 01:46
sasi (guest) 21 Feb 2019 06:33
in discussion Hidden / Per page discussions » Tiles: Report on Programmatic Code Generation

I want to achieve functionality of creating report definition file (trdx) programmatically and then display into HTML5 page. …

https://www.besanttechnologies.com/training-courses/software-testing-training/selenium-training-institute-in-bangalore

by sasi (guest), 21 Feb 2019 06:33
Nathaniel J. Smith (guest) 16 Feb 2019 13:20
in discussion Hidden / Per page discussions » Graceful Shutdown

I posted a reply on the forum: https://trio.discourse.group/t/graceful-shutdown/93/5

by Nathaniel J. Smith (guest), 16 Feb 2019 13:20
Nathaniel J. Smith (guest) 09 Feb 2019 02:10
in discussion Hidden / Per page discussions » Two Approaches to Structured Concurrency

I'll set up a mailing list for a cross-language discussion of the topic and see whether it gets any traction.

Heh, funny you should say… I actually just set this up, and the reason I came back to your blog now was to figure out how to invite you to join :-). (I'm enjoying these discussions in the comments, but not getting notified when you reply is brutal for carrying on a conversation…)

Actually instead of a mailing list, I made a subforum on Trio's new Discourse forum: https://trio.discourse.group/c/structured-concurrency

So basically a mailing list, except with markdown support and support for lots of different forms of notification (including pure email workflows if that's what you're into). What do you think?

by Nathaniel J. Smith (guest), 09 Feb 2019 02:10
page 1123...next »
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License