« first day (1896 days earlier)      last day (2939 days later) » 

4:00 PM
hai @Lynn
 
hi @Lynn
 
My golfing interests wax and wane a lot. But I’m alive
 
oh, did you ever talk to that dude from your university who codegolfed?
 
@EᴀsᴛᴇʀʟʏIʀᴋ For that use ppcg.lol/a / answer id here.
 
Hahaha, I didn’t, no. Maybe I will just let him figure it out >.>
 
4:01 PM
@Downgoat I should probably consolidate those to the major revisions
 
@Downgoat replace the codegolf.xyz part in your profile with ppcg.lol
that works and is short and fun
 
I did
no I didn't
 
@Lynn Hey! Haven't seen you in a while.
 
I used codegolf.stackexchang3ee.dcom/a/1234]
 
Hiya, El'endia
 
4:03 PM
Should classes have access to variables declared in a difference scope?
 
@Downgoat #failed that url
 
e,g,
 
@Sherlock9 That's an impressive string of golfs.
 
^^ Thanks :D
 
if (true) {
    var := 123
    class Foo {
        main { /* should this have access to var?*/ }
    }
}
 
@EᴀsᴛᴇʀʟʏIʀᴋ was that an answre to mt question or another?
 
the the class's function can have inputs and maybe be fed var.
@Downgoat yours.
 
oh, cool, that makes this waaaasaaaaaayyyyyyyy easiet
and in this example:
 
@Downgoat Python allows reading of variables declared in an outer (encompassing) scope, but to make it writable, you must declare it to be global in both the inner and outer scope.
 
Make all variables global, require explicit typecasting, don't allow variable name conflicts. Done.
 
4:06 PM
class Foo {
    MyFunction => (a,b) a + b
}
// should there be a way to access my function without constructing foo?
 
if (true){
	var := 123
	class Foo {
		main (input){
			try:
				print var
			except:
				print input
		}
	}
}
@Downgoat Foo.MyFunction(1,2)
 
@Downgoat Can do Foo.MyFunction if this were Python.
 
but there is no static
 
static?
wait take this to cheddar
 
4:08 PM
does python automatically distinguish static on non-statuic functions?
 
define static?
 
@Downgoat Try rubbing you feet against the carpet. That usually creates some static.
 
@QPaysTaxes so if a function referenced this, would it still be accessible?
 
yes.
even from inside.
 
4:08 PM
@Downgoat What does static mean to you?
@EᴀsᴛᴇʀʟʏIʀᴋ Sometimes I ask/talk about Pytek stuff in here to get input from other programmers.
 
@El'endiaStarman It creates a function which is accessible without constructing the class
should I add a prototype property like JavaScript or is that a big no-no?
 
class Foo {
   func => (a,b) self.func2(b,a)
   func2 => (c,d) c+d
}
 
@Downgoat That's implicit in Python then, I guess?
 
@Downgoat ^^ is valid.
@Downgoat no-no.
 
@EᴀsᴛᴇʀʟʏIʀᴋ I'd rather have the syntax be:
class Foo {
   func => (a,b) self.func2(b,a)
   func2 => (c,d) c+d
}
 
4:10 PM
oh yeah sorry i missed that
 
though they aren't really lambdas while it seems like that
 
@Downgoat idk function syntax, but that is the gist of it.
 
@EᴀsᴛᴇʀʟʏIʀᴋ you did not link to any gist
 
self should be accesible from inside the class, and can access anything defined within the class.
 
@EᴀsᴛᴇʀʟʏIʀᴋ it was a joke! :P
 
4:12 PM
flags as gadawful joke
 
