« first day (2012 days earlier)      last day (2929 days later) » 

7:01 PM
@rlemon Thanks :-)
 
@SterlingArcher imgur.com/a/ITY5T
 
@bwoebi makes sense. It still sort of feels like major language features were basically mapped to engine opcodes 1 to 1. even file inclusion has a single opcode :P
 
7:21 PM
@AwalGarg it's true and but for a large part that's performance. Imagine PHP's famous weak casting doing actual checks for everything … we'd end up with tons of individual ===, type fetches, loops etc.
 
Automatic downcasts are the root of many bugs
 
I think I finally figured out how to into webpack maybe?
 
each interpreted opcode has function call overhead, opcode position increment as very basic necessity. Then fetches from the VM stack to get the temporary variables … with direct C code you do the overhead once per feature (basically) and use registers for most variables
 
:30040331 Possibly noob inference, but isn't this just shifting those to the engine itself? nvm
ohhhh
 
can I just say that ES6 is a beautiful beautiful thing
 
7:26 PM
@bwoebi good to know, thanks!
 
@SimonSarris yes, and hi
 
@JanDvorak the most problematic ones are comparisons within a type … "0e1" == "0e123" ...
 
That's not problematic. That's just plain stupid.
 
That show is amazing.
Watched them all.
 
with int and string, it typically very much is expected and rarely (in my experience) source of bugs.
 
7:28 PM
Thanks @ndugger
 
@JanDvorak it is and should be fixed...
 
Yes, but how?
 
> I intentionally avoided reddit my whole life before this year, and in the past 24 hours my contributions include this thread and a post about tree jizz.
 
@JanDvorak by having "0e1" != "0e123" in some future PHP version? Needs a RFC obviously, but doable, I think.
 
7:30 PM
That's a breaking change.
 
@JanDvorak Yes, it is. Do you ever have seen PHP code relying on scientific notation comparisons inside strings?
 
In Haskell you have a strict definition that elements that are == to each other should be interchangeable in every aspect
 
makes sense, but doing that in PHP now would be a bit too much of a BC break sadly
 
if you want to check for numeric equality of strings in Haskell, you do (read a :: Double) == (read b :: double)
You can also omit one of the type declarations, but not both.
In Ruby it's a.to_f == b.to_f
 
@JanDvorak exactly my point … that needs to be changed
 
7:35 PM
In Haskell if you try a + b with a, b being strings, it just shouts at you that a and be are not numbers.
a ++ b is concatenation. And it works for all lists, not just strings.
 
@JanDvorak well, that one is allowed in PHP, but thank god we don't have addition overloaded with string concatenation.
 
no way, "1" + 1 === "11" makes perfect sense.
 
@rlemon yeah, totally… :x
 
yea
 
7:36 PM
so does this:
 
makes sense and yet it's a breeding ground for bugs
 
!!> [1,2,3] + [,4,5,6,7]
 
@rlemon "1,2,3,4,5,6,7"
 
No, that's just stupid
 
@JanDvorak you can make sense of everything with an explanation … but it makes no sense to define semantics in that way…
 
7:37 PM
@bwoebi why is that (that specific overloading, i.e.) bad?
 
@JanDvorak Why are you hating on bugs?
 
@AwalGarg it's not, really
 
@rlemon "1" + 1 === 2 also makes perfect sense, depending on the situation
 
it makes just as much sense. if you wanna call .toString on everything, at least be consistent
 
I mean, adding a string to number or number to string should throw. but adding string to string resulting in concatenation sounds good to me.
 
7:38 PM
the larger inconsistency is the problem
 
+ serving for addition and concatenation is probably the bigger issue.
 
@AwalGarg adding something to a string doesn't need to throw
 
@AwalGarg IMO when types are dynamic, and scalars easily implicitly castable between each other, you shouldn't overload operations between scalars.
 
having two operators would be nice I suppose
 
@KendallFrey Why should the language choose for you? Either you want read a + b or a ++ show b.
 
7:39 PM
In Haskell you don't have a choice. One operator only means one thing.
 
having a string operator +(lh: {toString: string}) makes perfect sense
 
@JanDvorak you're asking it to decide by not casting yourself.
 
@KendallFrey and that's great.
 
@JanDvorak it shouldn't, that's my point
 
you can cat anything with a toString method onto a string
 
7:39 PM
just because it isn't strictly typed doesn't mean it is wrong.
 
@bwoebi yeah but people who write dynamic languages want their code to be as short as possible at all costs :P
 
one of the worst things in C++ is really that bullshit userdefined operator overloading…
 
@rlemon the only safe choice is to have you choose
 
@rlemon Good languages don't decide things for you, they barf everywhere at the first opportunity.
 
@ssube but it would be nice to have a dedicated concatenation operator
49 secs ago, by rlemon
just because it isn't strictly typed doesn't mean it is wrong.
 
