« first day (2173 days earlier)      last day (2656 days later) » 

9:00 PM
For the most part it's quite similar except things like inheritance become implicit
which I like
 
aye... and the reason interfaces are good is because they convey intent explicitly
 
@quartata aren't structural typing and nominative typing mutually exclusive?
 
Not quite. Just depends on how you do it
 
Golang definitely compares by name
If we're talking about checking type, no two types can have the same name
 
Well yeh. But interfaces are structural typing and that's the backbone of the language really
 
9:03 PM
Interfaces check if certain methods exist, but nothing else
 
That is structural typing.
 
I thought that was duck typing?
 
No. Duck typing only checks as needed.
one method call at a time
 
oh that's awful
 
I wouldn't credit duck typing with the word "typing" in its name
 
9:04 PM
 
@quartata but only interfaces are compared that way, that's only one part of the whole type system
 
I do not want to be able to confuse an IWeasel with an IStack, even if both of them pop
 
i'm half tempted to answer the question with just this pic
 
True. But what nominative typing Go has could be treated as interfaces
 
but I'll get yelled at so I won't
 
9:05 PM
"I'd like to note that in some languages such as Haskell, + implicitly assumes that the variables are numeric, so types would not be required for a add function."
is that correct?
(meaning, did I phrase it right)
I don't know Haskell, and I want to get the terms right
 
swap 'function' for lambda, and I'd have no complaints
 
I mean
 
@quartata I guess you could technically replace all the types with interfaces and type assert to do anything, but it's certainly not what the language is for :p
 
technically that's OK but you somehow made it sound like JS
 
good grief that's serious, you'd better write it, quartata
 
9:07 PM
lol
 
can't have people comparing real languages to JS
 
not sure what about the phrasing is off but it makes me feel queasy thinking about the comparison of beautiful Haskell to JS
 
@quartata Haha, this made my day.
 
Thinking about it more you actually couldn't replace all variables with interfaces
Well not really, not do that and store any values
 
I think if you changed the title to include manifest you could just include a blurb like "Note that this does not apply to inferred languages such as Haskell where a + b automatically infers that a and b are of type Numeric"
@NathanMerrill
 
9:11 PM
I'm not convinced by this "manifest" term
is there a better description than Wikipedia somewhere sensible?
 
manifest may be the correct term, but its not an easily understood one. I'd love to add it somewhere in my description though
 
I think it's more like "this doesn't apply to languages where all not-builtin identifiers must have either a definition or import in the scope they are used, like Haskell"
 
Manifest = you always have to annotate your types
"with a few exceptions" perhaps
 
@Dennis what happens when the Jelly interpreter finds characters it doesn't recognize
 
??
 
9:13 PM
hmm... by the crude definition, (a, b) => a + b would by no means be manifest...ful?
 
tfw u forget that hitting "enter" doesn't just autofill the highlighted username you're @ing
 
@VisualMelon It still needs a cast though.
 
but actually sends the message in its entirety
 
