« first day (2616 days earlier)      last day (2220 days later) » 

12:51 AM
I need to learn how to Ruby correctly >_<. I have no idea what I'm doing.
 
@Zacharý link pls
 
In general.
I'm just fooling around now, seeing what Ruby has that Python doesn't that might benefit.
 
@Zacharý everything
well mostly actual OOP I guess
 
Modgrammar, sympy, and a whole lot of modules that Python can have come to mind
Because: NOTICE ME SYMPY
 
Aug 26 '17 at 4:05, by ASCII-only
@Pavel $m=self;def method_missing(n,*a)raise NoMethodError,''unless self==$m;a.length>0 ?n.to_s+' '+a[0].to_s: n.to_s;end
 
12:56 AM
What does that do?!
 
Ah.
wat
 
@Zacharý ?
 
That video
 
@Zacharý video?
 
12:58 AM
The one with Array(16).join("String" - 1) + " Batman!", have you not seen it?
 
@Zacharý oh. well JS isn't perl
 
@ASCII-only I refuse to ackgnowledge that method missing makes sense
 
@Pavel ...sounds like you might not be a fan of Smalltalk then
doesNotUnderstand is the original
 
Do people actually use that
Like I'm fine with ruby because most ruby code does not rely on method_missing
 
I'm sure it has a use in the internals itself
 
1:03 AM
Ya know what?! I'm just going to use modgrammar.
 
@quartata Yeah but I don't have to care about it.
How does smalltalk use it?
 
the preceding sentence was in the context of smalltalk
 
Oh I thought it was ruby
If I don't have to care about doesNotUnderstand, then why wouldn't I like smalltalk because of it?
 
you seemed to dislike the fact that it existed
I would note that one of the reasons Smalltalk goes overboard on reflection is because most Smalltalk VMs are written in Smalltalk
it needs to be good at self-modification, in a sense
 
Oh, not at all. I think it's awesome and you can do some really fun stuff with it, but it still really confusing to me.
 
1:09 AM
oh @quartata since you're here: is there a golfy way to get the binary representation of a number? or popcount for that matter?
 
yeah, using pack/unpack. gimme a second
 
:| that isn't shorter than sprintf
 
I meant for popcount
 
oh wait you can do that?
 
