« first day (4386 days earlier)      last day (460 days later) » 
00:00 - 23:0023:00 - 00:00

11:00 PM
really cursed interesting idea: what if dependency config is built right into the syntax of the language?
example:
dependencies {
  web("https://library.com")
  local("/usr/whatever")
}

import library
import whatever
...
 
@lyxal This is like the "you became the very thing you were meant to destroy" meme but in reverse, destroying themselves
 
I think there's a good reason languages and their package managers tend to be separate
 
true
 
Desynchronizing the library itself with where you get it is very useful
 
Deno has you import from URLs and it feels very cursed
 
11:02 PM
Links rot, mirrors break, files get moved, things update
 
^
 
@RydwolfPrograms how is that different from a normal package manager?
 
Integrate a simple build tool/package manager thing into your compiler to help with that
@Seggan It's separate from your code
 
@Seggan The fact that you have to go and actually edit some random library's code to get it to compile
 
CMQ: How should one represent exponentiation in a language. With considerations for whether or not the language also supports bitwise/logical XOR
 
11:04 PM
Also, wouldn't every file need to list the dependencies this way? Better to have them centralized in a single build script or whatever
 
@ATaco ** ftw, xor or not
 
@user oh, didnt think of that
 
@ATaco Can you set custom operator precedences? If so, definitely **
 
never mind then
 
^ is too mathematical
 
11:04 PM
@ATaco agree with rydwolf
 
I'd even prefer pow(x, y) over x ^ y just because of the confusion it could cause
 
^
 
And because ^ is ugly ngl
 
Explicit is always good, and exponentiation doesn't come up too often
 
@user But is that xor or pow? :p
 
11:05 PM
Neither, it's pin
 
I like ^ for pow and ~ for XOR.
 
~ is usually used for bitwise negation though
Is this a praclang or a golflang?
 
I mean, it kinda makes sense to have ~ for both xor and not
 
Only as a unary operator though, which feels fitting for XOR as a binary op imo
 
Since not is just xor -1
 
11:06 PM
@user Praclang.
Also for consideration, a deference unary operator is already defined as *
Doesn't rule out **, but does leave ambiguity between a ** b and a * *b
 
I think that's fine
You can require spaces/non-symbol characters between operators
 
Reasonable
 
That sort of ambiguity already kind of exists in langs with ++/-- and they seem to manage
 
Oh yeah you can also just try to find the longest match like those languages do
 
^
 
11:10 PM
@ATaco Since everybody else seems to disagree, I'll put in my vote for ^ as exponentiation
 
if anything, a * (*b)
 
I can't really think of a situation in which you'd want to do a --b
 
@DLosc Are you just being contrary?
 
As apposed to a - -b
 
@user No, I do honestly like ^ for exponentiation
 
11:11 PM
As opposed to a + b
 
But ** does seem the "Least surprising" solution
 
@ATaco TIL appose is an actual word
 
It is, and yet I still used the wrong one :P
 
I am very apposed to code golf. I want to effect it all over the place.
 
I was scratching my head yesterday wondering why x * (2^y) wasn't acting as x << y until I realised ^ was a binary XOR.
 
11:13 PM
Oct 13, 2021 at 21:40, by DLosc
My syntax preferences are often QBasic-flavored.
 
Operators are so last decade, function calls or nothing
 
I hear labels and gotos are back to being all the rage now
 
@ATaco functional languages go brr
 
Gotos are so flexible and declarative
3
 
@DLosc Ooh, I didn't know QBasic had exponentiation and stuff built in
 
11:16 PM
@ATaco no syntax. Just make it so that superscript numbers and letters are considered exponents
Big brain approach :p
 
...Unironically wish to implement superscript as sugar for exponents now
 
AAAAAAAAAAAAAA
If you're doing that, I recommend going all in and making the whole language as sugary and close to math as possible
 
@ATaco do it.
 
Julia uses ^ for exponentiation... and for bitwise XOR.
 
@RydwolfPrograms I know, right? Modern languages restrict our freedom so much. If I want a velociraptor, I'll damn well summon one and no one can stop me
 