$(".form>div>span:nth-child(1)")
Object[span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span]
$(".form>div>span:nth-child(1)").map(x => typeof(x))
Object["number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "
wtf js
 
js has the best type system I mean really
 
9:14 PM
@quartata I fail to see how this doesn't apply to type inferring languages?
 
@Zgarb Is there a shorter way to multiply all list elements with (-1) than map(*(0-1))myList?
 
@VisualMelon You would never need to cast something like that in haskell before calling. That would be gross.
 
in that instances, yeah, it would pick up it's an int
 
([][[]]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])‌​[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+‌​[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]
this is why I love javascript
 
but something along the lines of (Ocaml/F#) fun x -> [x]
 
9:16 PM
@flawr [-n|n<-myList]
 
(take the input, Stuff it in a list)
 
I think our resident birds will appreciate the awesomeness of avian flight capabilities.
Well, except maybe Mego and Tux. Poor flightless penguins...
 
@quartata better?
 
@VisualMelon That's more like an implicit generic
 
naturally it just checks the types match out when you call it
 
9:17 PM
I need a cockatiel
 
indeed
 
@NathanMerrill Link?
 
@GabrielBenamy They get stripped from the source code.
 
1
A: Untyped functions in static langauges

Nathan MerrillRequire types to be added if a method/function/operator cannot be deduced This answer only applies to languages with manifest typing. Java and C# both have the ability to define types in the definition: (int a, int b) => a + b // C# (int a, int b) -> a + b // Java This gets immensely use...

 
I'm just confused now...
 
9:18 PM
@Zgarb thanks, I hate that there is no other symbol for negative numbers.
 
I'm going to the Haskell Wikipedia article...
 
so theoretically if I wrote a Jelly script that did what it needed to do, then inserted random no-ops here and there just to make it look wild and crazy, it would still run just fine?
 
@NathanMerrill Yeah I think that's OK
 
You can do that in lots of languages I think!
 
@flawr The J/APL system is great, I wish more languages had that.
 
9:21 PM
@redstarcoder let me tell you, adding Japanese into my Perl scripts willy-nilly will cause it to fail immediately
 
@TuxCopter nonononno you're doing all wrong
archaic typeof is evil
 
what?
 
And use bind operator
 
All that talk about typing disciplines got me hungry.
 
@TuxCopter use constructor.name
 
9:22 PM
@GabrielBenamy that makes sense, they're not no-ops in Perl! Are Hiragana and Katakana no-ops in Jelly?
 
@Downgoat That's kind of gross :P You mean like 1.constructor.name?
 
Depends on what you want to do
you should only use to get object class name. Not to check if instance
 
@redstarcoder I would think so. Additionally, they are no-ops in COW, but inserting kana inside an instruction would cause the instruction not to be interpreted, so it would break the code.
 
'night
 
Night!
^^ Neat! Thanks, I haven't learned Jelly yet
 
9:23 PM
@Zgarb They'd just need to add a different symbol for negative number literals...
 
@El'endiaStarman yes it was
 
Going to try to (re?)learn Dota 2. Wish me luck lads
 
ouch
rip but gl
 
masochist
 
Basicallty.
It seems like it would be so much fun in theory.
 
9:27 PM
@mınxomaτ I've gotta say, this Sherlock episode made up for the last one
 
Oh shit I missed it.
Will watch now.
 
so I have a question for all you people who use C languages / Java / etc -- what's the difference between declaring something static vs dynamic
 
?
You mean as a typing discipline or storage modifier
 
as in public static string whatever
 
Doesn't static make it retain the value it had? So it's not really on the stack? or something (I never used it much ...)
 
9:30 PM
That varies wildly from language to language.
 
Oh that stuff in Java no idea
 
I haven't taken a CS class in 10 years
 
In C static allocates in .data as opposed to on the stack or heap
 
1
Q: Sort a string, but move duplicates to the end

Stewie GriffinIf you sort a string you'll typically get something like: ':Iaaceeefggghiiiiklllllmnnooooprrssstttttuuyyyy Yes, that was the first sentence sorted. As you can see, there are a lot of repeated characters, aa, eee, ttttt, 9 spaces and so on. If we add 128 to the ASCII-value of the fi...

 
what's the alternative, and what effective differences do they have?
 
9:31 PM
Some language use static to express persistent local data, others use this as a directive on where to store the value in the assembly, yet others use this as an attribute for immutable declarations.
 
But it's also private to that file's scope
ninjago'd
In C the corresponding is auto but that means something else in C++
 
so basically what you're saying is that all languages that recognize public static String whatever as valid syntax do entirely different things with it?
that's messed up
 
Yes.
But these languages are fundamentally different so.
 
There's also dynamic in the sense of ES4's expando, which is an object annotation that makes it mutable at runtime.
(not the contents, but the structure)
 
@GabrielBenamy Except I don't think you'll see public static string as often in other languages as you would in ones where static means "immutable"
 
9:34 PM
I am so sorry for you guys who actually use this stuff
 
static shows up all time in languages where it means class member
 
@redstarcoder Well it is commonly used to express that a class member can be called w/o an instance.
Damnit.
 
@GabrielBenamy It all blends together eventually
 
at least in java most public static things are also final
 
Wait, really?
 
9:35 PM
@GabrielBernamy It isn't really something confusing. It's not like it has different meanings within the same language
 
You can't override public static methods?
That seems wrong.
 
<-- this guy is an idiot
 
Static methods and fields can only be shadowed. Doesn't really make sense otherwise.
 
@Pavel overriding requires an instance of a class
 
@flawr Hey, map(0-)myList is even shorter.
 
9:36 PM
Still, you guys are brave
 
Now I'm off to sleep.
 
@Pavel But final means constant in this case
 
that's the point of polymorphism
 
@Zgarb d'oh, thansk!
 
I stupidly ran while('hello')console.log('hello')
 
9:37 PM
@Zgarb please add it to tips for golfing in haskell=)
 
Doesn't sound so dangerous, writing a line to stdout might as well be a sleep
 
Busy loops in JS freeze browsers usually
 
Unless it explodes your ide
I stay away from those
 
Wait, so final means 'not mutable'? I always thought it meant it can't be overridden by subclasses.
 
@quartata right, I stay away from that too
 
9:38 PM
@quartata in chrome, it just freezes one tab
 
@Pavel in Java it means both
 
I remember back in the day when stuff like that froze the browser
 
@TrojanByAccident yeah since they're actually separate processes
 
I don't use final ever.
 
Before chrome
 
9:40 PM
I subscribe to the 'it works, therefore it's good code' philosophy.
 
@MartinEnder :/ I should watch that show, seems good
 
@Pavel you'd love C
 
I thought that too.
 
Hahaha :p
 
I actually want to learn C.
 
9:41 PM
@quartata ish. The object itself is not mutable but consider a List. You are still able to modify the list even if it's declared final.
 
I don't want to use it, but I think it'll be good for me.
 
I remember when I first got into C and I had 32bit code which worked perfectly fine! Compiled with a 64bit target, explodes
 
@Poke Oh well yeah of course
 
@EᴀsᴛᴇʀʟʏIʀᴋ you should indeed :)
 
