« first day (1370 days earlier)      last day (896 days later) » 

6:48 AM
@IFcoltransG My code is highly readable and does not require comments
jk I don’t even know how most of it works anymore
 
7:15 AM
@IFcoltransG Looks like you’re new to CodeGolf.SE, right?
 
I've lurked for a while, but yes.
 
Welcome then
 
^
Why did you stop lurking then? :p
 
I had things to contribute.
I learnt some Python tricks on the python Discord server which convinced me to come back here.
I wanted to get reputation to be able to write comments, which led me to the Brachylog bounty,
and the rest is history.
 
And you now join the incredibly large community of Brachylog users, consisting of you, UnrelatedString, and me
(and ais523 and Kroppeb once in a while)
 
7:20 AM
It feels good to be part of a movement.
 
Not much movement on Brachylog’s developements nowadays tbh :p
last commit 2 months ago for a bug fix
 
Erik the Outgolfer also wrote a Brachylog solution on codegolf.stackexchange.com/a/146022
The bounty was probably good advertising
 
The bounty should have gone to Erik 2 years ago but LeakyNun forgot
I stumbled on that challenge a few days ago, so I told LeakyNun he had forgotten it
Erik still didn’t get the bounty though :p
 
Because Unrelated got there with a shorter answer
 
7:25 AM
tbh LeakyNun should have awarded 2 bounties
one to Unrelated and one to Erik
 
I agree. It was a little confusing that it was still around after so long.
 
(LeakyNun was a major user of Brachylog for a few months too before he took a break from PPCG)
 
I'll probably run out of free time eventually too.
Spending a day to learn a programming language isn't something you can do everyday.
Spending more days to continue learning it? Even harder.
 
Same for me. I barely participate to PPCG nowadays, and I haven’t developed anything for Brachylog for months
 