7:40 PM
and yet a period isn't a good choice for a concatenation operator
 
maybe not right for you, but I wouldn't say it is wrong.
 
@bwoebi It's really fucking useful in languages that don't let you define your own operators
 
@JanDvorak this.
 
@rlemon I'd rather not. Operator overloading is fine when it matches the original use's semantics.
 
@KendallFrey I've never missed it.
 
7:41 PM
@JanDvorak Is there anything a period is a good choice for?
 
@KendallFrey apparently property access.
 
^ by tradition
 
still makes no sense that way
 
What do people here think of Go?
 
^^^^. Would kill to have . instead of -> in PHP for that.
 
7:41 PM
It makes sense to me
 
@KendallFrey sure it does, that's how you indicate items in a list
 
I've thought about having slashes as property accessors before
 
The only thing I can think of that's not arbitrary is statement terminator, due to its use in English
 
foo/bar/biz/baz
 
7:42 PM
by tradition, property access. Otherwise, function composition seems fine.
 
1.a.i.14.Z.iv
 
could be neat
 
@rlemon but it conflicts with math :\
 
@AwalGarg I just can note that -> is more explicitly hinting at the relation character of property access...
 
@rlemon taken by division
 
7:42 PM
@rlemon Reading this, that sounds fucking insane
@rlemon Reading this, it makes so much sense.
 
@ssube and ... concatenation doesn't ? :P
 
you could use % for division, but then you lose modulo
 
@rlemon cat is addition of a sort
 
@JanDvorak just use a keyword mod :-D
 
@JanDvorak just use a different symbol
 
7:43 PM
inconsistent
 
@bwoebi lol
 