11:18 PM
Type overload xor to do both logical and bitwise and use
 
.replace(/[⁰ⁱ²³⁴-⁹]+/, ...
 
Because that's what real gamers use to represent xor
 
Have XOR and POW! keyworsd
 
Keyword operators, that's a thought
 
do_thing(x, y, z) is such an imperative way of thinking. goto do_thing is a more natural way to conceptualize going to do a task
 
11:20 PM
@RydwolfPrograms High level languages are too abstract. If you're not writing ASM you'll never understand what your program is really doing.
 
@user It would make reading code so exicitng. You're just reading variable names then all of a sudden...POW! KABOOM!
 
@ATaco go the extra mile and allow it to be variable names too
 
someᵗʰⁱⁿᵍ == some ** thing
 
That's right
 
Do that cursed thing Python has
 
11:21 PM
@RydwolfPrograms In all seriousness, I think the goto approach I use to generate the random number in this answer is more understandable than the equivalent in a language without gotos. They are easily abused, tho.
 
Where replacing the "iv" in "divmod" with the Roman numeral still gives you divmod
 
lmao what
 
@DLosc Isn't that equivalent to a continue?
 
@RydwolfPrograms Saw it here
 
@AviFS I mean, I can see why it might be a good idea. Potentially running a one-off chat event to encourage more nominations could be useful, but at this late in the nomination stage, I think it's a bit late
 
11:24 PM
Of course if we have superscript as implicit exponentiation, may as well allow √exp
 
yes! hell yes! let the unicode flow freely!
 
No, I don't think so. In pseudocode it's:
Generate a random number
Check each previously generated number to see if it's a duplicate
If it is, go back and generate a new random number and try again
Otherwise, go on to the next statement
 
@pxeger 11'ed
 
@ATaco Does Unicode have a combining character to give you overbars? If so, it can look even more like the normal square root thing without using parentheses
 
⎲a
⎳b
 
11:26 PM
@ATaco surely it can't get better than this! :p
 
Btw, I know you're joking, but if you're interested in making a language like this, you might want to check out JetBrains MPS. It lets you make projectional editors
 
We have multiline Parentheticals, we can get REAL crazy
A "2d" math based language
 
@user am I though? Honestly I'd love to see unicode like that in a language
 
@lyxal Again, Julia's got you covered
 
I meant ATaco
But yeah MPS is pretty cool, just doesn't get very good support
 
11:28 PM
@ATaco oh hell yeah
 
⎛⏜
⎜a
⎜+ * 3 )
⎜b
⎝⏝
 
@ATaco raku did it
 
Oh?
 
@ATaco integration?
I'm not quite sure what that's representing
 
Raku seems to be diabetes in digital form
 
11:30 PM
@user You've summoned Jo King!
 
fun for golfing too, since ² is one byte shorter than **2 plus can save on whitespace
 
⎧ Integrate to your heart's content
 
