« first day (1627 days earlier)      last day (3320 days later) » 

7:00 PM
That's not State.
It's MonadState. I have never used that.
 
@Jefffrey MonadState is just a class.
A Monad is MonadState if it's a Monad that provides get and put
 
Then, there you go: you use get to get the cache.
 
Ok. Nobody is allowed to make fun of "the storm" and how it is so meh.
 
:c
 
7:02 PM
@LightnessRacesinOrbit Maybe unplonk the rest
 
Man if you make Property A depend on Property B and Property B depend on Property A I'm pretty much screwed
 
user1804599
> Terminator found in the middle of a basic block!
 
user1804599
No idea why this is an error.
 
user1804599
It can just discard any instructions after it.
 
Wait. This is a non-programming problem no doubt
This has never happened before
 
user1804599
7:05 PM
br label %68
br label %41
 
user1804599
How fun.
 
@Pris graph analysis; ttyl
 
@Bartek I have no idea if this example is on the level you needed an example of existential variables at, or if you'll cry seeing things written by me in Haskell (lol), but here's what my naïve toying with the language and the limited description you provided resulted in: coliru.stacked-crooked.com/a/c7b9aa3655e997ba
 
I'm deffo missing the show keyword/identifier in that mix
 
user1804599
@sehe It was a programming problem.
 
7:09 PM
Oh. Never mind then. It's no doubt long solved in 5 lines of elegant Perl
 
user1804599
No. Here's the solution:
 
user1804599
llvm::BasicBlock* blockAt(std::size_t offset) {
    auto block = blocks.begin()->second;
    for (auto&& pair : blocks) {
        if (offset < pair.first) {
            break;
        } else {
            block = pair.second;
        }
    }
    return block;
}
 
user1804599
No idea whether it works.
 
It's elegant. Ship it.
 
user1804599
Wooo, this program now compiles and runs!
 
7:15 PM
@Bartek Or maybe this (I have no clue whether my Haskellspeak is anywhere near being acceptable, also I don't understand State :D).
 
@райтфолд how are blocks sorted? (by offset; I mean asc/desc?)
 
It can reverse engineering Cython?
It was found that?
 
user1804599
@sehe Yes, by offset ascending.
 
And?
@райтфолд That looks odd then
 
user1804599
I need to find the block with the largest offset smaller than or equal to offset.
 
7:21 PM
lowerbound
 
user1804599
Perhaps.
 
    llvm::BasicBlock *blockAt(std::size_t offset) {
        assert(!blocks.empty());
        return std::lower_bound(blocks.begin(), blocks.end(), offset)->second;
    }
AFAICT
@райтфолд Your algo will always find begin()->second if the first element precedes the offset. IOW: it doesn't find the largest offset LTE
 
user1804599
It cannot precede the offset.
 
user1804599
There's always a block at offset 0.
 
Well, if offset is 0. But, if offset = 10 and there are blocks at 2,4,7,8,12,15 then your algo will find 2 and mine will find 8
 
user1804599
7:23 PM
And 0 is the smallest offset because std::size_t is unsigned.
 
user1804599
@sehe Interesting.
 
user1804599
Let's try yours.
 
Instead, try reading your own version and checking :)
 
user1804599
Btw std::map has a lower_bound method.
 
I'm not very well in reasoning with lower/upperbound
@райтфолд Oops, of course. Much better indeed.
In fact, my sample shouldn't compile as the iterators aren't RA
 
user1804599
7:25 PM
@sehe Nope. :D
 
user1804599
Segfault!
 
That doesn't make any sense. Show me the code?
 
user1804599
llvm::BasicBlock* blockAt(std::size_t offset) {
    assert(!blocks.empty());
    return blocks.lower_bound(offset)->second;
}
 
Well. That doesn't make any sense, unless blocks is empty (or the segfault it unrelated)
 
user1804599
Segfault is unrelated.
 
7:27 PM
How about infinite recursion somewhere?
 
user1804599
It's because the wrong block is returned.
 
user1804599
So LLVM segfaults while optimising the code.
 
Are extra braces in a uniform initializer list discarded? Is there a way I can tell the compiler "this is one object"
 
@райтфолд Ah my pitfall:
> returns an iterator to the first element not less than the given key
 
user1804599
You want reverse iterators.
 
7:29 PM
@Pris the other way around, you can leave out braces. If you want the explicitness, you should add braces
@райтфолд That could in fact help. They're heinous too, though
 