(gaaah, now I'm proposing Pascal-like notation)
 
@JanDvorak Who on Earth uses modulo?
 
@Zirak students
 
@ssube debatable
 
7:43 PM
That and all bit shift operators can be functions and nobody would bat an eye
 
^
 
@Zirak graphics
graphics uses mod pretty heavily
 
Math.mod
 
What I want to know is who uses modulo and ever wants a negative result?
 
@rlemon that would mean something else
 
7:44 PM
And so does crypto, which basically puts it on the terms of "nearly nobody"
 
@littlepootis yes, poor naming
 
@Zirak if you do crypto or en/decoding, you'll loudly complain though
 
modulo is a must for all these people in schools writing a program to identify if a number is odd or even
 
Haskell has .|., .^. and .&. for bitwise operators
 
So you'll complain a bit writing your library and then you'll forget everything about it.
 
7:45 PM
modulo is important for FizzBuzz
 
@JanDvorak are these smilies? (sorry)
 
interviews will never be the same
!!!!
 
Because that's something you, and that means a person writing real software used by people, never use.
 
!!afk
 
Ah, Haskell, where &^-->=& is a valid operator
 
7:46 PM
@rlemon you can just check whether the rounded result is equal to the result
 
I sure use modulo in my code
 
Bit shifts and other bitwise operators (and modulo) were important in C because of pointer arithmetic, but elsewhere they're stashed away in libraries.
@JanDvorak ...where?
 
anything with currency or dates will use mod
 
JS needs ruby-grade meta programming features so people can write their own languages instead of style guides.
 
modulo is kind of a big deal, bit twiddling operators less so
 
7:47 PM
i didn't have seen use cases for modulo in dates
 
And you really should be doing currency-related things in js
 
@littlepootis that is the exact opposite of what any language should ever have
 
@littlepootis es6 proxies+reflect + sweetjs macros
 
@Zirak github.com/amphp/aerys/blob/master/lib/HPack.php#L93 (PHP though, but doesn't matter)
 
And date handling is in libraries
 
7:47 PM
@Zirak showing it to the user?
 
@Zirak extracting a column index from an array index (you can argue bad design but still)
 
@ssube Where do you use modulo for that?
@JanDvorak So exactly once in a blue moon. Doesn't need an operator.
 
@littlepootis DSLs are slightly behind regex for problems ever solved, and regex is sitting at 0
 
@AwalGarg holy drugs!
 
Nothing does, even addition
 
7:48 PM
How many people think we need dimensional numbers in general-purpose languages?
This is something I want
 
> stashed away in libraries.
 
Ruby comes close
 
3 mins ago, by Zirak
Because that's something you, and that means a person writing real software used by people, never use.
 
1.second #=> TimeInterval
 
@Zirak sure, front-end code rarely does need modulo or bitshifts…
 
7:49 PM
Let's invent more symbols
 
To the Haskellmobile!
 
@littlepootis unicode is full of them.
 
@JanDvorak C++ has that
 
@bwoebi Not just front end. I don't remember the last time I used a modulo that wasn't later thrown away into the library portions of my code.
 
@littlepootis not holy. I like sweetjs but it won't work IRL until it integrates well with the transpiler (which is (un)fortunately de-facto babel now). and frankly ast modification libs just provide more liberty.
 
7:50 PM
@JanDvorak Does it work with other dimensions?
 
@KendallFrey Doesn't C# have a lot of that?
 
no, nothing at all
 
@KendallFrey You are technically able to write a library that makes it so :-D
 
@Zirak (with front-end, I also mean the API serving code; back-end is rather the code which the API servers communicate with)
 
@Zirak it just has a much-better-than-average math package
 
7:51 PM
@JanDvorak Yeah, but it's not too helpful unless the stdlib itself enforces it
@ssube I wouldn't say much
 
bliggle :-Z
 
@KendallFrey you can make runtime checks for sure.
 
@bwoebi I've written lots of native code and networking code lately, and I didn't use any modulo there either
 
@JanDvorak not if you're not the author of the stdlib
 
I did use it when doing pointer arithmetic. Which you don't ever do in anywhere that isn't C and friends.
 
7:51 PM
@Zirak but bitshifts?
 
@KendallFrey compared to JS or Ruby or any of the gateway languages the kids are getting naked and rubbing on each other?
 
@Zirak what do you need modulo for in pointer arithmetic?
 
@bwoebi Still thrown into my library
 
@ssube I can't even think of something C# has in Math that JS doesn't
 
we need bigger keyboards with more symbol keys ^_^
 
7:52 PM
If you mean more advanced stuff like bignum and complex numbers, then sure
 
@bwoebi Wrapping, finding out how many of something can fit into something else, etc
 
@KendallFrey tons of variants of a logarithm?
 
but those are pretty easy to create
 
@KendallFrey yeah
 
Have a question (of course); login page hits the database and credentials check out, redirect them to user page. On this page should I load in the data, or should I load that data when I checked their credentials and pass it to the user page while redirecting?
 
7:53 PM
 
@JanDvorak why would you even want more than two?
 
@KendallFrey base-2, natural, base-10, two-argument
 
I think I have to load their data once they arrive on the user page because I don't understand how you pass data AND redirect at the same time. I thought about putting it into the URL, but there is quite a bit.
 
@Zirak then you don't do pointer arithmetic correctly
 
@KendallFrey graphics
 
7:54 PM
I never need modulo with pointer arithmetic
 
ln is enough to do everything with logs, log10 is just a convenience, log2 might rarely be used, and logn is also just a convenience every once in a while
 
you have log, log10, and log2 on the card
 
@bwoebi I overspoke when saying "pointer arithmetic"
 
When would log2 even be used?
 
a log function with a variable second argument would be way too slow
 
7:55 PM
Anyone else feels the F<n> keys row on the top of your keyboard is a mistake? I don't understand what purpose they serve. If it is just keyboard shortcuts, then holy smokes whoever thought of it must have been severely stupid.
 
A flooring log2 of a float is super-fast
 
Modulo is important there with memory stuff
 
@ssube why? It would be maximum 2x slower than a single log
 
@AwalGarg I use them frequently
 
@KendallFrey light curves
 
7:55 PM
huh
 
@littlepootis you don't matter. (what for, anyways?)
 
@KendallFrey what?
 
Wait, the function keys?
 
many of the math functions built into GPUs use a lookup table to estimate the value, rather than actually calculating it
 
@Zirak for memory managers maybe (not even there), but for not for pointer arithmetic
 
7:56 PM
You're right since wrapping is just addr+ptype
 
@ssube logX(a) == ln(a) / ln(X)
 
you can't just have arbitrary stuff, since you can't loop (as such)
 
@AwalGarg virtual terminals?
and they're programmable. So, you can use them for anything
 
@KendallFrey too many keystrokes
 
@bwoebi You clearly missed the context
 
7:57 PM
and too many people not even having an idea of basic log identities
 
@KendallFrey log2 is a sufficiently useful curve that it's in the hardware
 
What's better design, loading data once arriving to page, or sending data with page request?
 
@littlepootis you are among the few rare people who use vts in 2016. and what is specially programmable about those keys different from any other key?
 
@Waxi both
 
@KendallFrey woops, sorry
 
7:58 PM
@ssube Please explain.
 
@Waxi preload some data and deliver it within the page body, but not too much.
 
@AwalGarg tmux + vt = <3
the other keys are taken
 
@KendallFrey so, all of these functions are built into hardware, to some extent
 
@bwoebi btw, some days ago I discovered something that blew me away. Windows has a macro called CONTAINING_RECORD (which is apparently standardised as container_of) which looks like: offsetof(member_ptr, struct_or_union, member_name) == addr_of_struct
 
very few do the actual full math
 
7:59 PM
 

« first day (2012 days earlier)      last day (2929 days later) »