Fork me on GitHub
#clojure
<
2019-04-07
>
ahungry04:04:15

quil looks neat - reminds me of SDL - is there anyone out there combining openjfx + quil in some way? (maybe with the new cljfx lib?)

Eric Ervin02:04:28

maybe you can repeat your question in the ghost town that is the #quil channel .

lxsameer15:04:12

hey folks, just out of curiosity, why the indentation on clojure source code is so weird ? for example https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Ref.java

🤪 4
Robert Nikander14:04:37

@lxsameer Maybe the author was traumatized by OOP, and in order to repress the painful memories, indents the code as if the class line does not exist.

hiredman16:04:05

it is the style rich prefers, any in some places other slightly different formatted code has been patched in, and in general rich doesn't like patches that just fiddle with formatting

hiredman16:04:18

I forget the name of the style

lxsameer16:04:06

even gnu style has some indentation

hiredman16:04:54

that is why I said vaguely similar, I forget if it is exactly one of the named styles, or just an idiosyncratic style rich picked up

hiredman16:04:26

maybe more like whitesmith's above it

lxsameer16:04:45

ofcourse it should looks fine to the author

hiredman16:04:04

it is not a modern style, sure

hiredman16:04:46

although, I guess what people usually use these days is basically k&r style which would hardly be called a "modern" style

lxsameer16:04:22

yeah but i never saw a style with no indentation. it just drive the programmer crazy i guess

hiredman16:04:58

Compiler.java is way worse on that front, because of patches with slightly different styles, and sometimes rich will put a block (like an if condition) around some code without re-indenting it, which I guess maybe makes diffs easier to read? I dunno

hiredman16:04:25

I think maybe the compiler even mixes tabs and spaces due to patches

lxsameer16:04:17

hmmm i'm kinda disappointed, i expected much more from clojure in this regard

4
hiredman16:04:00

it is there, it works well

lxsameer16:04:51

yeah , but it discourage other people to contribute or even read the code, and honestly clojure is not doing well in documentation so for some stuff you have to look at the code

hiredman16:04:05

then go write some docs

lxsameer16:04:46

yeah i know, but as far as i talked with people, clojure is not welcoming in regard to documentation specially in source code level

hiredman16:04:56

you are upset that someone did work and made it available to you for free, and you don't like the internals of it?

lxsameer16:04:34

no i'm upset because clojure contribution policy is not friendly enough to people who willing to help

hiredman16:04:49

that is complicated

hiredman16:04:20

rich has different priorities from other people, and it is his party, so other people are unhappy about his decisions

lxsameer16:04:26

i'm reading the code anyway for my own sake, why not to fix it as i go along and even right some comments in the source code for the next guy ( which i common ) but yet ....

lxsameer16:04:28

you know, i'm wondering how other programming languages handle this situation ?

hiredman16:04:10

basically, you say "willing to help" but rich disgrees that help is needed or wanted in that direction (or that he wants to spend time managing the "help"), and that is taken as being hostile to contribution

lxsameer16:04:28

and at the end of the day it is simple, a guy like me make some patches and you as the author merge it if you like it and ask for change if you don't like it

hiredman16:04:47

there is a third option there of course

hiredman16:04:02

just ignore you because I have other things to do

hiredman16:04:21

both of your options make a demand on the time of the author

lxsameer16:04:22

yeah unfortunately that's the current situation

hiredman16:04:35

to merge your work, or engage in dialog with you about it

lxsameer16:04:51

but that's how free/open source software works

hiredman16:04:15

that is complicated

hiredman17:04:46

it is easy to see why you (or I) might prefer one of those two options, but it requires the maintainer of the project to pour even more time in to their project, and be managing contributions instead of developing their project

lxsameer17:04:12

i can see your point, but it's not a new problem

hiredman17:04:27

of course not

lxsameer17:04:31

there are bigger projects that have the same problem.

lxsameer17:04:37