user1804599
My code indeed appears to be incorrect.
 
bbl
 
user1804599
Wait, nevermind. I'm fucking up elsewhere.
3
 
user1804599
It's perfectly fine.
 
7:33 PM
Not so sure. I think this could be more on target (unless your specification was off):
    llvm::BasicBlock *blockAt(std::size_t offset) {
        assert(!blocks.empty());
        return (offset
                ? blocks.upper_bound(offset - 1)
                : blocks.begin())->second;
    }
@райтфолд Whatever happened to TDD :)
 
user1804599
@sehe Boring.
 
Xeo
I love lower_bound/upper_bound, but I always have to think 5 minutes to remember how exactly they work. :/
 
lel
@Xeo Me too
 
user1804599
In fact, my JIT compiler has no automated tests at all.
 
lol
 
user1804599
7:34 PM
I should write lots of code samples and a script that runs them and verifies the output.
 
@райтфолд Exactly what Wide does.
 
I have the same mental ambiguities about lower_bound/upper_bound as with min and max but amplified
 
Xeo
@sehe at_least / at_most!
 
@райтфолд No. You should write unit tests for blockAt
@Xeo And clamp
ikr
 
user1804599
One with a JIT threshold of 0 and one of std::numeric_limits<decltype(jitThreshold)>::max().
 
user1804599
7:35 PM
@sehe sure :P
 
user1804599
From now on, blockAt will be the forever buggy never-to-be-fixed function.
 
user1804599
Every project has at least such a function.
 
user1804599
Or a module.
 
user1804599
Currently it just executes the program 200 times to make sure the JIT fires, and sleeps 1 second after the first 100 times to make sure the JIT is done (JIT runs in background) before continuing.
 
any gpu programmers here?
 
7:37 PM
hmm
Wide has this one function that I could never make work quite right.
I hacked it to pieces in the end and now it seems OK
 
user1804599
But fun thing is, now bytecode is Turing-complete.
 
user1804599
There's Boolean literals, arguments, conditional jumps, returns and subroutine calls.
 
@Puppy hopefully its not a ticking time bomb :p
 
ah well that's what 255 end-to-end integration tests are for.
 
@райтфолд just copy it into your project template so you don't have to come up with original ones all the time
 
user1804599
7:42 PM
:D
 
I'm not even sure that I really like unit tests.
I seem to have developed a preference for integration tests.
 
Well. Do you like working code?
 
@mrpyo I did some gpgpu several years ago.
 
@sehe I think integration tests are more effective.
 
@Puppy Some things are well suited for unit tests. This step in the algo seems to be one of them (if only to validate the thinking while programming)
@Puppy Oh certainly. I do integration tests all the time. And I call them unit tests :0
 
7:44 PM
hm
 
But. Some things are really well suited for unit tests. The really really really basic building blocks
 
well maybe I'm making a separation here which doesn't exist in most people's understanding
 
In real life the distinction is not being made so vehemently. Mostly in favour of more integration testing.
The thing is, you can only do true Unit Tests properly with rigorous abstraction. And rigorous abstraction is... really only popular in Haskell. I mean: relatively uncommon
 
@sehe :D
 
well I think they're fundamentally limited in scope.
 
7:46 PM
I just call all of these... "tests".
 
This is the purpose. Yes
 
I find the distinction to be mostly noisy.
 
you can't unit test a given piece of code to find a bug where it's being passed the wrong arguments.
 
@Griwes Don't we all? But shiny IDEs insist on "Unit Test" and likewise do hipster coworkers
 
larger integration tests give me more confidence that everything is in working order
 
7:46 PM
And there's way too many people angry at someone's "misuse" of one of these terms.
 
Xeo
@sehe I wish proper testing didn't require mocking the shit out of everything
 
