« first day (2386 days earlier)      last day (2753 days later) » 

18:02
@StepHen Would you like some free rep
I'll post it, it just doesn't feel right :P
and why are you upgrading version numbers just to fix a bug? :P
hm. that's a good point. I wouldn't feel comfortable with that either xD
you don't have to if it doesn't feel right :P I can ask someone else
yeah I don't wanna
I'm working on an (unrelated) solution
I was trying to do it in Obj-C but I can't get math functions working
@ppperry then I def won't post it
18:04
ok
ah ok. it doesn't matter; it's better if I can save Proton for later :P
oh bugfix took literally 12 characters ಠ_ಠ
@HyperNeutrino still going to call it v2.0? :P
v1.0
but no, I'm merging it into the old version because it's not even really a big fix
@Okx Oh, ok
Anonymous
v1.0v2.0
18:08
Do messages about flags get flagged?
I see a lot of that
@2EZ4RTZ there was one squabble about it once that's all
Not often I think
Yeah tat is what I thought
Thanks
@HyperNeutrino why did you make them separate versions? for challenges?
18:10
mostly that.
Okx
Okx
no
@2EZ4RTZ no, I'm not going to die to tie your shoes
Okx
Okx
my life is more important than anyone else's
:P
depends on who it is. if it's a person, then no. if it's a bot, then no
Not me XD
18:11
who voted yes :o
So, it doesn't depend who it is, then
(I voted no)
Okx
Okx
yeah it does no and no are different
Well I know who not to trust with my life :P
@Okx No
Okx
Okx
because one is the opposite of yes and the other one is the opposite of the opposite of the opposite of yes
I'll probably keep a commit for the current version of cQuents, but I'm not putting both versions on TIO, the current version is crap
18:13
@isaacg heh thanks now people won't be misled anymore :p
everybody like using b~ for bitwise not and \ for two byte functions
Quick question, how do I get the length of an array in MATL?
@DanTheMan length.array.length.value.of.array
@DanTheMan MATL spec is a PDF so I can't search it :(
there's also a .tex
18:19
On matl.suever.net there's a searchable documentation thing, but when I search for length, I don't get anything relevant
n   number of elements in array / size along each dimension
    1; 1-- (1 / number of dimensions of first input)
    numel. For several outputs, or a single output other than the first, gives size along those dimensions
Thank you!
@HyperNeutrino ha that's why you hit send not enter
@DanTheMan searched for size :3
@StepHen ಠ_ಠ
\o/
well, like I predicted it's too slow to compute the second term
because my prime check doesn't stop at the sqrt
18:23
@ppperry that's ok, all the other pgms were too
@ppperry as long as, with infinite time and memory, it gives the right answer for the first 1000 inputs :P
As long as it theoretically works up to n=1000 it's fine even if it won't finish before the heat death of the universe
-request: What syntactical construct should I add to Proton next?
@DanTheMan Are you planning to solve something in MATL? I am a beginner too, so maybe can help
18:25
@ppperry and don't forget it needs to be 0-indexed
I added that already
@HyperNeutrino What are the options?
@HyperNeutrino given an element, output the number of protons
or whatever it is that make H=1, He=2, etc
and the uuus in the 100-teens
and if you really care, another function that does the same thing but does valence electrons
18:27
@HyperNeutrino Do you have ternaries?
@Mr.Xcoder idk, other than functions and classes, I can't think of things I'm missing and those will take longer
@Mr.Xcoder yes
and of cource, my bytecount has already been used
just need to add a random filler byte somewhere
@ppperry add some padding :P
@HyperNeutrino Maybe something like closures?
@HyperNeutrino Try-catch
18:28
what are those?
@BusinessCat done
@Mr.Xcoder as of yesterday he didn't have scope :P
:P that was easy k
@HyperNeutrino Let me write an example
all I needed to do was deepcopy my scope and merge existing globals back in
Can't do closures without functions
18:28
@HyperNeutrino if you use a local var inside a local function, that is called after you leave the outside function, the local var still has a value
How about the next sequence being a simple recursive formula.
you can only have closures if you have nested functions iirc
@HyperNeutrino Do you have functions? If you don't, you cannot have closures
In programming languages, closures (also lexical closures or function closures) are techniques for implementing lexically scoped name binding in languages with first-class functions. Operationally, a closure is a record storing a function together with an environment: a mapping associating each free variable of the function (variables that are used locally, but defined in an enclosing scope) with the value or reference to which the name was bound when the closure was created. A closure—unlike a plain function—allows the function to access those captured variables through the closure's copies of...
@HyperNeutrino Remember your problem with Ceres where you had to change it to have a function generate the function for an operator? That's a closure
@BusinessCat huh what do you mean?
18:30
I think it was with Ceres
if you've done javascript async stuff, it's what lets async event handlers still reference vars in the same scope as them
You mean something that will make a function that does the same thing as an operator?
@HyperNeutrino no
@HyperNeutrino Like function(5)(1)
For example:
@Mr.Xcoder that's currying?
18:31
yeah I don't think that's closure, that's currying
@StepHen Not talking about js specifically
that's not what closures are though
@HyperNeutrino Let me write an example
I don't think
I have a thing that takes an operator and makes a function from it
(+)(1, 2) is equivalent to 1 + 2
1 & (+) is equivalent to (1).__add__
(+)(1, 2) is equivalent to 1 + 2
Oh yeah I essentially have those
There's more you can do with them than what I just did though
I'd just do (3 & (+))(2)
0
A: One OEIS after another