:(
 
I was amused.
 
I wasn't amused.
 
@Downgoat I thought you were making class-based inheritance?
 
@EᴀsᴛᴇʀʟʏIʀᴋ Git happens?
 
4:15 PM
@quartata still desciding on it
I need to descide on scopes / variables work / are accessed.
 
FWIW I don't think people really like prototype-based inheritance
 
decide*
 
He has hooves, typing is tough
3
 
How does prototype in JavaScript work, again? I don't think I really ever understood it.
@QPaysTaxes Sooo....Python uses light magic? :D
 
@Downgoat this syntax makes it look like function overloading is not possible
 
JS is half sith half jedi padawan.
 
@El'endiaStarman Basically you create an object called a prototype and make instances of it by copying it
 
4:18 PM
@NathanMerrill function overloading is implicit
 
meaning?
 
@EᴀsᴛᴇʀʟʏIʀᴋ JediSith
2
 
That's different from class-based where you have a fixed class and instantiate objects based on it
Inheritance works by taking an object's prototype and adding new things to it
 
@quartata Oooh, okay.
 
4:19 PM
It's a clever concept sure but it doesn't work as well in practice as class-based
Fun fact: prototypes came first
 
@NathanMerrill e.g.
 
I just found this lol:
13
A: prototype based vs. class based inheritance

AmitYou should check out a great book on JavaScript by Douglas Crockford. It provides a very good explanation of some of the design decisions taken by JavaScript creators. One of the important design aspect of JavaScript is its prototypal inheritance system. Objects are first class citizens in JavaS...

> It provides a very good explanation of some of the design decisions taken by JavaScript creators.
 
     class A {
         func => (a,b) a + b
     }

     class B extends A {
         // overloads `func` on A
         func => (a,b) a - b
     }
 
it better
 
@Downgoat that's overriding
 
4:20 PM
^
 
overloading is multiple methods with the same name, but different parameters
 
@NathanMerrill oh
 
if you don't support overloading, then will you support default parameters?
 
I don't see the point of that
@NathanMerrill yeah
 
@NathanMerrill Or different datatypes.
 
4:21 PM
^
@Downgoat ^ is why to allow overloading.
 
there's a optional main {} block which you can overide the implicit variable-setting-thing
e.g.
 class A(String: B, Int: C = 10, Int:D) {
     main {
        if D {
             self.D = D
        }
     }
 }
 
@Downgoat another thing that makes it difficult with static typing is the following:
 
@EᴀsᴛᴇʀʟʏIʀᴋ BTW, I thought that ^ refers to ther previous message, ^^ refers to the one before that e.t.c.
 
yeah, but they chain.
So that traveled, not stopping.
user image
2
 
@NathanMerrill Cheddar is dynamically typed
 
4:24 PM
@Downgoat it's statically typed, but inferred typing
from what you've said
 
I always thought ^ meant I like pointy things.
 
good for you
 
class A{
    func := (a,b) => a+b
}
class B extends A{
    func := (a) => a
}
 
@Dennis It's an exponent
 
@Dennis it's xor
 
4:25 PM
@Dennis No, "I like pointy things" is ★
 
@Downgoat Oh, thx. I can use that in my Boolean parser question.
 
In PowerShell it means Unexpected token '^' in expression or statement.
5
 
Either way, people here like pointy things
 
@Downgoat do you see the problem with my above example?
 
no, not really
 
4:27 PM
@Downgoat Curvy things are better.
 
say I have a list of As (but some of them are Bs)
 
@Geobits downvote icon is not curevy
 
and I call func() on them
 
How is a circle not curvy? o.O
 
how many parameters do I call on them?
 
4:28 PM
@NathanMerrill you can pass a second argument. But for Bs, the second parameter will be ignored.
@Geobits circle is only the downvote icon container
 
Well, I suppose technically you can use ^ in conjunction with $ to mean "the first token of the previous statement or command" ... like if you type Write-Host "Hello, World!" and hit enter, then $^ would be equal to Write-Host
 
@Downgoat what if its the other way around?
 
@Downgoat I disagree, and I like to think I'm in a position to know :P
 
I have a list of As
which only accept 1 parameter
should I really call them with 2 parameters?
 
@NathanMerrill well yeah, how else should it be done?
 
4:30 PM
Lol, the bottom one:
14
A: Showcase your language one vote at a time

CoolestVetoAppleScript (or osascript, from command line) Factoid Applescript is a programming language most commonly used for automating events in the system environment and Aqua interface interactions in Mac OS X, though it can be used as a normal programming language as well. Its syntax boasts an (almos...

 
@QPaysTaxes just pass it off as a feature
 
@Downgoat here's a related question
 
Is there a more social chatroom on the exchange network?
 
@Winny yes
 
@Winny The Bridge.
 
4:31 PM
class A{
    func := (a) => a
}
a = new A()
a.func(1,2)
is the above a syntax error?
but what if A is actually a B?
 
@NathanMerrill no
@QPaysTaxes sounds fin
 
a.newFunc(1)
is that a syntax error?
 
why should it?
@NathanMerrill if newFunc is not defined? It won't throw a syntax error. Only a run-time error if it can't find it
 
ok
then you are right, its a dynamic language
I thought it was a syntax error
 
@CoolestVeto thanks :)
 
4:34 PM
We are social!
 
@Winny Why ya thanking me? :P
 
just weird also.
 
@Downgoat you said there's optional typing? Is there a type for a function?
 
@QPaysTaxes I mean it could, I haven't descided yet
 
@CᴏɴᴏʀO'Bʀɪᴇɴ does oration have if statements?
 
4:34 PM
actually, better question
 
@NathanMerrill I couldn't consider it a type but there is a "Cheddar class" for functions internally
 
@CoolestVeto ^ The Bridge :p
 
I don't think python does that though okay, it does. I'll be doing that in cheddar
 
class A{
    a: String := "Hello"
}
class B extends A{
    a: Int := 4
}
is that a syntax error?
 
@NathanMerrill no, it is not
 
4:36 PM
so typing is purely commentary
 
py has type annotations, and I believe in 3.6 or later, there is some sort of typing thing, but you'll have to google that
at any rate it's not today :)
 
@NathanMerrill typing is a way to assign an associated class to a literal. So I could have a class SpecialInt. and call it SpecialInt: 123
 
@Downgoat but how is that any different than Int?
 
@NathanMerrill the user would define SpecialInt's behavior
 
4:38 PM
are you're saying that typing is shorthand for calling its constructor?
 
@NathanMerrill kind of, yeah.
 
then I'm assuming that can only be done with single argument constructors?
 
user image
5
 
@NathanMerrill yes, pretty much
 
class A(a,b){
}
class B{
    c: A := 56
}
 
4:39 PM
but the main use for it is casting
 
right
 
Int: "123" -> 123
 
so the above would be a runtime error
er, actually, it be a syntax error
because if its shorthand, then it'd generate the constructor at that time
 
@NathanMerrill it would be a runtime error
 
ok
so, does that mean that optional typing is pretty much impossible for A?
or would there be special syntax?
 
4:42 PM
@Lembik: Updated with a non naive version
 
@TonHospel I tried running code which I assume is an implementation of that paper and it is slooooooow
 
@NathanMerrill if there is a main block with the class. It will assume the main{} block will handle the type checking.
 
@lembik: Mine is blazingly fast
 
its not type checking though. you are literally requiring two arguments
 
@TonHospel I like "No more naive approach. " !!
@TonHospel I am looking forward to trying it now!!
 
4:43 PM
I guess you could assign b to null
 
@lembik: It was always very clear that using a cube sucks. The higher the dimension, the bigger the corners
 
I could always add an optional syntax
 
This beeswax esolang looks super interesting:
13
A: Showcase your language one vote at a time

M Lbeeswax Factoid: beeswax is a self-modifying 2D esoteric programming language created by Manuel Lohmann, based on a 2-dimensional hexagonal grid. Every cell in a beeswax program (the honeycomb) has 6 neighbors. 2 — 1 / \ / \ 3 — β — 0 \ / \ / 4 — 5 Actual layout: 21 3β0 45 Instruct...

 
e.g. class A(a,b?)
 
TIL AppleScript is nihilistic.
 
4:44 PM
roflmao
 
@TonHospel libntl-dev libgsl-dev don't exist... let me see
 
@Downgoat consider the following case:
 
@Mego: Completed classic mode in 22 days! (Learn 2 Fly)
 
class Coordinates(x,y){
}
class MyCoordinates(x,y){
}
 
@TonHospel libgsl0-dev - GNU Scientific Library (GSL) -- development package ?
 
4:45 PM
@lembik: Yes, that's the right library name
 
a := Coordinates(1,2)
b: MyCoordinates := a
 
libntl-dev does actually exist.. my mistake
 
summarize integer

return: "long"
 
@TonHospel bpaste.net/show/0cf26808fb50 any ideas?
 
@lembik: I cheated with the error estimator. I kept the power of pi in there though that should not be needed with how I scale the input matrix. Dunno why it fails
 
4:49 PM
@Downgoat would you consider support for the above?
 
0
Q: Find the result of Z(8283840)

NukeNoobdef a(number, start): bool = True if start < number: if number % start == 0: bool = False else: bool = a(number, start + 1) return bool def b(n1, n2): result = 0 if n2 > n1: pass else: if n2 == 0: result ...

 
@TonHospel compiling your code is hard! :)
 
