« first day (2049 days earlier)      last day (2914 days later) » 

11:02 AM
Can someone please help me with stackoverflow.com/questions/37456685/…
 
11:13 AM
@doug65536 now iam not able to route to the other pages also
partials is a sub folder of public
 
Knu
11:27 AM
@doug65536 how would you shorten a = 'string' + a; then?
 
Remove the spaces :-)
 
Knu
you know what I mean :)
maybe I could change the meaning of of -= if both operands are strings
'string' += a; looks silly but wouldn't require much work to be added
 
@Knu there is no operator overloading. are you talking about javascript?
 
Knu
oh you didn't read the full conversation
@doug65536 no I am talking about a macro
 
+<=
 
Knu
11:34 AM
is that from another language?
 
mutability, ew
 
(+<=) :: IORef String -> String -> IO ()
 
Knu
why would you choose +<=?
 
@JanDvorak Please tell me that isn't a real thing
 
It isn't a real thing.
But it could be :-D
 
11:37 AM
@Knu a macro in what language? some templating engine?
there are no macros in js
 
Knu
js
don't you know sweet?
 
(*=) :: Num a => IORef a -> a -> IO()
x *= y = modifyIORef x $ \x -> x * y
 
'string' += a is not possible because 'string' is not an lvalue
 
Knu
of course
if you had the need to add a shorthand for that use case
what would you add?
 
@JanDvorak what syntax is that ->? I'm not familiar with it
 
11:40 AM
But really, what's next? Do we get 1 /= x for x = 1 / x?
 
it's fast to push a bunch of string fragments to an array and .join it, particularly if the result is a really long string
 
@KendallFrey better?
 
@Knu it exists already. The operator is +
 
@JanDvorak yes, much
 
Knu
@JanDvorak it's only for concatenation (in my case)
 
11:41 AM
@Neil that's not shorthand
 
+= usually has to make a whole new string, first copying the old value into it, then appending the appended value. that gets slow when the string gets long
 
@JanDvorak but pointfreedom ftw
 
@KendallFrey Why not expand that for non-commutative operators?
 
modifyIORef x $ (*y)
 
join lets the string fragments sit where they are until one big append
 
11:42 AM
@KendallFrey oy, right. But we need to go deeper :-D
 
@JanDvorak Expand what? string concatenation is non-commutative already
 
Knu
going functional then uh
interesting
 
1 /= x
true ^= bFoo
 
what is 1/0?
 
Infinity
 
11:45 AM
@Neoares 17
 
and 2/0?
 
@JanDvorak (*=) = swap $ swap modifyIORef . (*)
or something
 
type FastString = String -> String
foo = ("concatenation is slow" ++)
 
@Neoares 34, duh
 
then 1=2?
 
11:46 AM
@Neoares undefined, by definition
2
 
@Neil yeah, it is 17. 17*0 = 0, therefore, correct
 
@doug65536 yep
 
@KendallFrey and 0^0 ?
I liked the "undefined, by definition"
 
!!> 0^0
 
@doug65536 !== 1, therefore false.
 
11:47 AM
@JanDvorak 0
 
@JanDvorak ^ operator is bitwise
 
@JanDvorak ^ isn't the power operator
 
Isn't that what you asked?
 
!!> 4^4
 
@Neoares 0
 
11:47 AM
@KendallFrey still a nice troll
 
well, I asked 0 to the power of 0 xD
 
!!> 3^2 + 4^2 == 5^2
 
@JanDvorak 7
 
!!> Math.pow(0,0)
 
@littlepootis 1
 
11:48 AM
um, what?
 
> Math.pow(0,0) returns 1
 
@JanDvorak ^ outside of comp sci circles means "to the power of" ;)
 
> By definition
 
but 0 to the power of anything is 0 :S
 
@Neoares uh, no
 
11:48 AM
Anything to the power zero is one.
 
@littlepootis yes
 
@Neoares A quick google says that it's not undefined, but indeterminate
 
@Neoares no. "to the power of zero" amounts to "how many ways can I arrange zero items." there is one way
 
@KendallFrey yas that is still better
 
Intuitively it's 1
 
11:49 AM
well 0 to the power of 7 is 0
 
The truly interesting value is 0/0
 
0^4 = 0
 
Depends on from which side you approach it.
 
etc
 
Try 0^-1
 
11:50 AM
@JanDvorak neither side approaches 1
 
@JanDvorak that happens with x/0
could be Infinity or -Infinity
 
unless by side you mean operand
 
@Neoares You're walking along a branch discontinuity of x/y :: Real
 
x^y = no. of ways you can arrange x distinct repeating things in y spaces.
 
Depends if we're talking mathematics or programming now
 