ppperry98. Befunge-98 (PyFunge), 153 bytes, A001772 &v >1 >1+:00g\%kvv>1\>1-\2*\:kvv # vw\-1g00: < >$v ^ < $ >0p^ >$01g1-:01v> #> > 1+vv-1*b< ^>1+01p ^ ^: <>0 >p k^.@zz Try it online! The two zs after the @ are nop's that never get executed but I added in the make...

18:32
posted the next answer
I chose to undelete my previous deleted answer for this number
because it used a similar program
function starting(value):
 function add(value2):
  return value+value2
 return add

var closure = starting(value: 3) // This is a closure
(it wasn't that hard to convert code from ><> to Befunge)
@HyperNeutrino ^^
so essentially currying?
18:34
cQuents for this next one: =0,1$0:nz+(n-2)^y
@HyperNeutrino Now you can call the closure with closure(value2: 4) // 7. Essentially like this: starting(value:3)(value2:4). Exactly like currying.
well once I have functions I can just do that the way you did it
This is what closures mean in JS: Try it online!
at least practically
@HyperNeutrino Do you have structs?
The main idea to closures is that the function constructed inside is always in the scope of its parent function, even after that function is gone from the stack
18:35
I don't really even know what structs are
@HyperNeutrino classes with no methods? I think
structs are just worse classes
@BusinessCat Ah okay. I'll make functions and see if that ends up working
@BusinessCat well then I won't need them :P
@HyperNeutrino Nevermind, too similar to classes, but they don't have the capability to hold methods.
@HyperNeutrino and at least in JS, local vars inside the parent function are still in scope when the child function is called
18:36
@HyperNeutrino enumerations? (Let me give you an example again)
    class Person{
        init(name:String,personType:PersonType)
    }

     enumeration PersonType{

     case Worker
     case Teacher
     case Driver
     case Programmer

    }

    let Alexander = Person(name: "Alex", personType: Person.Programmer)
@Mr.Xcoder that's basically a struct though
which is basically a class
@StepHen Nooo
It's not
oh wait I see
I don't know how things are called in JS...
JS doesn't have them, but I understand what's going on
it's like a Python dict, but you get instances from inside or something like that
18:39
I've never totally understood enums
@HyperNeutrino @BusinessCat ^^^^^^^ (edited)
Oh enums. I know those (Java)
so it's like a set of options to chose from
@HyperNeutrino Do you have those?
@StepHen yeah
that are named separately and that have a name for the group too
18:40
Basically it's a type that limits the possible values
@StepHen yes, PersonType in this case.
@BusinessCat True
@Mr.Xcoder nope. I might add them sometime
@HyperNeutrino Also, do you have switch(){} statements?
hm. no I don't
Maybe add those too
18:42
@Mr.Xcoder switches are basically if/else if/elses
I forgot about those cuz Python doesn't have those :P But sure, I might add those sometime
Trying to find more things
anonymous funcs
those will come with functions
@StepHen Yes, but are more appropriate in some many cases
18:43
@Mr.Xcoder not really, the need for break; usually makes ifs better
unless you want fallthroughs
@StepHen Yes ^
@HyperNeutrino then you just do an if with a condition
true
also loops don't have break or continue yet; I should add those
and it's shorter and makes more sense
at least most switches, because their cases don't have conditions
switch-case actually turn to assembly if-statements in all the programming languages I know
Another thing I added is 1 and 2 in [1, 2, 3] is equivalent to 1 in [1, 2, 3] and 2 in [1, 2, 3]; I think that might turn out to be useful
@HyperNeutrino Do you have multiple assignment?
like a, b = 1, 2?
@HyperNeutrino Yeah, or a = b = 1
18:45
or a = b = 1?
I have both.
Ninja'd
well (a = 1) returns the value
@HyperNeutrino Oh, do you have map/filter/reduce?
18:46
@HyperNeutrino wait, can I do if (a=True):?
@Mr.Xcoder If it's in dir(builtins) then I have it
@StepHen yes (but it's if a = 1 {})
it's like python with braces
@HyperNeutrino sweet
Is it on tio?
It is
@HyperNeutrino I thought python was supposed to be better C langs without braces
@HyperNeutrino How should one take input?
well proton is worse better C langs without braces with braces
@Mr.Xcoder input()
@StepHen See my profile pic
Wow
18:47
@Mr.Xcoder it's basically python
1 min ago, by HyperNeutrino
@Mr.Xcoder If it's in dir(builtins) then I have it
BYE
(gotta Cthulhu)
brain-flak code always seems shorter than I would imagine considering it's a tarpit with only 8 commands. :P

« first day (2386 days earlier)      last day (2753 days later) »