linux kernel for example

lxsameer17:04:02

it's massive but they handle it much better that clojure

lxsameer17:04:22

i guess clojure core team can do a similar thing

lxsameer17:04:43

after all contribution can lead to good things

hiredman17:04:06

the linux kernel actually has companies that employee people entirely to work on it

lxsameer17:04:31

yeah but they way they handle contribution is good

hiredman17:04:54

because they have the resources to devote to it

hiredman17:04:28

clojure is many orders of magnitude smaller, and has, I think no full time resources whatsoever

hiredman17:04:53

maybe one person

hiredman17:04:03

but it isn't rich's job

lxsameer17:04:55

hmmm, it isn't rich's job, but at the same time he is the one that has the final saying on it

lxsameer17:04:04

you can see the problem , right ?

hiredman17:04:33

but you also see how it isn't a problem for rich, right?

lxsameer17:04:53

that's why i'm saying what linux does make sense here

hiredman17:04:26

organizational structure isn't free

lxsameer17:04:51

it does friend. in linux, Linus has the final saying, but there is subsystem who has several leaders who are responsible for managing the contributions and patches

lxsameer17:04:09

clojure can do the same

hiredman17:04:16

linus for example says he trusts most of the subsystem maintainers because he has been working with them for 5-15 years, clojure is 11 years old at this point

hiredman17:04:45

linus also spends most of time still managing those contributions

lxsameer17:04:56

yeah but even now there are people around rich who at least i know they are very involved with clojure

hiredman17:04:26

and linus is, as far as I know, paid to work on that fulltime

hiredman17:04:05

it would be great if rich could work on clojure fulltime

hiredman17:04:46

he did spend maybe one or two years at the start(before it was made public?) working on it fulltime living off of his savings

hiredman17:04:30

which, in my experience, feels terrible. so I completely understand reluctance to be in a similar situation again.

lxsameer17:04:55

i can understand every thing you said

lxsameer17:04:54

but at the end of the day I'm pretty sure community will be helpful here, if he let them.

hiredman17:04:09

but it isn't that simple

hiredman17:04:48

"the community" wants a bigger stake in it, and wants rich to do more work, but the community hasn't bothered to figure out how it is going to pay him

hiredman17:04:44

just figure out the latter part, the former part is nothing, as you say there are plenty of examples, etc to follow there

lxsameer17:04:06

hmm i'm not sure what you meant by "but the community hasn't bothered to figure out how it is going to pay him"

hiredman17:04:42

until then, it doesn't surprise me that when people charge in demanding change at the center nothing happens, but when people go out and build what they want without trying to make it some official project, good things happen (clojuredocs, this slack)

💯 4
hiredman17:04:28

I mean this is an exchange right? you are demanding an awful lot without figuring out first what you are willing to exchang to get it

lxsameer17:04:49

hmmm i don't know about that

hiredman17:04:10

you want something right?

lxsameer17:04:15

I'm not demanding anything, I'm offering

hiredman17:04:31

but you are not happy when your offer isn't taken?

lxsameer17:04:41

the source code has a problem, or somebody else has a good idea to add to clojure,

lxsameer17:04:01

it's not a demand though

hiredman17:04:12

but rich disagrees that it is a problem or that it is a good idea, or doesn't have the time to review it so ignores it

4
keymone17:04:13

what could be the reason for httpkit to throw timeout exception on a perfectly healthy request?

keymone17:04:30

curl works just fine

hiredman17:04:59

people basically don't make offers like a queue though

hiredman17:04:09

if you offer to a queue, it either takes it or it doesn't

hiredman17:04:29

people make an "offer" and it is a demand on the attention of the person the offer is being made to

4
hiredman17:04:48

and people get offended when their "offer" is summarily rejected

hiredman17:04:06

so when people make an "offer" it is clearly more of a "demand"

hiredman17:04:34

and then their "offer" is summarily rejected, they want the process to change in some way