(to your heart's content)x + C
:P
 
@RydwolfPrograms (cc @user) in all seriousness, kotlin allows infix functions so i can literally write POW and KABOOM
 
@DLosc Your heart's content is a constant?
 
11:31 PM
Hmm, good question
 
Should x²² be x**2**2 or x**22..?
 
x ** 22
 
@Seggan Yeah infix syntax is pretty common but capitalizing it and making them keywords is a horrible idea
 
raku says x**22
 
Raku speaks no lies
 
11:32 PM
(x²)² if you want x**2**2
 
2 `POW!` 3 would be fun though
 
Nim lets you do that one too
 
Nim has superscripts?
 
Yes, but I was talking about 2 `POW!` 3
 
@ATaco x*y
 
11:33 PM
@user yeah it does
 
Way too confusing for non-APLers
 
@user and non-Jellyers, and non-Vyxal(v3)ers
 
Vyxal uses * for exponentiation?
 
it does in v3
 
That seems like a bad idea ngl
oh no
 
11:35 PM
val exponentation = addVect(
      Dyad,
      "*",
      "Exponentation | Remove Nth Letter | Trim",
      List("exp", "**", "pow", "exponent", "remove-letter", "str-trim"),
      "a: num, b: num -> a ^ b",
      "a: str, b: num -> a with the bth letter removed",
      "a: num, b: str -> b with the ath letter removed",
      "a: str, b: str -> trim b from both sides of a"
    )
 
exponentation should actually be a macro expanding x *(op) n to x op x op... x n times
 
How do you do that with anything that isn't a positive integer?
 
Jelly uses * for exponentiation too
 
@user well it can't be multiplication, because × does that
 
Yeah lyxal mentioned that, but Jelly's inspired by APL
 
11:36 PM
@JoKing The horror of linear exponents
 
@user uhh, don't I guess
 
a ** b = (a ** b/2) * (a ** b/2), thus it can be done in O(log n) at least
 
I guess with non-positive integers you could start at 1 and divide
 
right, if you could get the inverse of an op that would work
 
* as pow kinda makes sense
 
11:37 PM
@user Apply the exponential rules to extend to rationals, then use series expansion of irrationals :P
 
a *+ 3 is just a * 3 hmmmst ve.
 
e.g. x *(op) -n = 1/(x *(op) n), x *(op) a/b = x *(op) a / x *(op) b and then use the sum of powers distributes to products of terms for irrationals
 
that doesn't really work for ops that aren't multiplication though
i guess i can't really think of a use for this for any standard operators beside addition and multiplication
 
Is there any reason that languages with C-like syntax cannot use x for multiplication?
 
variable naming
 
11:46 PM
it would probably confuse the parser to have an infix operator that isn't symbols
 
Because that'd be really gross
 
kotlin can do that
 
@Seggan How so?
Can a x b mean anything else?
 
no, but axb can
 
@JoKing Surely, a parser doesn't care about character properties.
 
11:47 PM
@Adám They absolutely can
 
raku has x as string multiplication i guess
 
@Seggan Right, so require spaces. Many people always put spaces around operators anyway.
 
Kotlin and Scala will let you make an infix operator x
 
and to have a single operator that has to have whitespace around it is weird
 
Why?
 
11:48 PM
^^^
@user because +-/ dont
 
Require spaces around all infix oeprators
 
for the longest time i used to not put spaces around my operators
 
It's the sane thing to do anyway
 
Why?
 
I hate it when operators are all mushed together
 
11:48 PM
@Adám because i was not well versed in code style
do you write apl with spaces around operators
 
Rarely.
 
i like grouping them on either side of a comparison, e.g. a*b == a+b
 
I usually use parentheses if it's complex
 
@user But that's your preference. Surely someone preferring the opposite could still be sane?
 
Yeah, poor wording
 
11:52 PM
on another note, i finally overhauled the dependency system in rol
it only took me 3 days
instead of import, i have using now, for certain reasons i will describe later
the import style is pythonic
 
@Seggan \o/
How does it work?
 
using library
using something in anotherlib

library:doStuff()
something()
although i am very tempted to add a from keyword just to replace that in
(cc @user)
surprisingly, even though i only compiled it for the first time since making those changes today, i only had 2 errors during runtime, and no logic errors
 
Interesting
I assume there's a reason you can't do using library.something?
 
@user May I introduce you "Haskell but no infix operator definition or backtick notation"
 
@user ehh from or in is nicer
am i importing a subpackage or a function from that package?
 
11:57 PM
Oh okay I thought it was because Rol stuff was more like Python modules than Java packages
@Bubbler But you still have spaces or parentheses or . in between, right?
 
yeach i scrapped the java style packages, mostly because it was similar to star imports
 
@JoKing QBasic and Python both have some operators composed of letters
 
@user spaces yes, parens yes, dots only for namespace access I guess
 
@Adám The main problem might be that anyone with a math background will want to use x as a variable name.
 
And?
 
11:59 PM
It would be confusing to see x x x
 
@DLosc i guess i'm interpreting C-like syntax badly
 
You'd write x * 2 anyway.
 
00:00 - 23:0023:00 - 00:00

« first day (4386 days earlier)      last day (460 days later) »