« first day (1611 days earlier)      last day (3344 days later) » 

11:00 AM
@ParkYoung-Bae It wouldn’t have happened in Rust.
 
@Rapptz What's the deal with egoraptor
 
His videos used to be funny
Those were good times.
 
I only know a couple
 
I don't even know who he is.
 
Rust would know who he is.
 
11:01 AM
I probably watched some of his videos if he's a content creator, but I don't associate with the brand at all.
 
@ScarletAmaranth as far as I went in D, i.e. defining a function which parameters depend on a format string. The function doesn’t do anything useful.
 
Egoraptor is from Newgrounds.
It's from before your time, dw.
 
@Rapptz lol
 
aaah fuck it I’ll try it in Haskell it is a Sunday after all
 
And so the day was ruined
 
11:04 AM
Don't forget to go to church to confess your sins.
 
Can I link a .o that uses libc++ with one that uses libstdc++?
 
@sbi s/sacking/sagging/ #hth
 
@ParkYoung-Bae Never tried it, but that doesn’t sound wrong per se.
mmmmh looking a bit at the symbols they are not namespaced actually :/
 
libc++ uses different namespaces though
 
righto
I was looking at my GCC-produced object files
 
11:10 AM
@Rapptz I have no idea what it was about.
 
Do you guys know of a simple C++11 single-header arbitrary precision integer implementation? Doesn't have to be fast, just small and self contained.
 
I have one.
@orlp If it isn't a lot of effort you can clone this repository and then type single.py -o uintx.hpp math.uintx to get the single header.
 
@Rapptz I'm going to put it inside my equivalent of your gears, libop, anyway, so I'll take a look at your implementation
thanks
 
:v
I spent 8 months on that.
It's actually the oldest thing in my library.
 
11:18 AM
@Rapptz in return you could take a look at my math prime functions, I spent a lot of time making those fast for uint64_t arguments
 
Oh, the type-level 'string' literals are symbols. No string manipulation available. Scratch that then.
 
(if you want to)
 
@orlp I already have a fast enough prime check.
 
user1804599
Hi there, sluts!
 
11:19 AM
+ I usually use my generators for that.
 
@Rapptz my prime check is pretty ridiculous: github.com/orlp/libop/blob/master/bits/math.h
200LOC
but blazing fast :P
I did it more for fun than for a practical need
guess I have a weird sense of fun
 
Your sieve.
 
think @Mysticial can relate
 
@Rapptz we probably translated our sieve from stackoverflow.com/questions/4643647/…
 
11:22 AM
Nope.
I've actually never seen that question before :)
 
63
A: Fastest way to list all primes below N

Robert William HanksRelated question(dealing with primes generators & including benchmarks): Speed up bitstring/bit operations in Python? Faster & more memory-wise pure Python code: def primes(n): """ Returns a list of primes < n """ sieve = [True] * n for i in xrange(3,int(n**0.5)+1,2): if ...

that is the source of the source of my sieve
 
> Fastest way
> Python
rip
 
primes2 of that answer
 
lol
 
@ParkYoung-Bae you can translate the algorithm
 
11:23 AM
I got this sieve algorithm from a friend of mine.
 
@Rapptz then he probably got it from there :P
 
Marcus.
I don't know about that.
 
they're too similar
 
It's a bit weird yeah.
 
unless Robert William Hanks got it from marcus as well
 
11:25 AM
Marcus is an admin in Project Euler now.
 
At some point, I'm gonna be implementing a segmented sieve. But that won't be for a while.
 
So he doesn't come in here any more.
 
user1804599
I shit in a sieve and watch the shit come out in trails.
 