lxsameer17:04:14

hmmm, it doesn't seem right

hiredman17:04:55

basically what it comes down to is you want the process to change, rich is comfortable with the current process, and you won't offer him anything to induce him to change it

lxsameer17:04:19

for example, i can read the code, after some struggles to understand it, i can just do my thing and forget about it

pithyless17:04:21

💯 ☝️to everything @hiredman said

pithyless17:04:25

> It’s complicated

pithyless17:04:33

@hiredman also brings up another good point @lxsameer -> if you see a certain benefit to changing the indentation / docs, why not make a separate project that will auto-indent Clojure core (ala gofmt)? That way, anybody interested can use your new tool, while it in no way breaks existing JIRA patches, etc. and doesn’t take up mental/time bandwidth of people who are not concerned about the indentation.

lxsameer17:04:26

I can ignore it but i can spend some time on it ( for free and without any demand ) and make offer some improvements.

hiredman17:04:53

I think some kind of annotated source for clojure would be really great, I have a branch on my fork of the clojure repo on github where I started something like that, many years ago, but just didn't have the time/attention/whatever to finish it and keep it up

hiredman17:04:16

improvements from your point of view

lxsameer17:04:47

yes, but i'm not going to merge it you know, like many other open sources projects, people can review it

lxsameer17:04:51

it's so simple

lxsameer17:04:23

clojure is not a special case or anything, it's not the first FOSS project facing this problem nor the last one

lxsameer17:04:48

but there is a point to learn from history of other projects

lxsameer17:04:55

how they handled this case ?

hiredman17:04:27

that is your perspective on it though, you see it has some kind of natural progression of a project

lxsameer17:04:44

@pithyless you have a point, but it doesn't summarized only in indentation

hiredman17:04:29

or keep an up to date branch with lots of comments that is so valuable that everyone references it all the time

lxsameer17:04:46

yeah i don't think me adding code to my own fork without review would be valuable for others to refer to

hiredman17:04:23

but you are willing to ask rich to maintain your comments

hiredman17:04:42

that is what your pr would be

lxsameer17:04:48

anyone who knows about clojure or an specific subject can review them

Alex Miller (Clojure team)17:04:58

Let me make it really easy. This is not something that Rich or I want to spend time on, including spending time to explain or debate why we don’t want to spend time on it. We realize this probably makes some people unhappy.

lxsameer17:04:27

good use of "end of discussion" 😆 (joking)

Alex Miller (Clojure team)17:04:48

Feel free to discuss all you like :)

hiredman17:04:57

I think it is to some degree very telling, that none of the proposals are like "hey, rich laid a gold egg in clojure, how do we get him nice and happy and continuing to give us more eggs" and are all like "that goose that laid the golden egg is in the way of me doing what I want, how do we change the process so I can do what I want"

hiredman17:04:30

we can keep discussing it, because, for example, this slack isn't run by rich or alex

hiredman17:04:50

someone in the clojure community thought it would be neat and made it

lxsameer17:04:25

yeah but there is no point discussing it

lxsameer17:04:43

contribution is something that people in charge have to care about it to begin with

lxsameer17:04:59

us talking, wouldn't change anything

hiredman17:04:06

in charge of what?

lxsameer17:04:15

source code and clojure in general

hiredman17:04:12

clojuredocs, for example was started and run for a long time without any connection with rich or "the people in charge"

hiredman17:04:32

(it may still be, I am not sure)

lxsameer17:04:38

hmmm what can i say, clojure "project" is not in any way special in compare to other FOSS projects. I'm pretty sure other projects faced the same issue. We ( i don't think i can say we anymore ) can either learn from them and open the door to other people who wants to help or can keep going like this and hope for the best.

lxsameer17:04:11

I hope that I'm wrong and the current workflow is the best way to do it

hiredman17:04:44

