« first day (1903 days earlier)      last day (2945 days later) » 

@cat No, I'm actually Downgoat.es6 transpiled into dist/Downgoat.js
 
Well gtg again before I get kicked off computer for another week, bai!
 
@EasterlyIrk bye!
 
@NathanMerrill The Halting Problem is much like Gödel's Incompleteness Theorems. A contradiction of some sort is derived which shows that the Halting Problem is undecidable. That is, you cannot and never can have an algorithm that, within a finite number of steps, can determine whether any program halts or not. I think it was basically "run the algorithm on itself".
 
cat
@Downgoat Oh, so can I just do npm start instead?
Bye @EasterlyIrk!
 
1:01 AM
@cat uh, well Downgoat.js uses browser JS
 
oh @QPaysTaxes did you see my smart watch message?
 
@EasterlyIrk bai :(
 
@CᴏɴᴏʀO'Bʀɪᴇɴ ikr
 
@El'endiaStarman if you have an oracle that runs in a fixed finite amount of time, then you can always determine if something halts
 
cat
@EasterlyIrk y u still here :o
 
1:02 AM
 
Oh shit bai
 
because said oracle, by definition, runs in a finite amount of time
 
@poi830 So, that's a yes?
 
yeah pretty much
 
@NathanMerrill Well yeah, but there is a way to extend this to oracles too.
 
1:03 AM
does the JS event listener have a keyReleased() event or something?
 
sure, an oracle is pretty much impossible in "programming" as we know it
 
@AshwinGupta .addEventListener("keyup", function)
 
but assuming they exist, then we could do a lot :)
 