11:51 AM
@littlepootis huh what?
 
@littlepootis no
 
1/Math.pow(49, -1) -> 49
 
Knu
surely there's a precedent in another language
 
#banZero
 
11:52 AM
is 0 a number?
 
@KendallFrey why
 
Knu
s = 'string' + s seems pretty common
 
@Neoares now you're just trolling
 
@littlepootis because it's just completely wrong
@Neoares It's an imaginary number
 
@Neil no, he's right. What is even a number?
 
11:52 AM
It's a concept I guess
 
Math.pow(49, 1/2) -> 7
 
@KendallFrey uhm, not the bitwise operator..
 
Math.log(49) / Math.log(2) -> 5.6 (base 2 log of 49)
 
@littlepootis neither the power operator
3^3 is 27, where by your definition it would be 6
you described permutations
 
Math.pow(2, 5.614709844115208) -> 49.00000000000001 lol
 
11:55 AM
@JanDvorak meh, I need more coffee for this
 
!!s/coffee/drugs/
 
@KendallFrey ah, yes. My English sucks.
 
!!> 0.1 + 0.2
 
@JanDvorak 0.30000000000000004
@Neoares @JanDvorak meh, I need more drugs for this (source)
 
Who needs decimals? I've got some extra!
 
11:57 AM
If 2/9 is .2222 5/9 is .5555, why isn't 9/9 .99999?
 
It is
 
*hides*
 
!!> 0.1 + 0.1 + 100000000000000000 - 100000000000000000
 
@doug65536 0
 
Knu
Ill pick 'string' += s; for now
readable and easy to implement
 
11:58 AM
That's an ill pick
readable? Heh, no.
 
Knu
propose something better then
 
s = 'string' + s
 
Knu
:)
 
<+=
 
11:59 AM
:)
 
Knu
again why @JanDvorak?
 
@JanDvorak $$<=¤[]》
 
Knu
it's too hard to implement =+
 
It's also a bad idea
 
12:00 PM
use +=
 
@JanDvorak that could be misinterpreted
 
What error message will you give if someone does expr += expr?
 
@JanDvorak I would say "invalid assignment to an expression, an lvalue is required'
 
Knu
right
 
@JanDvorak just infinite loop
 
12:01 PM
I took expr completely literally
 
OK, what will you do if there's an lvalue on both sides?
 
Knu
no errors
 
all lvalues are rvalues, so it is okay
 
foo += bar is ambiguous.
 
Knu
since it would be enabled only for string literals
not identifiers
 
12:02 PM
brick = brick/2 + 1
 
bad idea
 
division by 2 is exact, it decrements the exponent
 
Jan uses Iterate Until Stable. It's super-effective.
 
if you want to learn about floating point, learn verilog or something and make an actual fpu. IEEE-754 is a lot simpler than it looks
 
It's not.
 
12:04 PM
I have implemented FPU pipelines. it really isn't
about the hardest thing you do is scan for the highest set bit and tweak the exponent
 
verilog?
seriously?
 
yeah why?
 
@doug65536 with a name like IEEE-754, it's got to be easy
 
@doug65536 That's if you can afford the extra precision
 
seriously, it isn't as bad as they make it out to be
 
12:06 PM
My dog is named IEEE-588780 afterall
 
and it is more exact than most people think. double can represent all integers from -2^53 to 2^53 exactly
addition of fractions is where it deviates from perfect, because we use base 10 and floating point uses base 2
multiplication is particularly accurate
 
Von Neumann was against the idea of using floats entirely
 
addition is the worst, it is prone to precision loss if one has a significantly different exponent
 
I can't say I agree, but I can certainly see where he was coming from
 
Knu
no one does +'string' anyway since it's NaN
 
12:09 PM
@doug65536 not really, since you don't lose any significant digits
 
Knu
so it's moot
 
1/3 is 0.1 in base 3, exactly
 
@Knu not always
@doug65536 #factoradicFTW
 
Knu
a =+ 'string'; is fine
 
Knu
12:11 PM
you just need to check id vs literal
 
Knu
at least it's more elegant than the alternative with assignment on the right
 
that's like saying I'd rather stub my toe than have it pinched by a door
 
Knu
@littlepootis you don't know what I am talking about :)
 
12:13 PM
I miss one thing in perl: doSomething() or die('Uh oh');
or die amused me to no end :)
 
@doug65536 You can do it with ||
 
PHP has that too
 
@Knu The amount of time you wasted on this is greater than the amount of time you would have wasted on reading and writing the longer syntax.
 
And you can't do that with || in PHP afaik
 
another neat perl thing: doSomething() if ($someCondition);
 