@Pavel It'd definitely something that's good to know IMO. A great learning experience too
 
9:42 PM
It's like vegetables.
 
I prefer meat
 
They taste bad, but you just know that it's good for you.
 
Hmm does C taste bad? Yeah I guess you could say that's a good comparison
 
I still cannot comprehend people not liking the taste of any vegetable at all
 
I cannot cauliflower.
Cauliflower is my kryptonite.
 
9:45 PM
Well I love lots of vegetables but I hate a lot of common favourites like mushrooms and cooked carrots
 
Mushrooms aren't vegetables
 
Spanish onions too
oh yeah I guess not
 
I think most people have aversions to broccoli/cauliflower/brussel sprouts because they don't prepare it right
 
Same sorta category though (here anyways)
 
can somebody ELI5 how to invert 3x3 matrix?
 
9:45 PM
I like 'salad vegetables' like lettuce, tomatoes, carrots, cucumbers, etc.
 
@MartinEnder I'll try to start later today/tomorrow, cool
 
Not so much all of those that quartata just named.
Also green beans.
Fuck 'em.
 
@quartata I like broccoli and cauliflower raw, but I find most vegetabled get a bad taste even when just steamed a bit
I like beans
 
Green beans don't even taste like anything
 
Beans are fine
Green beans are less so.
 
9:47 PM
But their texture is sublime
 
@redstarcoder steamed as in a pressurized pot?
 
Idk why I think greenbeans are pretty good.
@flawr idk a vegetable cooker thing
Probably pressurised
 
Are pumpkins, squashes, etc. vegetables?
 
I think fruit?
 
@redstarcoder Opposite for me: I find that raw broccoli (but not cauliflower) is too bitter and dry
 
9:49 PM
I like it with some ranch dip or something :)
 
Pumpkins make good pie, and precious little else.
OH GOD RANCH DIP IS THE WORST
 
@Pavel Pumpkin spice lattes he-lo?
 
Oh yeah
I don't think those actually contain pumpkin though
 
Ranch dip gets a solid 5/10 for me
 
Pumpkins actually have a lot of uses.
 
9:50 PM
Oh, enlighten us.
I've been trying to think of some
 
Basically anywhere where butternut squash could be used. Similar
And pumpkin seeds are the bomb
 
Hmm... ravioli maybe?
 
I want to try that ...
 
Now that I think about it, they have it at Trader Joes.
I've never had it though.
 
Guess that's in the USA?
 
9:52 PM
Oh, yeah.
 
Lame
 
I could have sworn I've seen one in Canada.
 
can somebody ELI5 how to turn a system of equations into a reduced row-echelon matrix?
 
They're everywhere here though.
 
@Pavel They could be here, I'm not around any cities though
 
9:54 PM
@EᴀsᴛᴇʀʟʏIʀᴋ ELI5 breaks down the moment you say the words 'reduce row-echelon matrix'
 
@EᴀsᴛᴇʀʟʏIʀᴋ this stuff? math.hmc.edu/calculus/tutorials/linearsystems
 
@Pavel Hahaha, yeah.
 
@redstarcoder ye
 
@EᴀsᴛᴇʀʟʏIʀᴋ apply gauss?
 
ELI5 gauss?
>_<
I have 24 hours to learn this
and then I have a test
beacuse apparently somebody thought I already knew this
@Pavel ok then
 
9:55 PM
@EᴀsᴛᴇʀʟʏIʀᴋ Turn a system of equations into a matrix, then apply any one of several algorithms (like Gaussian elimination) to turn it into its most-reduced form.
 
@flawr gaussian elimination vs gauss-jordan?
@El'endiaStarman cool, thanks
 
@EᴀsᴛᴇʀʟʏIʀᴋ that is basically the same???
 
ok then just 2 different names
thanks
 
@EᴀsᴛᴇʀʟʏIʀᴋ Do you understand both parts?
 
#1: I got that, #2: I'm still learning how to work gaussian elimination
 
9:58 PM
@EᴀsᴛᴇʀʟʏIʀᴋ here is a great example
 
you basically add/subtract the top row * <coefficent here> to the bottom?
@flawr epic, thanks
 
@EᴀsᴛᴇʀʟʏIʀᴋ to all rows below, exactly to zero the first column
 
Challenge idea: Is this matrix a reduced row-echelon matrix?
 
@flawr got it!
@redstarcoder probably done
 
rats
 
9:58 PM
@El'endiaStarman @flawr thanks for the help!
 
Main ideas of Gaussian elimination: changing the order of the rows doesn't change the solution (to the system of equations). (Neither does changing the order of the columns because that's just a renaming.) You can multiply any row by a constant other than 0 since that doesn't change the solution. You can add (or subtract) any constant multiple of one row to another row since that doesn't change the solution.
 
ahhhhh
since it's the same as multiplying any of the equations by a constant
 
@EᴀsᴛᴇʀʟʏIʀᴋ haha yup
 
I mean, maybe not dupe
checking is substantially easier than generating
 

« first day (2173 days earlier)      last day (2656 days later) »