No project starts that way, so the question is, at what point did all the projects you are suggesting as examples change to allow for more delegation, and I would be shocked if that doesn't coincide with the fortunes of the original creator becoming more secure (via sponsorship, or patronage)

keymone17:04:22

i feel out of place with my down to earth questions, but here’s another one: anybody had this problem when <!! while blocked would prevent the shell from responding to os sugnals, like ^C?

lxsameer17:04:25

i don't know what to say anymore friend. you're putting a question mark on top of lots of FOSS software out there

hiredman17:04:14

no, I am just suggesting that if you want to see change the thing to work on is some way to pay rich and others to work on clojure fulltime, not lobbying them to change their process without offering anything in return

hiredman17:04:55

@keymone the behavior will depend a lot on the repl you are using

hiredman17:04:09

for example nrepl repls are typically split in to client and server jvms, where you code is actually execute on the server jvm

lxsameer17:04:17

ok so you're saying that i should spend my time improving the code base, and pay the core members to consider my contribution ?

hiredman17:04:24

so ^C on the client jvm may not do what you want

keymone17:04:39

it’s lein repl in a shell on macos

Lennart Buit18:04:29

Lein repl uses nREPl, so that should be interruptible

keymone17:04:59

pretty default setup i think

hiredman17:04:03

@lxsameer again, improving in your point of view

hiredman17:04:29

you've already made the judgment that your changes are good, so if they are not considered or not well received something is wrong

lxsameer17:04:44

no, i didn't say that

lxsameer17:04:04

as i mentioned before "reviewing the changes" is really important

hiredman17:04:06

you have used the word improve or improvement over and over again

lxsameer17:04:04

hmmmm i don't know any other word to use in this context

hiredman17:04:22

you are have a set of changes you would like someone to spend time reviewing and determining if they represent an improvement, and if the improvement covers the cost of maintenance

hiredman18:04:01

that is review is valuable work, for example it is part of the job I am paid to do

lxsameer18:04:13

hmmm you're missing the point of FOSS

hiredman18:04:38

is the point of foss that when you do work for free you get to demand that other people do work for free?

lxsameer18:04:59

did i as for money ?

hiredman18:04:09

I didn't say you did

lxsameer18:04:10

or did anybody asked anything in return ?

hiredman18:04:31

I said you did work for free (your set of changes) and you are demanding that others do work for free (review those changes)

keymone18:04:47

speaking of code improvements and reviewing - linus had stopped looking at other people’s code directly long time ago, he would only pull updates from few trusted top-level maintainers. there’s just too many “improvements” everybody would like to suggest and only 24 hours in a day.

hiredman18:04:20

I would suggest you are missing the point of f/oss, in that the entire point is to give your the source to empower you to make the changes you want, it says nothing about forcing upstream to take in your changes

hiredman18:04:28

to quote the fsf's definition "“Free software” means software that respects users' freedom and community. Roughly, it means that the users have the freedom to run, copy, distribute, study, change and improve the software."

lxsameer18:04:20

hmmm we have a different perspective then

hiredman18:04:14

if your perspective is at odds with the fsf's view on the definition of free software then I wonder where it comes from

lxsameer18:04:50

i believe in free software and everything in fact i'm a gnu contributor. but the way clojure source code is going forward is far from community base development. you're saying rich's time is important and other people have to pay him to review their changes which are made out of the desire to help

hiredman18:04:37

I am not say they have to, I am saying your perspective is completely ignoring the fact that he is a finite person and needs to work to live, and you are make demands on his time without in turn offering anything to him

lxsameer18:04:28

i'm aware of that, what i'm saying is "it's not have to be like it"

hiredman18:04:16

and I am saying that change is also something that takes review and work to achieve, and you are asking for it without providing any inducements

hiredman18:04:48

(changes to code, and changes to organization)

hiredman18:04:25

everyone wants to suggest changes, no one wants to provide a means to support those changes

lxsameer18:04:39

what type of support ? financial ?