@MartinBüttner Do you have any idea why the scoreboard snippets are getting messed up?
 
also, what happens with
 
@NewMainPosts eyyyy nope
 
4:50 PM
@lembik: It's because you use an ancient distro.
 
class A(a){
}
a := A(1)
b: A := a
does the above create a new instance of A?
 
@NathanMerrill hmm, I will have to think about that
@NathanMerrill If you're calling the constructor B := A:a, then it would pass a to A as a single argument. Meaning it would create another instance of A.
 
@TonHospel maybe :) I am not sure that was the problem last time
 
but I'm not
they are both instances of A
 
I'm thinking that it should create a new instance, should it?
 
4:53 PM
@TonHospel while I have you there.. when you say "the ellipsoid", which ellipsoid is it exactly?
we amateurs need some help :)
 
@Downgoat if so, then it really is shorthand for a constructor.
if you don't then, it'll have to do a check to determine the type
and if they are the same types, then it won't assign
 
@TonHospel I am using the latest version of armadillo compiled from source now so it can't be that
 
meaning that every typed assignment involves a check
 
@TonHospel what is your exact compilation line?
 
@lembik: Basically you can decompose your matrix P into P = R^T * R, so x^T P x = x^T R^T R x = (R x)^T (R x)
 
4:55 PM
@NathanMerrill I can have it so the type can be on either side. e.g. Type: A = b or A = Type: b or even Type: a = Type: b. If it's on the left side the variable will be declared with an explicit type/class. If it's on the right I'll function as a constructor
 
@lembik: So this is just the L2 norm after the T transform
 
(R x)^R (R x) is there a typo there?
 
@Downgoat so, on the left, its a comment. On the right, its a constructor?
 
@lembik: In that space you add all lattice points that fall inside a shere, since the exponential quicly decays when you leave the sphere
@lembik: Yeah, fixed. I just mean transpose
 
oooh, do you allow multiple assignment?
a = b = c ?
 
4:57 PM
thanks
 
@lembik: But if you take the sphere back into the original space with T^-1 you get an ellipsoid
 
/me attempts to fix swollen ears with loud music.
 
(the n-dimensional version)
 
@TonHospel T is just transpose.. what do you mean by T^-1 ?
 
and if so, A: a = A: b = A: c does what ?
 
4:58 PM
@lembik: inverse
 
@TonHospel inverse of the transpose?
@TonHospel oh and.. can you tell me which versions of the libraries you are using please
 
No inverse of the decomposition matrix T. T transformed the original lattice into a skwed lattice in a target space where you only want lattice points inside a sphere
So taking the sphere back into the original lattice with T^-1 gives an n-dimensional ellipsoid
 
@NathanMerrill On the left, it does type-checking, defining the variable with an explicit type
 

« first day (1896 days earlier)      last day (2939 days later) »