unpack"%b*",pack("J*",$x)
if I'm not mistaken
@TonHospel can probably do better
this is just how I remember to do it
(cause it's fast)
oop
wait
you don't need J*, just J
that was dumb
unpack"%b*",pack("J",$x)
think that's as good as it gets with that
 
1:21 AM
idea for chess variant: the two armies are positioned infinitely far away from each other, on an infinite chessboard, one being infinitely far to the side and down (not sure how bishops work currently)
 
Infinitely far away?
 
the rook and queen and bishop can move infinite distance
 
The pawns and knight are useless
 
@ASCII-only useful for defending the king
 
pawns aren't
 
1:22 AM
they're sort of useful
 
you can literally go around the pawns
also how would the board even be represented physically
 
@ASCII-only they're still useful as barriers
 
@DestructibleLemon not behind the king...
 
@ASCII-only you can represent positions as if the two boards were not connected
 
@DestructibleLemon what if you move a bishop to the middle of the two boards?
 
1:23 AM
maybe something uncountably infinite: finite number of squares, but you can be anywhere between two squares
 
@quartata O_o
 
I've actually had this idea before (real-valued board)
 
for example, A|-1, -4 would represent a position behind one of the armies, and to the left
@Zacharý cool
 
obviously you'd have to change how things move a bit
 
the only thing is figuring out the angle between the boards
 
1:24 AM
the pawns can never reach the kings
 
I think the easy thing would be just "you can land anywhere within the square you stop on"
 
@DestructibleLemon 45 degrees
 
rather than like right on the center or whatever
pawns could still be useful that way
 
Anyone here know modgrammar?
 
@Zacharý modgrammar is terrible
 
1:25 AM
ok so, how does jumping versus movement work?
 
...
 
does the pawn jump in real chess
as in real positions between spaces
 
not sure what you mean
 
@DestructibleLemon huh?
 
basically
 
1:26 AM
@Zacharý why
 
I'm talking about real chess as in, coords are reals
 
Jagony
 
yes that's what I'm talking about
3 mins ago, by quartata
maybe something uncountably infinite: finite number of squares, but you can be anywhere between two squares
 
@DestructibleLemon I'll happily share ideas that I've come up with
 
if a pawn is at (0,0) for example, if something is at (0,0.5), can the pawn move forward
 
1:27 AM
you were talking about countably infinite before, like integers
 
i find this new idea intriguing
 
@quartata hmm would this be like smoothlife
 
question: is rational chess equivalent to real chess? i think it is
 
@DestructibleLemon no because it can't capture that way
 
oh someone should post a challenge about finding equivalents of GoL things in SmoothLife
 
1:28 AM
it would be blocked
 
@quartata no i mean because, if a knight had something in front of it, it can still move because it jumps
 
right
 
while a rook is a rider, a pawn is not
 
@quartata what way can it capture? 30-60 degrees?
 
Maybe make it so within the path of movement, there cannot be a piece <1 square away (unless it's at the end of its movement path)
 
1:28 AM
@ASCII-only yes, diagonals
@Zacharý that eliminates the point, IMO
 
you can't easily extrapolate from regular chess from whether a pawn moves or jumps its one space
 
Kings movements would be: max(|dx|,|dy|)=1
 
@quartata possibly not
 
@DestructibleLemon it moves one space
 
having a piece on 4.5,4.5 prevents occupation of 4 squares
 
1:30 AM
@DestructibleLemon *parts of four squares
 
but you'd need to be consistent about how it works
@ASCII-only yes
 
all I was proposing was that you move to any x,y such that floor(x), floor(y) matches how it moves in normal chess
 
new room?
 
Unless of course, the pieces avoid the capture region
 
once you're in a square you can't move a fractional amount within that square, without moving out of it
that's how you can block
you can't just move around things
 
1:31 AM
Nah, sqrt(dx^2 + dy^2) >= 1
 
what if pieces represented points
 
also, I actually agree that using rationals would be better
easier for players
 
but is it equivalent?
 
I would program my version of Real Chess... but it would be WAY too much work.
 
@DestructibleLemon good enough
the point is not how you label the positions
 
1:32 AM
i think it might be
 
just that the set of positions is uncountably infinite
 
ok
are pieces represented as points or areas
 
@El'endiaStarman can ArbyChess do this?
@DestructibleLemon points
 
|Q|=|N|, just to make sure you guys know
 
cardinality is a construct
 
1:33 AM
Points, with "capture regions" or someting similar
 
@Zacharý ...oh, right. god I'm tired today
 
@Zacharý ok so is this saying rationals are countable?
 
@DestructibleLemon yes
 
Yes
 
there's a reason my bio says "idiot as a side gig"
 
1:34 AM
ok... i still think that it's equivalent though
so you said something about a floor function
 
that was just for movement
that is, you move to a place within the square where you would move in normal chess
 
Do you plan on implementing this
 
no
 
@quartata this is not what i was thinking
 
it would be a nuisance anyways because of floats
 
1:35 AM
SYMPY
 
@quartata I think you could implement it in such a way that there are no rounding errors
 
not with floats
 
because you only need like 64 values
 
floats would just be like having a really huge board
 
and which are greater and less than
 
1:36 AM
I legitimately want arbitrary precision
 
The big problem I see is if you have complex movement rules: trying to implement check and checkmate ...
 
even if players are unlikely to need it
 
@quartata yeah, but you don't need to store arbitrary precision like this
 
Move a piece to (pi,e) !
 
@Zacharý awh hell yeah
 
1:37 AM
@quartata and the further away you go the more spread out the possible spots are :P
 
you only need to store whether a position value is equal to, or greater, or less than, another piece's position value
which is basically sorting a list of pieces twice or something
 
@ASCII-only that wouldn't be a problem, we'd only store the fractional part as a float
i.e the position within the square
 
Are check and checkmate going to exist?
 
i don't know i suck ass at chess
 
you don't necessarily need to express it as rationals
 
1:38 AM
i'm pretty much just interested from a pure board game perspective
@DestructibleLemon i'm back to reals now
 
I'm interested as I've had this idea.
 
either way
 
we need someone who actually knows chess
 
the only thing that the rational/real yields is whether or not you're blocked by a piece and could capture it
 
in other words, we need @Doorknob
 
1:39 AM
@quartata define knows
 
this is why you don't need to store the actual positions in lossy ways
 
@quartata also what are capturing rules?
 
< 1 from the point
 
@ASCII-only 1500+ elo
 
:||||||||||||||
 
1:40 AM
@ASCII-only being directly on the point
 
@quartata ... you're joking, right?
 
@quartata :||||||| are those the people who try and capture your rooks as early as possible
 
:||||| why are we spamming or's?
 
why would I be?
 
@quartata i have 1500 (i think that's the starting value) because i have anxiety about losing points so i never play ranked at all
 
1:41 AM
@Zacharý what's so bad about that
 
How would anyone capture anything?
 
@DestructibleLemon starting is 500
 
@Zacharý you move onto the point
 
@ASCII-only really?
i don't remember that
@ASCII-only a lot of places give new players 1500
 
@Zacharý you move such that you'll be able to capture a piece next move
 
1:43 AM
I think maybe this is something where you have to play it to be able to reason about it
 
In that case, movement rules would have to be created such that it doesn't become impossible to catch a piece.
 
i think you could definitely skewer or pin pieces if the king was easier to target
 
i can't envision a scenario where that would occur
 
Can you tell me your capturing rule for knights?
 
you can always move out of the square and move back into it, if you're on different points within the same square
 
1:45 AM
so my idea would be called projective chess or something?
 
@Zacharý none of the capturing rules change, the only movement rule that changes is that you can only move to a point within the final square of the piece's movement
 
i would prefer if it were just an extension of chess to the euclidean plane, such that a rook at (0,0), after a move, has at least one coord = 0
 
that is, you move one square or whatever, then place it down on a point within that square
 
Ah! Then that works fine then. Getting two real-chesses confused
 
yeah sorry we have two different systems brewing here
it's kind of a funny mix when you think about it
the movement rules are still discrete in essence, but you fit many pieces in the continuous part of each square
 
1:50 AM
*3
Mine. @quartata's, and @DestructibleLemon's ideas.
 
i sort of have two
but one of them isn't being discussed right now
is there any difference between uncountable and countable systems for any of these related chess ideas?
also i think rationals will be useful for my projective chess variant, if you want to move a rook infinitely, but to a different amount of infinity than the opponents board
 
@DestructibleLemon I think maybe not for the purposes of mine...
 
how possibly could your variant be impacted by rationals vs reals
 
Wait ... Two boards?! Did I miss something?
 
I'm talking about my projective chess variant (with an infinitely large board)
except i'm not sure whether it is projective exactly
 
2:00 AM
@quartata what, the only thing I know about chess is how to lose
 
@Doorknob lies
 
its more that there are things like points at infinity, but there are more points at infinity from there
i don't think it's projective at all
it doesn't have anything about parallel lines
ordinals would be used in the system
 
omega(d)! Ordinals?
 
why is there an !
i don't understand
 
Haven't you seen the omega for set theory? It's like aleph null, but for ordinals. So I made "omega" sound like "Oh my god"
 
2:12 AM
yeah, i was wondering why you were making a function call to omega and then finding its factorial
yeah i was looking at an article for it
 
Or maybe just multiplication :p
 
maybe...
does factorial evaluate first?
 
Anyone know how to make a grammar not left-recursive?
 
2:30 AM
reverse it?
 
@quartata Not yet. Besides, it can barely do regular chess. :P
 
@ASCII-only working on generics. Do we want generic functions?
 
@Downgoat yes you do
 
There is very limited use-case that I can think of for them
@quartata these aren't like C++ function templates though
 
what is arbychess
 
2:31 AM
el'endia's chess engine
 
You can pretty much all of the time rewrite the same code using a common superclass
 
...instead of generics?
oh I see what you mean
well here's a usecase for you to chew on:
 
CMP: what should a ! b do in a programming language, if ! is an operator?
 
template <typename T>
std::vector<T>& arrayManip(std::vector<T>& list) { ... }
 
2:37 AM
@ConorO'Brien what type of language?
 
@Downgoat I may not care about the contents of the array
like say, when reversing an array
that's a good example
 
@DestructibleLemon a "practical" one, specifically Attache
 
you would definitely want generics then
 
@quartata you should probably implement this as an extension
 
no
 
2:37 AM
@ConorO'Brien then != is probably not appropriate?
 
just because it's monadic doesn't mean it should be an extension
 
@DestructibleLemon no, there's already an operator for that
 
perhaps a!/b! or whatever?
 
it could actually be manipulating another object and just happen to need the list. this was a simple example.
 
@ConorO'Brien bitwise not all bits in A that are not true in B
 
2:38 AM
probably should mention that !a is already factorial
 
@ConorO'Brien ...it's not postfix?
 
a!/b! is useful for permutations and stuff
 
@quartata clearly we should just use my terrible chess engine that doesn't even work :P
 
@quartata do you know how hard it is to implement postfix operators when prefix operators are a thing in my monkey patched shunting algorithm?
 
probably pretty hard
 
2:40 AM
at what point does a definition of a number become actually about the number and not about "woah imagine a really big number"
 
> monkey patched
:/
 
@ASCII-only I've never found any good reference for robust shunting algorithms, and mine's kinda iffy
 
@ConorO'Brien robust?
 
what do you mean
is there even more than one
 
2:41 AM
yes
you have your generic shunting algorithm
then you have those able to hand variadic function calling, unary operators of mixed precedence, operators which are more than dyadic, etc
 
@ConorO'Brien oh. iirc Pytek has one of those
 
and so does attache
 
@ConorO'Brien variadic function calling?
@ConorO'Brien but isn't factorial just 1, 0-adic
 
basically, allowing for functions without predefined arities
 
@ASCII-only yeah ours handled that shit I think
I don't know pytek is still a bit of a fever dream
 
2:43 AM
@ASCII-only 1, 0-adic?
 
although ours also did not have parentheses
 
Will get to it! ... Before the heat death of the universe...
 
so uh
you know
@El'endiaStarman we need to redesign it from the ground up, it didn't have enough coroutines
 
@ConorO'Brien why not just make operators any arity
 
@ASCII-only well I don't like operators greater than dyadic
 
2:44 AM
@ConorO'Brien :| then why do you have them at all
 
0
Q: Console print a bar graph

SpencerThe objective is to print a graph from an array of numbers, of the design below. Printing the X and Y scale exactly as in the "design", with padding, is part of the challenge. The input array of numbers can be of virtually any range of integers in X and Y, though I would suggest keeping it small ...

 
I don't
 
oh.
@ConorO'Brien what do you handle?
postfix/prefix/dyadic isn't that hard
 
statement flushing (basically good asi), implicit array creation (since [ is a function call in Attache), value discarding via parens ((a, b, c) being equal to c), inbuilt currying syntax, bracketed lambdas ({ ... })
and regular operators
 
2:59 AM
@ConorO'Brien asi?
 
automatic semicolon insertion
 
@ASCII-only do we want to give warn when you don't do anything with a function that returns
 
You mean returns a value, right?
Nim makes it so you have to do discard f()
otherwise it errors
you might not like that if you end up working with C APIs a lot
they tend to return stuff like sizes that you may not usually need
 
@user202729 I think it has something to do with the being included in the chain in the broken one, and excluded in the working one
Hmm, actually, if you add another µ before the broken one it seems to work
 
3:15 AM
But not what I intended.
 
Ah, I think I understand the problem: µ starts a new monadic chain to the right, so the С doesn't actually have a link or chain to work with
Which is why it just gives None the first iteration
 
That's not Jelly...
The arity of the first chain is the arity of the link.
So it should be monadic.
 
Is that what you wanted, incrementing on each iteration before the integer division?
 
call = lambda x = None, y = None: ntimes(links, (x, y), cumulative = True)
 
The way I see it, without the leading µ it just executes the first three links, then the µ forces the parser to move on without regrouping the previous links, and therefore С can't group the previous two links
 
3:21 AM
Looks like something calls call()...
I'm debugging...
 
You can replace the $ with Ɗ to group the first 3 links together
 
Oh...
The parser think that the link is leading_nilad, so the first link is evaluated niladically. (huh?)
 
ah. I understand now
wait... nilad?
 
Because:
 
are you talking about the µ⁹С or the first part?
 
3:26 AM
(1) С's arity is the max of its childs' arity.
 
wait... so is С stealing the 3 from the first part?
 
(2) its childs are <1> the ‘:3 -> variadic, (-1) and -> niladic, 0.
So its calculated arity is max(-1,0)==0.
 
...oh
I would have assumed the variadic would be considered at least a (1)
 
Temporary solution: Denote variadic arity = 3.
 
the question then is, would that break anything else?
hah, apparently the film-making company ETH Productions have changed their name to ETH Entertainment
 
4:04 AM
@DJMcMayhem Of course! You can write the whole post if you want (I have no monopoly on that task); or I can write it and you can edit it afterwards.
 
4:27 AM
I liked the format of the brachylog post, so I'll probably keep it pretty similar. I just wanted to fill out the brain-flak info
 
4:42 AM
@ASCII-only okay I've been working on making type deduction errors more clear in VSL. Is this understandable?:
Type Resolution Error: Call to function does not match any valid candidates. Valid candidates are:
    • func print(string: String) -> Void
    • func print(byteSequence: ByteSequence) -> Void
    • func print(bool: Bool) -> Void
    • func print(uint32: UInt32) -> Void
    • func print(int: Int32) -> Void
    • func print(uint64: UInt64) -> Void
    • func print(int64: Int64) -> Void
    • func print(float: Float) -> Void
    • func print(double: Double) -> Void
Instead, deducted to `func (*: Object) -> *` (3:15)
 
Yes
 
okay well in other good news, this mean generics are work :D
 

« first day (2616 days earlier)      last day (2220 days later) »