You can invent chains of machines that become ever more powerful, and the Halting Problem is always just out of your grasp.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ i did that tho :(... LOL
 
1:04 AM
@NathanMerrill Oh yeah, they'd make P = NP.
 
ok i may have another problem
 
@AshwinGupta what's wrong?
 
lemme run through my code
 
A class is basically an object with a bunch of preset variables, right?
 
1:04 AM
i have a followup to @orlp's question
 
oh nvm. I fixed it, I just forgot to call the function.
 
@AshwinGupta +10 for using JS (are you using ES6?)
 
@Downgoat In JS, maybe?
 
does P=NP? (with proof)
 
In Python, that's not quite right.
 
1:04 AM
@Downgoat I'm expierementing
Nope using plain old JS
 
@El'endiaStarman what are they in Python?
 
I don't know ES6
 
@AshwinGupta :(
 
so yeah
 
I don't know how to make Cheddar classes
and until I make classes I can't work on very much
 
1:05 AM
@Downgoat Trying to figure that out now. Objects are instances of classes.
 
pls make it like java classes syntax
lol the JS way is KILLING me
 
@AshwinGupta ಠ_ಠ
JS class syntax is beautiful
except for constructor
 
em
^^
EXACTLY constructor...
 
I've heard the JS class system called a lot of things, but never beautiful.
 
So, in a way, yes, but it's possible to give an object variables that the class doesn't have. Depending on how you look at it, you could even say it's common for objects to have variables (attributes) that the class doesn't.
 
1:06 AM
class Animal {
    constructor(Name, Age) {
        this.Name = Name;
        this.Age = age;
    }
    Speak() { return `sdauhfuawehjfsd` }
}
that is beautiful syntax
 
@Geobits I wouldn't say beautiful, but definitely elegant
 
cat
You know what's beautiful? Lisp. Speaking of Lisp, anyone here happen to speak Racket (not Scheme)?
 
@cat @ChrisJester-Young does, I believe.
 
@El'endiaStarman So I guess classes could be like a "preset" scope which gets copied everytime a new class instance is made
 
cat
That's true! He's not active much anymore after that meta post, unfortunately
 
1:08 AM
@Downgoat You could do it that way.
Lemme find a good example where I did a class in Python.
 
Any ideas on how else would I do it?
 
python's way, java's way
 
g(a,b){return b?g(b,a%b):a;}main(n,m,M){scanf("%d",&n);for(m=M=1;(M=++m*M/g(m,M))<=n;)printf("%d ",n%m);}
2
first C golf I have done in a while
 
cat
@Downgoat I think they should be more like CLOS because CLOS is beautiful
 
1:09 AM
aka, classes have a fixed set of attributes
 
but in Python, classes are also objects of type type and you can inherit from type and make metaclasses
 
@NathanMerrill ok, that's what I was thinking
inheritance would be more... difficult...
 
ignore inheritance for now
 
but I will need to plan for it
 
1:10 AM
@Downgoat that looks fine, more like the java way then the JS way
 
but inheritance for interpreted languages means "Copy all of A's attributes, then my attributes over it"
 
Almost all of the code here is inside a class: github.com/elendiastarman/Minkolang/blob/master/…
 
so, its not hard
 
I just dislike how everything is in the "cosntructor" for JS.
 
If I had Pytek up on GitHub, that'd be a great example of inheritance.
 
1:11 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ last thing:
0
A: Shortest infinite loop producing no output

Easterly IrkFuzzy Octo Guacamole, 2 bytes () A empty infinite loop.

 
@AshwinGupta constructor is just like main or init
 
@CᴏɴᴏʀO'Bʀɪᴇɴ btw just wanted to say TY again for all your help today you've really helped me out. My questions were sorta thoes stupid little things that you cant ask on SO but you still need help with and wiithout someone there to ask it would take me forever to code this lol.
 
@AshwinGupta It's truly my pleasure :) Good luck on your project.
 
Ty lol
I'll put it on github once I've got the keylisteners in.
 
1:13 AM
        const Scope = new CheddarScope();
        for (let i = 0; i < this.Properties.length; i++) {
            let val = args.pop();
            let prop = this.Properties[i].split("?");
            if (!val && !prop[1])
                return "NOT ENOUGH ARGUMENTS";

            Scope.manage(prop[0], val);
        }

        if (args.length)
            return "TOO MANY ARGUMENTS";
the best way to error is to shout
 
Downgoat, is cheddar based off of JS, Java, or C?
 
@Downgoat because it's cheaper
 
@AshwinGupta python
more than any of those
 
oh okay
 
@AshwinGupta I've drawn a lot of inspiration for Cheddar from Swift, JavaScript, Python, and Java. Not much from C though
 
1:16 AM
didn't realize python has this and new keywords. Although, I do regonize the split() command.
@Downgoat cool. Sorta mashing together the best of all of them seems like a good way to go lol.
 
@Downgoat And J!
 
@AshwinGupta well I'd hardly call it mashing, Cheddar does bring forth things I haven't seen very many languages do.
@CᴏɴᴏʀO'Bʀɪᴇɴ no, not really
 
@Downgoat :(
bai
 
@Downgoat ?
examples?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ bye!
@NathanMerrill It is named after a cheese
I bet you haven't seen any other language do that
 
1:18 AM
-.-
 
I don't think I've seen any language mix together strong/weak typing like Cheddar
 
@Downgoat Except Pytek? :P
 
@El'endiaStarman really? :/
 
@Downgoat this is true. I have never seen another language named after a cheese. Also, I do agree, you have a very unique syntax. I was just saying that the commands and things were a mash. Like the pythons .split or the javas this keyword.
 
1:20 AM
@Downgoat what do you mean by mix? Afaik, its all weak typing
 
@Downgoat Strongly typed with a type specifier like int:, dynamically typed like Python otherwise.
 
@NathanMerrill Number: foo := 3 strictly types foo
but you can also make it a string
 
Not implemented yet, but it's in the design.
 
but Number: foo := functionThatReturnsString() doesn't ever throw an error
right?
and foo, later on, would be a string
 
@NathanMerrill It would return a runtime error. But if it's declared as a half-string, half-int, it wouldn't
 
1:22 AM
@Downgoat Ahem
 
@Geobits D:
 
?
explain "half"
meaning, you can declare it as multiple types?
 
Number?: "123" is a string but it's also a number
@QPaysTaxes I read that as onion :|
@QPaysTaxes Crystal?
 
@Downgoat so what happens if I do Number?: a := "123"; b = a+1
what's stored in b?
 
Alex isn't getting people hooked on crystal again, is he?
 
1:25 AM
it is pure number, or still half string?
 
@NathanMerrill it takes form as a number
the output would be 124 and "1231"
 
Is this a dedicated type for StringNumbers?
 
@Geobits ( @ ͜ʖ@)
 
It is a melancholy object to those who walk through this great town or travel in the country, when they see the streets, the roads, and cabin doors, crowded with beggars of the female sex, followed by three, four, or six children, all in rags and importuning every passenger for an alms. These mothers, instead of being able to work for their honest livelihood, are forced to employ all their time in strolling to beg sustenance for their helpless infants: who as they grow up either turn thieves for want of work, or leave their dear native country to fight for the Pretender in Spain, or sell th
Weird
 
@Downgoat oh, that's way messy
 
1:26 AM
@Geobits ¯\_(ツ)_/¯ still thinking about the specifics
@NathanMerrill why?
 
Was just going through pastes sequentially
 
@Downgoat a variable that stores two different types and with multiple values?
what if you do b = b + b
are we going to have 4 different values?
 
@NathanMerrill it doesn't store both values. It stores the expression and when cast to a specific types (e.g. printed) it would take evaluate as a number or a string. So if I were to do:
Number?: foo := "123"
foo += 1
print Number:foo // is 124
print String:foo // is 1231
 
Oh my word
That seems quite counterintuitive.
 
Number?: foo := "123"
foo += 1
foo2 = foo + foo
print Number: foo2 //is undefined
 
1:28 AM
-1 unreadable code
 
@Geobits why? how?
not all types are done this way
just ones with a ?
 
What use case does it ever serve?
 
I understand the usefulness of lazy evaluation
 
@Geobits an example is if you're doing a web request and the response is an integer, but you also want to be able to handle non-integer responses
 
but you shouldn't lazy evaluate types
regardless, the above is still undefined
 
1:31 AM
@NathanMerrill not all types are lazy-evaluated. Only when the type is declared with a ?
@NathanMerrill I have not thought about how that should evaluate...
 
@Downgoat I still don't understand how it would be useful there. Why not just accept a string if you might get either type?
 
GCJ round 1A tomorrow!
 
because I could be adding "1231" + "1231", "124"+ "124" or "1231"+ "124"
 
@Geobits so you're not doing this:
 
@Doorknob hurrah!
 
1:32 AM
If you want to handle non-integer responses separately, just if statement it :/
 
response = request.text // whatever
try:
  a = int(response)
catch:
  a = response
response =a
that is ugly when I could just do:
 
But then what could you possibly do with response if you don't know what it is? You have to check what it is at some point.
 
Number?: response = request.text
@Geobits it's just a way to guarantee a value being a specific type without knowing it in advance
 
If by "specific type" you mean "basically anything", then I guess so.
 
match str.parse::<i32>() {
    Ok(n) => println!("parsed as integer {}", n),
    Err(_) => println!("{} cannot be parsed as integer", str)
}
the way Rust does it
 
1:35 AM
@Doorknob yuck.
 
So if request.text is not a Number, then what? If it stays string per your pseudocode, I repeat: -1 unreadable code
 
Oh gross a decent language
 
I guess you can think of ? like a way to duck-type the variable
 
@Downgoat I personally think match is one of the more interesting features of Rust
 
Number?: foo := "123abc"
foo += 1
print Number:foo // is ???
print String:foo // is 123abc1
 
1:37 AM
@Geobits that will throw an error
 
on what line?
 
Then how could your web request example accept non-integers?
 
@NathanMerrill well I haven't thought out the details...
@quartata it looks like a switch statement looking at the docs
 
it's not
 
this isn't a detail, its fundamental to how your typing works
 
1:38 AM
It's not
ninja'd
 
@NathanMerrill it would throw an error when the type is cast
 
so, on line 3?
when you are saying "this is actually a number"
 
yeah, I guess
 
Number: foo := 123
foo += 1
print foo
 
 ClassCastException: OhFuckException on line 3
 
1:39 AM
 
when is 123+1 calculated?
 
@NathanMerrill print internally would cast to string so it would print 1231
 
what?
so the above would print 1231?
 
yeah
wait
 
please never work in that language
 
1:40 AM
did you mean Number?: foo:= 123?
 
oh
 
Number
 
then that would print 124
 
right, but when does it get calculated?
 
1:40 AM
Wait, so what if it is Number?: ?
 
@NathanMerrill when you increment foo
 
Can you print it at all without casting?
 
@Geobits fuck duck-typing
 
@Downgoat so it only lazy evaluates expressions if the type is optional?
 
@Geobits yeah. print casts to string, though I may have print use whatever the type it was declared with was
@NathanMerrill yes
I haven't fully implemented it, so if the idea is bad should I trash it now, before I waste too much time making it?
 
1:42 AM
I'm still just not sure what you'd actually use it for.
 
@Geobits whenever you aren't sure of a type
 
@Downgoat it feels worse than javascript's "123" + 1
 
@NathanMerrill that would be "1231" in both JS and Cheddar
 
I honestly can't think of a good situation where you'd want something to be possible a number or a string, even for something semi-contrived. Especially if you're then going to rely on overloaded operators like + afterwards.
 
maybe JavaScript's dumb type system is messing with my head
 
1:44 AM
@Downgoat But if Number?: foo = "123abc" throws an error, then how is that different than trying to parse an int from a string?
 
@Geobits it won't throw an error until it evaluates to a number
 
I mean, I could accept a parameter (which is unknown to me, a Number?), and when trying to debug, finally realize that my program is lazy evaluating things
there's just so many edge cases the programmer has to think about
 
In Rust, a thing that could either be a number or a string would be
enum Thing {
    Num(i32), Str(String)
}
 
@Downgoat Right, but that's the problem... I'd much rather know where a bad value was assigned, so I can fix it easier.
 
it would then be destructured via a match statement
 
1:46 AM
my main reasoning behind it was if "If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck." that way you're not testing the class the value has but it's value
 
I Can't Believe It's Not Better?
 
Sure, duck typing's fine, but if you do - or / on your Number? and it turns out your duck wasn't a duck and was in fact a string, that's just confusing
 
@Doorknob Is that like a C++ union?
 
@QPaysTaxes I figured, but it's really weird seeing brainfuck abbreviated B instead of BF :P
 
@AlexA. no, they're much more powerful
in a way, they sort of are
as in, an enum value is one of several variants
but the way variants are specified is much more complex
the Rust Book gives this example:
enum Message {
    Quit,
    ChangeColor(i32, i32, i32),
    Move { x: i32, y: i32 },
    Write(String),
}
then you could have a Message::Quit or a Message::ChangeColor(255, 255, 0) etc.
 
1:51 AM
That's interesting.
 
whoa
So how is that different from a class then?
 
^
 
a class? No such thing as a class in Rust
 
so enum == class + enum?
 
wat
 
1:52 AM
Rust.enum == NormalLanguage.class + NormalLanguage.enum?
 
not... really?
 
@Doorknob Rust has some equivalent of a class though, doesn't it? I could have sworn...
 
I'm not even sure what a "normal language enum" is. :P
 
the closest equivalent to a class is a struct
struct Foo {
    a: i32, b: String
}
then you can impl Foo to define "methods" on "class" "instances"
 
@Doorknob All those quotes are quite scary.
 
1:54 AM
should it be possible to overload the default type's operators in Cheddar?
 
impl Foo {
    fn new(s: String) { Foo { a: 10, b: s } }
    fn doStuff(&self) { println!("a is {} and b is {}", self.a, self.b); }
}
etc.
 
Oh okay
I think that's what I was thinking of
But my understanding of Rust is, of course, quite lacking
 
@QPaysTaxes really???
@QPaysTaxes yes
why?
it seems dangerous
 
@orlp With Python 3.5, you could do r=lambda n,m=2,M=1,*l:M>n and l or r(n,m+1,m*M/gcd(m,M),*l,n%m)or(0,). Also, if you're willing to use SymPy, it has an lcm builtin.
 
@QPaysTaxes because it could wreak havoc in result in semantic ambiguity
what if I overloaded + for numbers?
 
1:56 AM
@QPaysTaxes The same reason you'd mark a class final?
 
@Dennis ah, I was thinking about using numpy, but didn't find it
 
Oh, right. I missed that part ;)
 
@QPaysTaxes Like JavaScript
 
llama@llama:~$ irb
irb(main):001:0> class Fixnum; def +(x); 10; end; end
=> :+
irb(main):002:0> 1 + 1
=> 10
 
@Dennis why Python 3.5 though?
 
1:57 AM
3.5 gcd is in math
 
@orlp Python 3.4 and lower give SyntaxError: only named arguments may follow *expression.
 
(Side note)
 
@Downgoat I've never seen Javascript require a reboot (nor would I like to, for the record). I've accidentally crashed many an old computer with other languages.
 
@Geobits you can make an infintie loop with alert boxes ( ͡° ͜ʖ ͡°)
 
@Dennis ah, I tried it in Python3.4, I didn't know that was allowed in later Python versions
 
1:58 AM
Yea but I can just stop the browser process(es) then.
 
while(1)alert("pls giv bank detial and ssn to nigern princ fo 3 bilin avocads")
 
> Would you like Chrome to stop this from opening new windows?
To be fair, that's not JS's fault :P
 

« first day (1903 days earlier)      last day (2945 days later) »