12:14 PM
I saw an article of this guy who claims to have found a revolutionary new way to deal with 3 state bits. I read that and thought, "good luck with that..."
 
backwards, but rolls off the tongue
that's old-perl. no idea of that works anymore since perl 5
 
Use Ruby
Both perlisms work there
 
And a lot more
 
hell, even if /regex/ does
 
@Neil I remember hearing about some really early machine that tried to use 3-state logic. Most likely +5V GND -5V
 
12:17 PM
def isParens x; x = x.dup; nil while x.gsub! "()", ""; x end
 
Hi cuties :)
 
@doug65536 probably. That may even be a decent idea, but there would be so much to go against before it could be used practically
 
is someone able to tell the difference between "scalability of server" (hardware: adding physical machines) and "resolve huge loads" (software: using workers to utilize multi-core CPU) in one sentence?
 
@Neil Yes. Rethink all CMOS logic.
 
i hate writing reports
 
12:20 PM
It couldn't just be a hardware issue either. You'd have to rewrite programs
 
scalability refers to a servers ability to handle 2x the load without using more than 2x the resources.
sometimes it is even an exponent < 1, so as load increases linearly, resource usage goes up slower and slower
you'll hit a practical limit, like not being able to send any more packets per second because of congestion
 
@KarelG you can resolve huge loads and still have a program that scales badly
 
sometimes perf is great until you hit "the knee", which is the load where scalability goes off a cliff and resource usage skyrockets
 
Well most of the time there is a certain point where you might start bottlenecking on something such a CPU power, disk write speed, RAM
 
bottlenecks cause it. say some lock serializes something and it can only do something for one connection at a time. it's fine until lock_duration*clients > N, at which point, clients start to queue up waiting for a thing
 
12:26 PM
Does anyone know btw if it's possible to limit caching with node?
Also does anyone have a decent alternative to Postman? I only got a 30gb partition for my Linux install, and it's taking up 11.1gb in IndexedDB after 30 mins
Crashed my laptop like 10 times this week
 
I've never seen postman go crazy, ever
 
Well it does
 
what is in the 11GB? did you peek at it?
 
Ehh this path
Or sec I'll blow it up for a bit so I can peek what's in it
So basically I just start Postman and send some Get requests to my node.js server
The reponse is like a 400x400 image
 
hexdump -C some_file | less and pagedown through it. it might be something you recognize filling it
 
12:34 PM
Well I can see that it's basically the history of requests
Especially things like post requests where the body contains 100 files
Seems to do something in the indexedDB
Like I googled and I never saw any1 have this issue before tho
 
oh postman as in rest testing client postman
you can hit f12 and pick the resources tab, with postman open, and you should be able to clear/browse the local storage there (assuming chrome)
 
It's like a seperate screen extension not an inbrowser one
Although it's a chrome extension if that makes sense to you
 
yeah I know. I've used it
it must be storing all the responses and everything, for the size to be that crazy
 
Yeah also the request
Like it's sending it to a image resizer basically so often it passes alot of images
But the response for the POST requests (where the requests are massive) is only the text 0 file(s) have been uploaded with a total size of 0.00MB for example
The path is home/<user>/.config/google-chrome/default/storage/ext/<randomletters>/def/Indexe‌​dDB/chromep-extension_<randomletters>/1/<tons of folders named 01-02-03-04 etc>
And that "1" is the massive folder
Oh holy shit
It saves every file I send in my request
For every single request, even if it was the same request
~100mb per request
 
@StrahBehry superuser.com/questions/298922/… <-- if you really are tired of it, you can kill localstorage functionality altogether
might not work for an extension, but might
 
12:51 PM
guys meteor is lame :|
 
Thanks Doug I tried it
But that doesn't work for extensions Google basically says
Extension are things Google does not own, so they don't do anything with it
I tried blocking [*.]localhost
 
@SterlingArcher I did 2 miles yesterday. I'm gonna go again today, though I have to go shopping after work today, so I'm not sure when I'll actually get time.
 
take every isle 4 times
just for the steps
shop while you drop... the pounds
 
Try rowing on an ergo!
 
One of the exercises that my PT had me do was to row against my own body weight. that was pretty cool.
I love the idea of weight training against your body
 
12:56 PM
@doug65536 I changed the permissions in that folder to read for even the root so Postman can't write anything there
 
@StrahBehry that should work
 
Think this is worth trying to bring to the attention of the Postman developers?
 
@StrahBehry you already looked hard for an option to not save that stuff? I'd be disappointed if they forgot
you can't be the first person to have big responses in there
 
That's it, and data is about either restoring a backup or creating a data dump
 

« first day (2049 days earlier)      last day (2914 days later) »