I have no more Project Euler buddies.
Everyone else in this room thinks Project Euler is stupid.
:(
 
I don't, but I play with Rosalind instead
 
11:26 AM
@Rapptz I do project euler.
 
Rosalind is lame as hell.
 
@Mysticial hook me up when you will, I'm interested in learning the math as well and we could maybe collab
 
I don't know why I don't like it though.
I'll give it another try in the future if I'm bored though.
 
@Rapptz did like ~150 random eulers all over the place, I'm working on a project now to get libop in a usable state and start working through them one by one in C++14
 
user1804599
 
11:28 AM
@райтфолд ?
 
@orlp Considering this is from 2010, I doubt it.
 
user1804599
@orlp The directory name.
 
user1804599
It's the source code of the JVM.
 
@Rapptz You mean that marcus likely got it from there?
 
Nope.
 
11:29 AM
The other way around?
 
Nop.
The algorithm must be ancient.
Only conclusion I can come up with tbh.
 
yeah but the implementation details are uncannily similar
 
Yeah it's really weird.
 
@orlp I haven't written any code for it yet. But my implementation is most likely gonna involve sieving all the primes up to sqrt(N). Then computing all their reciprocals and possibly logarithms as well. Then the remaining primes from (sqrt(N) - N) can be done in small windows independent of each other.
 
It's like literally the exact same implementation
 
11:30 AM
In my case, N will be as large as 10^15.
 
user1804599
> // this is ugly QQQ (why cast to jlong?? )
 
user1804599
why not fix it??
 
@райтфолд Fear of change? Also, because it is easier to bitch than to take responsibility for the change?
 
@Mysticial fits easily into uint64_t
 
@orlp It's just a sieve with wheel factorisation.
 
user1804599
11:32 AM
@wilx who cares, it's just the VM that all software ever runs on. :P
 
@orlp More importantly, it fits into a double.
 
@Mysticial without losing precision
@Mysticial you and your doubles :P
 
Upon further inspection you can find papers of this algorithm from the 80s.
 
Don't under estimate the power of floating-point hardware. :)
 
@Mysticial it always fascinates me how fast they make that stuff
it makes sense though, it's just that floating point is a very smart format that allows it
 
11:33 AM
Interesting history I suppose.
 
@Rapptz Yeah, the algo isn't complicated, it's just that the implementations are literally the same
 
It's quite amazing how many people frown at the use of floating-point to do integer arithmetic.
 
How else would you implement an algorithm if not the exact same?
 
@Mysticial It's not the first thing I would consider, but definitely never rule out
@Rapptz stylistic differences, different orders, etc
 
Mine doesn't do a check for limit.
 
11:35 AM
@Mysticial poly1305 using float, pretty interesting implementation
 
AES using floating-point? That sounds awesome.
 
Well I looked at them side by side and they seem to be the exact same.
 
@Mysticial no
 
outside of that tidbit
 
@Mysticial it's the Poly1305 part that's floating point, Poly1305 is a message authentication code, Poly1305-AES is the authenticated cipher you get by combining AES encryption with the Poly1305 authentication code
 
11:37 AM
I have you beat via git log though :v
January 2015 vs June 2014
 
Does git log operate on floating-point as well?
 
@Rapptz well I just translated mine from the Python code
@Rapptz which is older than June 2014
 
1987!
 
I am thirsty.
 
11:41 AM
GMP is the most widely used bignum library out there. But they throw away at least a factor of 3 in performance by avoiding floating-point. They are aware of the difference. But they refuse to use floating-point. lol
 
Crypto doesn't need raw speed
 
basically I refuse to use floating point if it would only work on systems that have perfect IEEE754 compliance - I don't trust CPUs enough for that
but if the error margin is lenient enough I don't see a reason not to
 
@Mysticial Maybe because it requires good knowledge of it and IEEE semantics are not that common, since most world runs on i386 derived hardware?
 
What it does need is accuracy and predictability
 
@wilx I expect people who develop for GMP to have the knowledge reqwuired.
 
11:44 AM
Shit it's 7:45 AM
 
@CatPlusPlus not every floating point implementation of discrete math requires perfect IEEE754 compliance - as long as the error remains under a certain threshold it can produce perfect answers
 
This is a world where absolutely everything is a possible attack vector on your implementation
 
I should get some sleep too.
 
you can't use GMP to implement crypto either way
GMP isn't built for crypto to begin with (constant time/power implementations)
 
user1804599
11:46 AM
Don't implement any crypto things.
 
user1804599
Leave it to experts.
 
@райтфолд because they do a top notch job!
 
@orlp I hear that they do have side-channel silent versions of some functions.
 
user1804599
@thecoshman better than you.
 
IOW, no data-dependent branching, and constant-latency instructions only.
 
11:47 AM
@райтфолд besides the point :P
 
One of these days I'll explore writing toy crypto
 
@Mysticial perhaps, I still wouldn't use GMP - I might look at their implementations, but I definitely wouldn't link against them for crypto related stuff - being self contained is very important
 
user1804599
I wonder what happens when you do a Boost.Coroutine context switch in a JNI call.
 
careful about licensing
 
user1804599
Without switching back before you return to Java.
 
11:48 AM
every library you use in implementing your crypto is another attack vector
@Rapptz I'd look up the code to figure out how they're implementing it, and then look up the papers that introduced those methods. Then implement it using those papers. Unless the implementation in GMP is novel you can avoid the license that way.
 
@CatPlusPlus inb4 some big project has some epic security hole because they used your library that never claimed to actually be more than just playing around
 
Like I'd care
I'll be the first to laugh
 
@CatPlusPlus sure, but it'll be a hoot :P
 
Open source licences come with warranty bit for a reason
I'd probably put a warning in readme, so you'd have to be a real moron to use that
 
I have one crypto library, but it's not toy: github.com/orlp/ed25519
but then again, I did not write the number crunching that it uses, just wrapped in an API
 
11:59 AM
Mawning
 
Puppy \o/
fail
 
If I had to do some crypto, I would use Botan. It seems nice enough.
 
How many people audited it
Also don't use crypto primitives
 
@wilx Can't recommend
Doesn't seem to be audited
Seems to be a random collection of implementations found by other people and implemented by the author
Just looking at the AES implementation, it's not safe against side-channels
 
not sure I'd trust random implementations
 
12:07 PM
Timing attacks are "a little harder"
AKA: possible
 
Also crappy API
 
"Our security is ever so slightly less broken."
 
Reimplementing this stuff just so it can be ~~cpluspluseleven~~ is dumb
 
You should take known implementations and wrap them, for example as I did with github.com/orlp/ed25519
 
user1804599
Is there any C++ library with I/O streams that actually handle input as a stream of bytes, use exceptions and don't have a cryptic interface?
 
user1804599
12:12 PM
Something like Java's InputStream would be terrific.
 
user1804599
Or Go's io.Reader.
 
I'm writing one (no, not really... yet)
 
@райтфолд When doing file I/O for serious projects I pretty much always use C I/O
 
user1804599
I have something in Baka but it only has null streams now.
 
user1804599
Hmm wait, it does have file streams.
 
user1804599
12:14 PM
But no seeking yet.
 
iostream is just bad
 
Oh look another language how unpredictable
 
user1804599
 
user1804599
Except with seek.
 
lol char arrays
 
12:15 PM
if you want bytes, do not use char for the love of god
uint8_t are bytes
 
user1804599
uint8_t is unsigned char.
 
@райтфолд no, uint8_t is a type with exactly 8 bits, unsigned char might have more.
 
Like anyone cares about those
 
@orlp If unsigned char has more, then uint8_t doesn't exist.
 
@milleniumbug exactly
@milleniumbug which is what you want
 
user1804599
12:18 PM
For now, this will have to do: gist.github.com/rightfold/ed3681d9494a75e585de
 
octet arr[20]
 
u8 arr[20]
 
user1804599
Also FYI char is a byte by definition.
 
user1804599
std::uint8_t is an 8-bit integer.
 
@райтфолд Whether you consider a byte to be 8 bits or the number of bits used to encode a character on a particular CPU depends if you're stuck in the past or not.
 
12:22 PM
Who cares about non 8-bit bytes nowadays
 
user1804599
I consider a byte to be a byte.
 
octets are what's transmitted over the net now.
 
That seems reasonable
 
That's a circular definition, so you don't consider a byte nothing?
 
user1804599
And bytes have nothing to do with characters.
 
12:23 PM
11 mins ago, by райтфолд
Is there any C++ library with I/O streams that actually handle input as a stream of bytes, use exceptions and don't have a cryptic interface?
 
user1804599
C++ standard defines char as having the size of one byte. Its size is completely independent of character encodings.
 
The guys that created C language suck at naming things
 
@райтфолд I was talking about the definition of the byte.
 
"smallest addresable unit of memory"?
 
@райтфолд I consider the only useful definition of the byte to be 8 bits.
ISO agrees with me in IEC 80000-13:2008
@milleniumbug historically this is true, but definitions change
 
user1804599
12:27 PM
I don't give a single shit about your definition.
 
user1804599
I care only about mine.
 
Then what is yours?
 
Seriously who cares about those platforms where byte is not 8 bits
 
6 mins ago, by Park Young-Bae
Who cares about non 8-bit bytes nowadays
 
@orlp No, not really. It only happens that byte is 8 bits, because of convenience and that most useful computers have 8-bit bytes.
 
12:29 PM
@milleniumbug That's all history, and interesting, but the fact remains that now, a byte means 8 bits.
 
Like rightfold's library will ever be used in mainframes
(or finished)
 
s/ in mainframes//
 
octet means 8 bits
 
That does not refute what I said.
 
I'm boooooooooooooooooooooooooooooooored.
 
12:31 PM
Stop the pointless argument pls
 
@orlp It doesn't magically make what you said correct, either.
 
@LightnessRacesinOrbit No, ISO IEC 80000-13:2008 does that.
 
@orlp lol what
 
I borked my budget planning by nearly 1000€ how cool is that
 
@orlp no it doesn't
 
12:32 PM
Time to eat noodles. And rice.
 
@LightnessRacesinOrbit last time I checked ISO was authorative on the definition of units
 
@orlp Right, and they do not define "byte" to mean "octet"
 
@LucDanton Eh. Je suis en Asie, c'est riz et nouilles même les jours de fête :D
 
macbain.exe
 
@orlp or perhaps they do
of course, it's up to the individual as to which standards they follow at any given time
 
12:36 PM
@LightnessRacesinOrbit 2008 version does if I'm not mistaken
 
so just that 80000-13:2008 exists doesn't magically mean that everyone everywhere must mean octet when they say byte
so your unqualified "the fact remains that now, a byte means 8 bits" is still wrong
 
Of course, but it's a reasonable default assumption
 
not really, no
you can't follow all standards all the time by default
 
Why are you arguing against LRiO. You'd be more productive swimming a river upstream.
 
for one thing, "B" means byte in 80000-13:2008 and bel in SI. Two very common standards that you might want to use side-by-side
so that's just one very obvious ambiguity right from the off!
@ParkYoung-Bae That is not true. Arguing with me is very productive because you learn something and have your misconceptions corrected.
 
user1804599
12:37 PM
@R.MartinhoFernandes Good.
 
user1804599
You deserve it.
 
Mebibytes <3
 
@LightnessRacesinOrbit You are the river of Truth and Wisdom filling the ocean of Ignorance that is this room
 
@ParkYoung-Bae Yes
 
Asking LRiO for a 4K randomly generated file will result in having a supercooled hard drived shipped to your home.
 
user1804599
12:41 PM
> mummified cat slam dunking a mummified bird
 
went for full eye check up this afternoon & the optometrist suggested me to do more tests (so they can charge more) after commented that my eyes are quite healthy
kind of reminds me of my dentist
 
why would I want to go through all these unnecessary ultrasound/x-ray scans so they can charge me more? I would not go through any unnecessary tests even if they are free because it would be more risky for me, even only by a little
 
> I would not go through any unnecessary tests even if they are free because it would be more risky for me, even only a little
the chance of you having something wrong with your eye is a lot greater
 
couldn't you just ask them why they want to do more tests?
 
12:45 PM
it would be a 'more throughout test'
I am kind of 'if nothing wrong, don't fix it' kind of person
 
wrote an answer yesterday. Today OP says "you're absolutely right" but doesn't accept. smh
the other posts are a shitlot better than mine, though
 
Time to deface them
 
he doesn't accept any of them
 
@chmod711telkitty the point of eye tests is to find problems that may not yet be symptomatic, that could later result in you losing your sight
so the predicate "nothing is wrong" is untestable if you don't go in, and your entire approach just disintegrates
 
12:48 PM
I said that I did the whole eye test thing, but it was the more throughout scanning thing that I did not want to do.
you know how many x-rays I took to fix my chipped tooth? at least 30, I would probably die from cancer for fixing half a tooth
 
user1804599
You don't exist.
 
user1804599
I deny your existence.
 
on the good news, my eyes are perfectly healthy
 
@chmod711telkitty you can stab them if you want to
 
12:56 PM
My brain is not perfectly healthy
 
@CatPlusPlus What seems to be the issue?
 
I wonder whether I would get the darwin award if I die from cancer because I had too many x-rays while tried to fix half a tooth
 
Oh shit you're a cat.
 
Being a horrible nerd
 
@CatPlusPlus What's wrong with that?
 
user1804599
12:57 PM
I like the Perl 6 solution to PE #1.
 
Project Euler?
 
user1804599
[+] grep * %% (3 | 5), ^1000
 
@райтфолд as expected, completely unreadable
 
user1804599
It's only unreadable because you don't know what the operators mean.
 
It's shit
 
user1804599
12:59 PM
No. It's wonderful.
 

« first day (1611 days earlier)      last day (3344 days later) »