The documentation was a little confusing, but I don't think it affected how long it took to learn Brachylog. It really is just Prolog + Jelly
(That's not to say I know Jelly)
 
7:29 AM
I don’t know anything about Jelly, but I thought it was quite different since Jelly is completely tacit in the way it handles variables, contrary to Brachylog
 
Brachylog is super tacit.
I barely use any variables but input and output
 
But you can use variables and sometimes you have to. Jelly has a billion rules to decide what variables to give as inputs to built-ins
In Brachylog it’s just left is input, right is output
 
Jelly sounds complicated.
(In comparison to Brachylog, even.)
 
IMO it is more complicated yes
The way the program is parsed is not obvious at all
(Though Brachylog could be more complicated to learn if you’ve never done any Prolog)
(just because you won’t get the declarative mindset)
 
There's one complicated system at the heart of Prolog, but that doesn't mean you need to memorise a bunch of individual rules.
I don't remember most of the Brachylog commands, but it's fairly easy to skim the docs to find useful ones.
Oh, that reminds me.
I had some suggestions to make Brachylog easier for golfing, of varying difficulty to implement.
 
7:35 AM
Programs like this one that palindromizes a string don’t work in obvious ways if you’ve never used a declarative logic language
 
That's the one from the video, yes?
 
People used to imperative languages would try to reverse the input and append it I guess, instead of appending something unknown and imposing afterwards that it must be a palindrome
yeah it’s that one
@IFcoltransG Post them here, but I can’t guarantee I’ll implement them. I’m not super motivated to work on the language anymore as I’ve said
 
The biggest one was to make metapredicates chain together.
 
like ᶠᵐ is map on findall?
 
Would that work? I haven't used Brachylog in a few days.
 
7:39 AM
This was also suggested by ais523 a long time ago. Currently ᶠᵐ would be a metapredicate identifier in itself (even though we still have free single letter identifiers)
 
I think I mean the other way around. ᵐᶠ could map a predicate and find all applied to that.
 
I mean it could be any sequence of metapredicates
 
Yep. It would cost less squiggly brackets.
 
This would require quite a few changes to the transpiler. And I preferred to allow arbitrarily long metapredicate identifiers because I though it would be necessary if I ended up using Brachylog as a "real" language
 
Another thing to save squiggly brackets: if you could apply metapredicates to the whole line at once, e.g. by putting them at the start of the line.
 
7:42 AM
So I don’t have any intention of implementing it, but if someone throws a pull request for an implementation of this I probably would accept it
 
Another thing; this would make the language uglier, but subscript and superscript numbers could be merged because there doesn't seem to be a case where the parser could confuse one for another. That would give you extra commands to play around with.
 
@IFcoltransG I don’t think I would want that cause that would make the use of superscript symbols "inconsistent". See the top starred message of this chat :p
 
That's fair.
 
@IFcoltransG This was also suggested by ais523 if I recall correctly. It’s true but currently it’s not needed, we still have plenty of available symbols
 
One thing that would be handy is implicit vectorisation on various predicates. I don't have any examples on hand, but it would save commands.
Oh, things like mapping to digits of numbers without needing to explicitly map
 
7:45 AM
@IFcoltransG This is problematic on a more theoretical level
 
That's also understandable.
 
Since Brachylog has automatic backtracking
It’s hard and sometimes simply incorrect to implement automatic vectorisation
 
It might be possible with more rigorous type checking, but that would be a big change I suppose.
 
And when you use lists for such a variety of things the risk of messing them up could be huge
 
because if it fails it will try to backtrack and deepen vectorisation which leads to incorrect results
This is especially a problem if you’re working on unknown variables
you want predicates to apply fixed relationships on unknown variables, and not worry about possible vectorisation on that unknown variables which would mess up the meaning of what you wanted to write
 
7:47 AM
I thought that normal brackets ( ) should create predicates rather than subexpressions.
That would make it easier to ignore the output of predicates
 
Explain?
 
Basically, if every () was actually interpreted as {( )}
That way you could use ? inside them
As well as metapredicates and ~
I don't know if brackets' not creating a predicate is somehow useful, but I couldn't think of a reason.
 
Parentheses don't break unification though
 
@IFcoltransG Why not just use {}?
 
so what's the difference from just using {}
 
7:51 AM
@IFcoltransG They’re pretty much only useful if you need to write OR-clauses with while having access to current variables
 
I must have misinterpreted the documentation.
 
parentheses in Brachylog work pretty much the same way as they do in Prolog
 
I think I managed to use ¬(...) at one point but I'm not sure I entirely remember how
 
^ that’s also another use case yeah
 
The docs made it sound like they ended with ∧? or equivalent implicitly
 
7:53 AM
Parentheses are used to group logical assertions together. The variable preceeding the opening parenthesis is implicitly available after it.
 
Not ? exactly then
 
So basically if you have A(xB)y then A will be the input of x and B will be the input of y
 
Ok, my confusion was with the 'it' at the end.
I thought 'it' referred to the clause within the () as a whole, not just the single (
 
Another problem with a pronoun. Seems common nowadays on Stack Exchange :p
 
The docs caused me more than just that confusion. I'm not 100% familiar with all of Prolog, so the references to it especially were lost on me.
That, and not all of the symbols are in the headings I expected them to be.
 
7:56 AM
I’ve reworded it, thanks for the feedback
Parentheses are used to group logical assertions together. The variable preceeding the opening parenthesis is implicitly available after that opening parenthesis. The last variable before the closing parenthesis is implicitly available after that closing parenthesis.
 
That's a lot more precise, great.
 
@IFcoltransG What do you mean?
 
About the categorisation of symbols?
One thing that springs to mind is ; and ,
I kept looking for them in Types and Variables.
They're in Execution Control for some reason
 
Ah
Well they’re not variables nor types to be fair :p
They’re used on them to create new variables I guess
Execution control is kind of the "everything-else" category
 
And there are other scattered references, like ↙ in Built in Predicates rather than Calling Predicates
A lot of things are only mentioned once, often in explaining something else.
I might submit a pull request sometime...
(Just for the docs, not the code itself. shivers)
 
8:02 AM
It’s hard to write docs when you’re also the one that implemented it
Especially when things were invented at different times
(e.g. is fairly recent)
 
If there was a cheatsheet for every symbol in the language on one page, that would solve a lot of problems. Or an index at the back that tells you what section they're in.
 
@IFcoltransG My code is great ಠ_ಠ
 
I can't deny it works.
That's the main goal of code.
 
We don’t know how though
:p
 
I mean, it's a secondary goal to using as few characters as possible
 
8:05 AM
Brachylog used to be written in Java originally
That was way worse
 
Did it interface with Prolog?
 
@IFcoltransG There used to be one but it was a hassle to maintain. Now that the language is relatively stable it might be easier
 
I assume that was a transpiler, and the declarative logic wasn't actually implemented in Java
 
@IFcoltransG It generated Prolog files, which you then needed to run with Prolog (because the Java-to-Prolog library sucks)
 
" the declarative logic wasn't actually implemented in Prolog" i am the best at making sense
 
8:07 AM
Maybe a simple thing for the cheatsheet would be to put links on every symbol of the code page to the page that describes it
 
That could work
 
I didn't refer to that page ever, but I might've it it had links.
I just looked at the handy dandy bookmarklet
 
^ could also put docs in that bookmark bar
 
Reminds me, the Jelly bookmarklet actually lets you hover over things and use it
yeah
 
code is here, forked from Adám’s code
 
8:13 AM
I have the APL one as well, and when you hover over a button on that it tells you it's name.
With Brachylog it just tells you the keypresses to get it.
 
That’s because I was too lazy :p
 
Oh, another small golfing improvement for ℕ would be if it constrained > subscript rather than ≥, and the default were -1 or equivalent. That wouldn't be backwards compatible, of course, but it would save a byte when describing numbers larger than 9
Oh, and at times I didn't understand how constraint variables worked, and wished I could use Ḋ like a predicate, specifically like ṗ
 
8:31 AM
@IFcoltransG Well you kind of can
X Ḋ will unify X and Ḋ
Otherwise you can just use as the input/output of a predicate
If you need to map/etc. then wrap it in a predicate with {}
 
And it would require some severe changes to be able to directly stick metapredicates on constraint variables
 
And to the question "why do both exist", it’s just because sometimes it’s more convenient to have a variable directly or to have a predicate
 
9:18 AM
I haven't come across the former case.
 
10:04 AM
@Fatalize I think I made that suggestion
@IFcoltransG I'm now and then working on a typed language like brachylog that would do that.
 
10:34 AM
and my work in progress language is currently nothing but a shaky type system
 
10:53 AM
What is your language again?
 
Lumber
It's got a lot of types, it's currently written in Prolog, and it's probably stack based
That's about all so far
I'm almost considering switching it over to Python or Haskell but I should probably get a feeling for how it should actually work before I go reinvent backtracking and constraint logic
the #1 thing I'm sticking to with it is that it's homoiconic
 
11:29 AM
@Kroppeb That’s possible yeah, I don’t quite remember
 
 
1 hour later…
12:37 PM
What is the best way to assert that 2 values should be coprime
 
 
8 hours later…
8:21 PM
You could find the prime decomposition of each, find the Cartesian product of those decompositions, then map inequality to each pair.
 
8:56 PM
So ḋᵐẋ≠ᵐ? Smart
 
That's slightly simpler than what I had in mind.
 

« first day (1370 days earlier)      last day (896 days later) »