@Puppy Why not? (I know what you mean. But you didn't put if very well)
 
user1804599
Maybe I should first implement the obvious optimisation of not including the same string literal in the same object file twice.
 
@райтфолд lol
 
@райтфолд what will you do when you complete mill
 
user1804599
7:47 PM
@Pris write everything in Mill.
 
@Xeo I rarely find myself mocking things. I do mock services though.
 
@Pris He will never complete Mill.
Also...
 
user1804599
Millcon 2020
 
@райтфолд I meant celebration wise, but solid plan I guess
 
user1804599
:D
 
7:48 PM
Every self-respecting language has a compiler written in it.
 
Xeo
Maybe I'm just a badlet that doesn't know how to write tests properly.
 
I find that if I mock a few very large components (like, a webservice), and have a testing configuration/deployment, I don't have to mock much detail
 
So the next step will be to write a Mill compiler in Mill.
Then a VM in Mill.
So they can run recursively.
 
@Xeo I'd prefer to mock less rather than more. I certainly wouldn't start by mocking every dependency.
 
@sehe I am happy when I can extract some part of code into generic component like algorithm or data structure. Partly because it is easy to do unit testing for it.
 
7:49 PM
@Griwes With enough immutability they can hot-replace each others running code. You can have a translation party of incestuous compiler pro-creation if you will
2
 
:D
 
@Puppy I make it a point to never mock. Of course, I end up "mocking" the very large parties involved, by either creating a mock database, webservice etc. but this doesn't feel like mocking.
 
I didn't know you can design a messaging feature with a billion corner cases but apparently you can
And I have to fucking account for all that
Great
 
Most often I can create these "mocks" with dual purpose (they can be crafted to allow for performance testing, stress testing etc.)
@EvgenyPanasyuk I do agree. But I also admit I do it far too little.
 
user1804599
Before I can implement dynamic variables I have to implement fibers. :[
 
user1804599
7:51 PM
I'll just go with threads and TLS for now.
 
E.g. I "abstracted" a state machine for my current Java project. And then I ended up poisoning the abstraction after all by injecting special case logic into it :(
 
user1804599
I can't decide which feature to implement or which bug to fix.
 
in some ways in Wide I'm lucky because it has no external dependencies, really.
therefore there's nothing to really mock.
 
Except loungers
 
yeah but that's really test-independent mocking
 
7:55 PM
@Puppy That implies you're not testing units. Which I completely condone :)
@Puppy :(
 
user1804599
Alright, let's implement functions.
 
user1804599
Which I have to do only in the compiler.
 
user1804599
@sehe Erlang!
 
ikr
 
@sehe I have to admit - there are places in my code which would qualify as "very ugly" because I didn't came up with a good abstraction for it and as the result there are ad-hoc conditions. And it can't be unit-tested easily/elegantly too.
 
7:58 PM
I really like the idea of binding functions to variables that automatically update. Define area = w*h, then change w or h and area automatically updates. So cool
 
user1804599
some_module:some_function(), some_module:some_function() can call a completely different function the second time. :)
 
> You have fully used your vote allowance for today
what
 
user1804599
If a new version of some_module is loaded. :D
 
It's not even 10pm yet.
 
@EvgenyPanasyuk The problem is, I think, if I look deep inside my heart I tend to think the abstractions are ugly too :(
We're all victims of anthropomorphic thinking/anthropocentrism
 
Xeo
7:59 PM
@Pris There's a name for that
 
Rationally, I can find Haskell very attractive. Very
 
@Xeo What is it? I've come across 'declarative programming'... also 'function reactive programming'
 
@Xeo Observer?
 
Reactive programming
 
Xeo
nah
 
user1804599
8:00 PM
Alright, so the top type is called Any and the bottom type Bottom.
 
Xeo
I'm thinking of something else
 
Amazing
 
Declarative is a whole family of paradigms
 
user1804599
@Pris Make area a getter instead of a mutable variable.
 
Neural, actor, genetic
 
user1804599
8:01 PM
The interesting part is not variables but side-effects.
 
Xeo
In computer programming, symbolic programming is a programming paradigm in which the program can manipulate its own formulas and program components as if they were plain data. Through symbolic programming, complex processes can be developed that build other more intricate processes by combining smaller units of logic or functionality. Thus, such programs can effectively modify themselves and appear to "learn", what makes them better suited for applications such as artificial intelligence, expert systems, natural language processing, and computer games. Languages that support symbolic programming...
that
 
That's not really that
 
I need to abstract every reference to T::type with _the_type_i_want<T>::type :F
 
I don't think that is what Pris meant though
 
user1804599
@CatPlusPlus what do you think of logic programming.
 
8:01 PM
It's great when you design something with a particular feature in mind
 
I think Symbolic programming implies more "closed form" declarative or sumtin
 
That's closer to reflection than reactive updates
 
and after you've finished it, you realize that a part crucial to making that feature working is missing
 
user1804599
Wait, I'll first implement integers and arithmetic.
 
user1804599
Then I can use factorial as a test case for functions.
 
8:03 PM
@Griwes Happens. All. The. Time. This is why PoC's rock and throw away code (before actual implementation) should be the norm
 
Well, this should Just Work with another layer of abstraction slapped on it.
 
1 hour ago, by sehe
Ok. Nobody is allowed to make fun of "the storm" and how it is so meh.
Well. It seems that my car rear window being smashed to smithereens by a grown-up tree branch is only mild damage compared to what's happening down the street.
The repair man could be delayed o.O
I have no clue what all the police and fire brigade is for
 
user1804599
I liked the storm today.
 
Xeo
The storm already passed here :(
 
But I can't really go find out because of the kids :S
 
Xeo
8:11 PM
well, mostly
just a lil bit of wind
 
@Xeo Seemed tame to me. Until my neighbours called to tell me my car had no rear window anymore.
It wasn't even exactly near a tree. >7 m
 
user1804599
let infix~ = 42
1 ~ 2 # type error :D
 
Still, a 120cm branch of ~6cm diameter went throught the window and was in my trunk o.O
 
Xeo
@sehe ow
 
Oh well. I didn't need to go anywhere. Wife has her own car. Insurance should cover.
I'm just glad nobody was in the car
 
8:13 PM
@sehe oh, yeah that serious gusts
 
user1804599
@sehe stormram
 
The most annoying thing is all the glass.
Pro tip: If ever you get the rear window smashed, break away /all of the window/ before opening the rear door.
With the next gust of wind, there was glass everywhere (on the roof, and worse, in the hinges/joint)
 
user1804599
@sehe open the side door and place cardboard to separate the trunk from the rest of the car.
 
@райтфолд s/trunk/boot/
 
user1804599
What's a boot.
 
8:21 PM
It's a large shoe.
 
@райтфолд the part of a car that americans mistakenly call the 'trunk'
 
@райтфолд that wasn't the problem. The problem was glass on the roof and between the hinge
@thecoshman silly Brits
 
user1804599
@sehe What's the problem with glass on the roof?
 
user1804599
Can't that be removed trivially?
 
@райтфолд It's annoying to pick it off without scratching :)
 
user1804599
8:24 PM
Vacuum cleaner.
 
@райтфолд With water. But I had no opportunity to move the car
 
@sehe well ok it was probably the Germans :\
@xeo what you call that part?
 
penis
 
Hmm... So AMD revealed what instructions their Zen processor will have. I'm disappointed. :(
Maybe they don't want to reveal all of it yet.
 
this room hurts my code, wrote some unnatural shit to avoid inheritance today
 
8:33 PM
@Mysticial not likely. They need to compete
 
They took out most of their own instructions (XOP) added a new one, and copied a subset of currently Intel-only instructions.
 
and sehe just the bear I want. Do you happen to know a way to use Expressions as keys in a dictionary?
 
AVX512 is not one of the ones they are taking from Intel.
 
I'm doing a lot of visting and profiler says it is a slight issue.
 
@Mysticial I'm not surprised
 
8:38 PM
@JohanLarsson Nope. ReferenceEquals comes to mind. Dunno about ReferenceComparer :) I don't think it exists. You can implement a custom comparer...
 
they share such a small market share at this point compatibility is just a grab
 
Wow. It's been ages since I did C#
 
@Mgetz I'm not surprised they dropped most of the AMD-only instructions. But I am surprised that they are not doing AVX512.
 
@sehe yeah they do not compare with structural equality. Making it hard, for me, to create the cache I need.
 
Maybe they are saving it for a later iteration.
 
8:40 PM
@Mysticial what is AMD's current process?
I'm pretty sure intel only did it because they have the silicon
 
@JohanLarsson if building the cache can take time, I suppose you could use a custom hasher which hashes the expression tree. Very tedious.
I bet something like this exists
 
also does 512 do the entire op in one cycle? or is it two like early SSE implementations?
 
You are writing c++03, aren't you? DCF77_Demodulator<& DCF77_Clock_Controller::process_single_tick_data, & DCF77_Clock_Controller::flush> Demodulator and it will work (I'll leave it up to some other language-lawyer to answer why you need that (I'm lazy)). — Filip Roséen - refp 2 mins ago
^ language-lawyer wanted, I'm too lazy.
 
github.com/mosa/Mono-Class-Libraries/blob/master/mcs/class/… @JohanLarsson just the first thing that google pops up
 
@sehe Yeah, wrote one for fun. Problem is that visiting to build the has was almost as expensive.
 
8:42 PM
@Mgetz They are targeting either 14 or 16nm for Zen.
Which is right inline with Intel's 14nm for Skylake.
 
@Mysticial they should have the silicon then, no reason not to. Having that before intel would be a huge advantage
 
@JohanLarsson Like I said, "if the cost of building the cache is not important"
 
@sehe looks strange, don't think that works.
 
Oh. You need to associate the hash with the tree for lookup
 
@Mgetz It's highly expected to. It's already single-cycle throughput on Knights Corner. No reason to expect it to be any slower on Knights Landing and Skylake.
 
8:44 PM
@JohanLarsson I haven't looked at it.
 
When Intel did AVX, it was single-cycle from the get-go.
It was AMD that had to split it among 128-bit units.
 
@JohanLarsson github.com/mosa/Mono-Class-Libraries/blob/master/mcs/class/… just ends up using ToString...
 
I have stuff like:
public static class NameOf
{
    public static string Property<T>(Expression<Func<T>> propertyExpression, bool allowNestedProperty = false)
    {
        ...
    }
}
ToString is also expensive for expressions, guess it visits self
 
Why not extension methods?
@JohanLarsson Of course. I was just reporting what I observed. The "..."
 
@sehe where they are a fit
 
Xeo
8:46 PM
Aw man. Azazel with Ludovico (giant Ring of Death), and an Epic Fetus in the item room... the choices, the choicess... /cc @Rapptz
 
Calling it like: NameOf.Property(() => StringProp);
 
So. They brought down a tree that was gonna fall
 
sends a new instance every time it seems
 
Yup
Just cache it based on some other propery. Associate your own ids with the expressions...
 
maybe, feels like bugs
 
8:49 PM
@Xeo spoon + ludovico + brimstone/azazel is definitely my favorite
 
@JohanLarsson ?
 
thinking about my implementation :)
 
well, what do you need to be wiser-than-the-library-user or wiser-than-the-compiler for? Why do you need to cache? Surely it is because people are constructing duplicate expressions willy-nilly? Then make them stop doing so.
Make them retreive ExpressionCookies using your API and use the cookies to add identification and cache.
 
C#6 will have nameof(property) and method, field etc iirc
 
@Mgetz They won't be able to beat Intel to it. Skylake is coming out end of this year. And if they release consumer in parallel with low-end server as they usually do, it means we'll see AVX512 before EOY.
 
8:52 PM
@JohanLarsson Don't overengineer stuff. You should look to simplify
 
@Mysticial aaaand AMD just lost the HPC market
 
They lost already.
 
MLM
Anybody familiar with node-gyp/gyp build tool? I am trying to build a project that uses libuv but I am getting undeclared identifier errors from what I assume is a misconfigured binding.gyp. I was able to get the same project built with Visual Studio but trying to use node-gyp now.
 
@CaptainGiraffe yeah, I err on the bs side very often.
 
guise
 
8:54 PM
the anticipation
it's palpable
 
@Mgetz It will get worse, the biggest thing that prevents auto-vectorization in current generations is being addressed in AVX512. IOW, a simple re-compile will be able to utilize AVX512.
 
@sehe profiler pointed me there, was surprised that it would be a (slight) issue.
 
> Surely it is because people are constructing duplicate expressions willy-nilly?
Instead of going full out to cache things that even the compiler guys don't, try to cut the cost where it occurs: at the creation
 
oh dang
 
@sehe My jaw dropped last friday when this person presented his project to me. I had made clear the importance of elegant code, and clarity of design.
 
8:57 PM
private beta on health.se
 
@sehe solid advice
 
"I'm vomiting blood, what should I do"
 
@CaptainGiraffe do I know which project/person?
 
I promie´sed a guy to ask why it burns when I pee
 
8:59 PM
are you joining?
 
I got an email saying private beta started since I committed.
 
@sehe Unfortunately not. But I had to ask they person. Did I teach you this kind of elegance? I got yes as the answer.
 
Honesty. Can't beat it
 
@Rapptz you have taken hippocratic oath?
 
@JohanLarsson Because the "it" you're peeing on is pure sodium?
 

« first day (1627 days earlier)      last day (3320 days later) »