hiredman18:04:47

basically, yes

lxsameer18:04:08

that's where we are different

lxsameer18:04:44

If i had a company that uses clojure , I wouldn't hesitate to sponsor clojure

lxsameer18:04:48

in some degree

hiredman18:04:27

like, it is easy to say, "hey linux has this structure, we shuld copy it" but no one has said "hey, the X key figures in linux development are supported in ways Z, W, and Y, how can we do that for the X key clojure figures so clojure can have a process like linux's"

lxsameer18:04:29

but you shouldn't expect people to pay money to the author in return for considering some patches

hiredman18:04:52

why not though?

lxsameer18:04:51

because the fact that i spend my free time working on clojure to help it grow ( even if i'm the only one thinking like this ) is enough. I have to live as well.

lxsameer18:04:08

i want to help others by any mean.

hiredman18:04:34

rich has already, as discussed, spent years of doing that fulltime, and continues to do that (but I guess not fulltime)

lxsameer18:04:43

if every FOSS project start charging thier contributors there would not be any FOSS project left anymore

hiredman18:04:54

so why can you demand he give more of his free time to review your change?

lxsameer18:04:57

what i'm saying is that like other project the author can trust some people and let them deal with these kind of stuff. or even

lxsameer18:04:21

like many other projects a third person can review the change first and leave his review

lxsameer18:04:33

it's not have to be just one person

hiredman18:04:36

what I am saying is you are doing the same thing again, just at another level removed

hiredman18:04:11

e.g. from the code level to the social/org level

lxsameer18:04:00

anyway, we were discussing something that is not going to change.

andy.fingerhut14:04:51

If you wanted to start a repository that was a fork of the Clojure source code, retaining its original license, and added comments and reformatted code, and added documentation, you may be able to find others interested in answering questions or providing review comments, or even contributing to such a repository. It seems unlikely that Rich Hickey would be one of the people willing to spend time on that project, though.

andy.fingerhut14:04:13

There are other people besides Rich who know at least parts of that implementation quite well.

lxsameer14:04:14

Yeah i wanted to do that but kinda think that the problem is in people's view of the whole thing

andy.fingerhut08:04:31

There was a project years back where someone did such a thing, and in particular they were trying to create a "literate programming" version of the Clojure source code. They made some progress, and their work is probably still available in the public somewhere, but it is likely for a version of Clojure that is not the most recent, e.g. maybe the part that was done is up to date for Clojure 1.4 or so. I may be misunderstanding what your goal is, but realize that detailed documentation of such a code base is many, many person-months of effort. Not everyone may share your desire to spend such time on it.

andy.fingerhut08:04:29

Here is a link to the one I have heard about, last updated in 2012: https://github.com/daly/literateclojure You can search for Tim Daly's name on the Clojure Google group for messages from around that time for some discussion of it.

lxsameer09:04:32

Thanks man. But it is not going to work. The vision of people is wrong about FOSS that's why it is not going to work.

sarna18:04:40

hey, does Clojure have a big boring web framework yet? something like Django or Rails

lxsameer19:04:24

as far as i know luminus is the closest to what you're asking for

sarna19:04:51

thanks, I'll check it out :)

Alex Miller (Clojure team)19:04:06

Coast is a new thing like that

deleted21:04:50

something that prints the representation of a value and then also returns that value, so you can inject it in chains of calls to inspect values

Robert Nikander14:04:00

I think the tools.logging library has a functions like that called spy and spyf. @U8QBZBHGD

lilactown21:04:32

I write it in almost every project.

lilactown21:04:39

I wish that’s what tap> did

lilactown21:04:12

i usually just define it kind of ad-hoc since I usually only need it while debugging

lilactown21:04:56

in one of my projects I have it in a common test.utils ns because the test runner rarely prints helpful things, so I use it for finer-grained debugging in my tests

Lennart Buit22:04:05

Is that what you are looking for ^^?