« first day (1415 days earlier)      last day (3530 days later) » 

1:01 PM
bad macro name
 
Still digitizing childhood memories. Kids wearing this amused frown all the time hearing me sing in a concert at age 12, as well as playing the violin; So many feels.
I had no idea these tapes existed (found them in the attic at my moms, so I nicked them with the promise to digitize them)
 
Ughgughghgh.
 
@PolymorphicPotato is that a new programming language? :)
 
Opening files in text mode is such a horrible thing.
Files store bytes dammit.
 
humans read text damn it.
 
1:11 PM
damn it.
FTFY
 
Do you think that move :: Move -> GameState -> Maybe GameState models an option to make an invalid move in a clear way?
 
@Rapptz Humans are not computer programs.
 
Humans write and read computer programs.
 
> Take a move and a board, and return a new board state if the move is valid, otherwise return nothing.
 
Which is completely irrelevant to what files store.
 
1:12 PM
Text mode exists for (surprise) text input. You want to read text without worrying about line endings etc.
 
Should be a separate API.
 
@BartekBanachewicz Either ?
 
no, no it shouldn't.
 
@PolymorphicPotato meh
 
split(decode(open(path), encoding=utf8), GUESS_LINE_ENDING) yay!
 
1:13 PM
@sehe I was thinking about that, but the only Left I was able to come up with was "Invalid move" :S
 
have fun rejecting reality. Files are files, of course the API can be shared, as text/binary is very much just a "mode" viewed functionally
 
on an unrelated note
I wish search engines let me search for 'special' characters.
 
Doing decoding in the same API makes the API unnecessarily complicated.
 
I want to search <, >, +, etc. :(
 
@BartekBanachewicz still, that's more expressive than "Nothing". And it gives you the option to add more states ("50 move rule forfeit", "Castling prohibited by check on passing field") - example based on chess :)
 
1:14 PM
@Rapptz Yes, it really should.
 
Hey why not add an is_json parameter to open? Many files store what should be interpreted as JSON.
 
I'll just add that to our infinite list of disagreements pups. :v
 
there's no reason for "Guess encoding of bytes; convert bytes from guessed encoding to UTF-8/UTF-16/whatever" to be specific to the source of those bytes.
what if I'm receiving data from a socket and I wish to interpret that also as text?
 
And oh god why is the default encoding platform-dependent. ;_;
Python sucks.
 
even 'code search engines' don't let me search special characters
 
1:17 PM
because the primary encoding on each platform is platform-dependent?
 
@PolymorphicPotato on the contrary. Doing the the decoding separate makes the API more complex. Objectively. But combining it based on flags it more convenient.
 
sigh
 
Also, integrating it is nearly the only way to make this efficient (because streaming APIs tend to be very complicated, especially if the number of bytes read depends on the way in which they are decoded)
 
you'd probably want UTF8 on Linux and UTF16 on Windows
 
@sehe It makes it more simple by removing the decoding stuff from it into a separate module (where it should be see also SRP).
 
1:18 PM
If you want to argue binary should be default, I completely agree
@PolymorphicPotato No, because it will be harder to combine it to coerce it into submission. The implementation might become simpler, but that does not a simpler API make
 
You can always write a function that expresses the intent clearly; something like def open_text(path, encoding): return Reader(open(path), encoding).
Or FileReader type not very important difference. Meh generic stream reader ftw.
 
user3010322
@Rapptz I like this convention a lot, actually. It's what I used the first time around. :D
 
Ell
I wonder if there is anyone in the US at uni that could get me one of these digilentinc.com/Products/…
 
I see the game jam is only going to be 4 hours.
lame
 
Ell
I'm not going to be able to partake in the game jam
 
1:29 PM
@ThePhD I kinda like it too.
I probably won't either.
 
Ell
I am working so I couldn't if I wanted to
 
user3010322
@R.MartinhoFernandes Guess so. :c Ah, well.
 
Ell
I might learn boost::spirit
 
that's the spirit
 
user3010322
@PolymorphicPotato I wouldn't say it makes the API more complicated: I agree with @sehe here. But, it does lead to unfortunate gotchas when the default mode opens up all the bags of worms associated with formatted text input and output that's based on locales.
 
Ell
1:37 PM
Errm. Is there a word for something that isn't last?
 
user3010322
middle, first, inbetween?
 
Ell
I think all of those have other implications
middle implies it's not first
first implies it's not in the middle
inbetween also implies it's not first
 
user3010322
Making the default mode be binary, and whenever you ask for a character/string, you should be able to drop the encoding in on either a per-call basis, or you pass the encoding in for the constructor and it only kicks in when you're dropping in an actual string type (basic_string_view and basic_string), and not when you're dropping in a pointer type (e.g. buffer_view<> and friends).
 
@sehe it's probably someone from the same apartment block
it's hard to steal shirts and stuff w/o being noticed wearing them
the same doesn't apply to underwear
 
1:40 PM
he was also a good guy, left 2 pairs there
only stole 4
 
so I'm not left butt naked
 
Ell
@LightnessRacesinOrbit You have lots of metadata blocks, each with a header. In the header is a bit which specifies that it's the last metadata block
but I think I just solved it
you just don't put last_ in front of it :P
 
end!
 
1:42 PM
@Rapptz You mean like symbolHound?
 
searchcode.com worked better
SymbolHound just gave me a blank page
 
@AlexM. maybe he stole all the apparels from The Salvation Army donation boxes, since very few people donate undies, he's forced to take them somewhere else ...
 
Ell
Did for me too
 
poor thing though, has to steal clothes ...
 
@Rapptz Fair enough--point is, there are search engines that do what you asked for (though I'll admit, I've never tried to compare them to each other or to something like Google in terms of result quality).
 
1:45 PM
I tried a good majority before I found one that worked.
meh
 
Ell
Idk if it's wise to assume char is 8 bits wide or not. I know it is going to be true 99.99% of the time in practicality
 
assert(CHAR_BIT==8) solved
 
static_assert
:p
 
@ThePhD Indeed: those gotchas are part of the complication.
@Ell It is. People who use architectures where that isn't the case can go fuck themselves.
 
1:49 PM
@Ell Just put a static_assert and call it a day.
static_assert(CHAR_BIT == 8, "Unsupported platform");
 
i have test on my machine and it use 7bit byte — dato datuashvili Jul 8 '10 at 6:14
 
so I started playing LoL and bought a skin already
 
I wish LoL was a pay2win game and not a pay2calmyourhormones game
 
1:52 PM
like, they have these nice default skins but then they show you you could have this too
 
I got very constructive feedback from PHP programmers about my Haskell code.
 
and I'm like, riot pls
 
@AlexM. I prefer Valentine Vayne
well I prefer vayne in general because Ashe is boring as heck
 
didn't play Vayne yet
 
also are you on EUNE
 
1:53 PM
@LightnessRacesinOrbit ...or to get a sense of scale:
 
yeah EUNE
 
yeah you have to be
 
only played ashe so far
 
woo great let's play sometime near
 
yup
 
1:53 PM
tell me when you hit lvl 5 (that's required for playing with others)
 
I think I'm lv 4 or 5 let me check
I can play with others though
 
is this a game where you get to be a pimp? those women look like whores ...
 
probably because the account is old as hell
but I only started playing now
yeah I'm lv 5 since the last match
 
Is it fine to use a const member in a struct if the struct is non-copyable and non-movable?
Otherwise I'd have to make them private and write getters. :v
 
user3010322
Yes.
 
1:56 PM
use static const :v
 
user3010322
If it can only be destructed, there's no point. <.>
 
user3010322
(In writing the getters and setters).
 
user3010322
@Rapptz >_> Why would you do that.
 
cause
it's fancy
 
@Rapptz non-static const can make sense (lets you initialize value at creation, but still have separate values for different instances).
 
1:57 PM
@AlexM. nice. Are you playing now?
 
not right now, I'll probably play again in a couple of hours or so
 
I can start the game to add you if that's needed
 
well add me in the meantime
 
yeah
 
1:58 PM
@Rapptz per-instance :v
 
@AlexM. or give me your nick
 
is it like the account name or the summoner name?
 
the summoner name
 
Lv 53 Onigiri
 
request sent
 
2:00 PM
cool accepted
 
you know
I think I might want to try swift
> Influenced by Objective-C, Rust, Haskell, Ruby, Python, C#, CLU
> Typing discipline static, strong, inferred
> Instance Methods are Curried Functions in Swift
 
@thecoshman the ninjas are the best
 
2:15 PM
I find Japan's 99%+ conviction rate interesting
 
auto& type = **static_cast<Type**>(object);
I'm a two-star programmer!
 
Prelude Data.Default Main> let game = def :: GameState
Prelude Data.Default Main> let player = Redosia
Prelude Data.Default Main> let defgame = def :: GameState
Prelude Data.Default Main> let game = defgame { _units = [Unit 10 Redosia (Point 1 1)] }
Prelude Data.Default Main> isValid player game (Move (Point 1 1) (Point 2 2))
True
Prelude Data.Default Main> isValid player game (Move (Point 1 2) (Point 2 2))
False
woo
inb4 no lambda prompt
 
am I an asshole for not helping a mate cheat on his programming exam?
 
Just wondering. If you have a void** which points to a T*, and you static_cast it to a void*, can you static_cast that void* to T** and dereference that twice without UB?
 
I mean as a friend I should help
but it feels way too wrong
 
2:21 PM
@PolymorphicPotato I think yes.
 
and as if I'm not helping him with anything
 
// example:
T* x = new T; void* vx = x;
void** p = &vx;
T& y = **static_cast<T**>(static_cast<void*>(p));
T.f();
 
user3010322
Blah
 
user3010322
Tired of managing these libraries.
 
user3010322
Just going to include the source for all of them in my repo.
 
user3010322
2:27 PM
And then make projects to build all of them.
 
@AlexM. Considering what can happen to judges who don't convict the people the police tell them to, it's hardly a surprise though.
 
Ell
@ThePhD are you altering them?
 
user3010322
No.
 
user3010322
Except a few folders in, maybe, WebP
 
user3010322
and building configs.
 
2:32 PM
@PolymorphicPotato I think no.
While you can convert T* to void* and vice versa, this is not the case with T** and void**
 
Ell
@ThePhD so why include them in your repo?
 
user3010322
@Ell I include them in my repo and make projects for them.
 
Ell
Don't you have a central location for libraries? o.O
 
user3010322
@PolymorphicPotato Convert T** directly to void*
 
2:35 PM
@BartekBanachewicz Yes, you suck.
 
user3010322
T* x = new T;
void* dasvoid = static_cast<void*>(&dasvoid);
T& = **static_cast<T**>(dasvoid);
 
user3010322
That's an awful amount of indirection, though...
 
@AlexM. You should help before they need to cheat.
@PolymorphicPotato No.
 
@R.MartinhoFernandes is it a good idea to make my Point an instance of Ix to allow creating arrays indexed by it?
 
user3010322
2:37 PM
void* is the only thing that performs type erasure.
 
user3010322
void** does not: it's a pointer to the special void* type. :v
 
@R.MartinhoFernandes when he asks questions I answer
he seems to be fine with cheating instead though
 
Ell
Why can't a ctor infer template parameters again? I wonder when this will become standard
or if it will
it seems odd to have to have make_ for everything
 
user3010322
You can't explicitly provide template parameters for constructors
 
user3010322
They can infer just fine.
 
2:40 PM
@BartekBanachewicz I don't see why not.
 
instance Ix Point where
    range (Point minX minY) (Point maxX maxY) = [(Point x y) | x <- [minX .. maxX], y <- [minY .. maxY]]
    inRange ((Point minX minY), (Point maxX maxY)) (Point x y) = and [x >= minX, y >= minY, x <= maxX, y <= maxY]
@R.MartinhoFernandes so cool :3
not sure if should be y < maxY tho
 
Ell
you have a functional problem bartek
 
@Ell Because you don't know which type to infer parameters for.
 
@Ell really?
why?
 
Ell
@Puppy Oh yeah. That makes sense
 
2:48 PM
Also -XTupleSections is really surprising :S. cc @Fanael (#should-be-default)
 
Ell
@BartekBanachewicz You like it too much :P
 
Ell
@BartekBanachewicz You tell me :P
 
@Ell well you're saying "too much" without any reference.
Why should there be a cap on that?
 
Ell
2:53 PM
There shouldn't really :P You just seem to get a little excited
 
@Ell Sad he can't change it.
 
first I had a problem, then I used functional programming, now I have an immutable problem.
10
 
user3010322
I wonder if I can get the "largest" glyph out of FreeType in a single call...
 
user3010322
... Eh, I'll just iterate. Why not.
 
3:14 PM
@Ell I can't imagine a hobby without passion
 
My hobby is sleeping I'm very excited about it
 
@Ell Also this code in particular is where FP really shines IMHO
 
Also again waking up at 17 god
 
hihihi cc @MartinJames ^
hmpfh
I think that it's impossible to implement index and rangeSize for an (x,y) point without knowing the full size
I mean you could use that 1D-2D indexing
1 2 4 7
3 5 8
6 9
...
but that seems weird
hmm it looks like it hangs for me :(
 
3:35 PM
@CatPlusPlus oh I became more excited about that once I upgraded that hobby from a solo occupation to a social activity
 
@sehe I prefer sleep when required for recovery from social activities :P
 
you mean, solo sleep then? Yes, I agree solo sleep is more relaxing ni some situations. Depends on the company more than just a little bit though
 
G'day everyone.
 
    index b i | inRange b i = unsafeIndex b i
              | otherwise   = hopelessIndexError

    unsafeIndex b i = index b i
that seems puzzling. (IOW looks like an infinite loop alright)
oh right
> -- Minimal complete instance: 'range', 'index' and 'inRange'.
apparently minimal complete definition and minimal complete instance are different things. TIL.
@TannerSansbury hi
 
@TannerSansbury hi
 
3:44 PM
What do you think? Is "Teach me all of Windows programming" a little broad for one question? stackoverflow.com/q/25593519/179910
 
Copyright trolling saga continues. Someone claiming Big Buck Bunny rights, and thus right to show ads on it. http://t.co/BbhWwvECpC
 
@AlexM. makes total sense
 
@AlexM. :(
 
I bet it was you who stole my underwear
and you just didn't notice there were 2 more on the rack
 
/me hides
 
3:57 PM
@AlexM. I did. But I don't wear it. I used it to fuel our garden stove
 
ah I've realized that my super-short implementation gives a bad result
 
@AlexM. I left them, they seemed too dirty
 
@AlexM. It was actually my parents. Flew all the way to Romania, and all they brought me back was a lousy pair of underwear. Oh, this was before 1988, when my parents were still alive, right?
 
instance ToJSON GameMap where
    toJSON (GameMap a) = toJSON . toListOfLists $ a
        where toListOfLists a = [a ! p | p <- range ((Point 0 0), (Point 9 9))]
 
The relationship between your subject line and the rest of your post is obscure, to put it mildly. — Tom Zych 8 hours ago
lol indeed, I hadn't noticed
 
4:08 PM
gave me a lot food for thought
 
@BartekBanachewicz Fuck food. I've just been described as 'Broccoli chops' by the love of my life, just because I enjoyed our Sunday lunch.
 
@MartinJames vOv ease of the greens?
 
@thecoshman I like greens, as long they are not lecturing me about resource conservation.
 
@MartinJames what if it's way's to save money?
 
4:19 PM
@thecoshman OK, I should maybe not tar all conservationalists with the same green brush. Most, however, are essentially clueless.
 
@PolymorphicPotato With a simple trick, you can have as many stars as you want:
struct P{struct P*operator*(){return this;}}p;int main()
{
    *
    **
    * *
    ****
    *   *
    **  **
    * * * *
    ********
    *       *
    **      **
    * *     * *
    ****    ****
    *   *   *   *
    **  **  **  **
    * * * * * * * *
    **************** p;
}
2
 
I am implementing a compacting garbage collector.
 
Hm, I have never done that.
For what language/system?
 
I like sprouts too. Also, I may be a bit drunk.
 
@FredOverflow Custom VM.
 
4:21 PM
@FredOverflow looks solid
 
I represent objects as a pointer to the type followed by pointers to fields.
 
fuck me, @MartinJames is drunk
this has never happened before
 
@FredOverflow As a followup, the next time you go to a restaurant, ask them to dye some peas pink, then pop them on the grill just long enough to get a little brown. When they arrive, arrange them into a triangle. Result: Seared pink pea triangle.
 
Type& typeOf(void* object) {
    return **static_cast<Type**>(object);
}
I currently do this but it's probably horrible and dangerous.
 
A typeOf implementation probably should do static_cast.
Because that implies the type is already known.
 
4:26 PM
It's not a C++ type.
Because you cannot create those at runtime. :P
 
@MartinJames indeed. like most parties that stand for ideals but would be useless for actually leading a country, they are needlessly extreme about most details. My point was getting more at how most people seem to automatically against 'greens bastards' until they get told something like 'energy saving light bulbs can also save money...'
 
@PolymorphicPotato how do I create a Setter from a list based on a predicate?
 
It's pretty much struct Type { const std::size_t instanceSize; const std::function<void(void*)> initializer; const std::function<void(void*)> finalizer; const std::vector<std::string> fieldNames; }; (and a constructor to initialise those fields).
 
I'd like to mofify elements in a bigger list that satisfy a predicate
I could use sans and at I think
 
@BartekBanachewicz with lens and replace xs p y = [ if p x then y else x | x <- xs ].
 
4:29 PM
@PolymorphicPotato sweet.
 
Where lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b.
I don't know whether you can create a setter alone.
Would be silly I think.
 
wait your replace is not using lens
 
makeDatLens p = lens id (\xs y -> replace xs p y)
 
@PolymorphicPotato ah I think I get it
sweet.
 
4:33 PM
Now you can do [1, 2, 3, 4] & (makeDatLens even) *~ 2 -- returns 1 4 3 8.
 
<3 <3 <3
 
@FredOverflow I have a hard time following complex logic like (x & 1) ? ' ' : '*'. coliru.stacked-crooked.com/a/7ed68d824ffe27d7
 
Although I cannot think of any sensible getter for this.
Nah, id should work fine.
 
user3010322
@JerryCoffin Kinky.
 
user3010322
4:36 PM
@JerryCoffin Was part of me wrong for expecting the image to turn into a slinky and like, bounce away?
 
@ThePhD No need for anything to turn into anything. The dress is already slinky. Though I guess I shouldn't be surprised at the dirty-mindedness of wanting the dress gone.
 
@PolymorphicPotato what if I need to go deeper to set? :S
 
Compose using (.).
Oh wait.
 
applyMove = g ^. units . replace ((== start) . (^. position)) $ ^. position ~. end
the part after $ looks borked
 
It is borked.
 
4:40 PM
(I've changed replaceLens to replace)
 
You cannot have two operators next to each other like that.
 
@JerryCoffin I totally expected:
 
How about mapIf xs p f = [ if p x then f x else x | x <- xs ]?
 
hmm
then I'm getting something accepting a function... but where
I mean how does it link to a lens
it doesn't.
 
position .~ end is a function.
 
4:42 PM
it's .~
 
That's what makes x & position .~ end work; since (&) = flip ($).
 
@Borgleader Which, of course, is why I didn't do that.
 
I know, but see... I have a tendency to state the obvious
 
So you can do applyMove = g ^. units . mapIfLens ((== start) . (^. position)) (position .~ end).
 
4:44 PM
I'm trying to work on that
 
pred = ((== start) . (^. position))
applyMove = (g ^. units . replace pred) %~ (position .~ end)
 
@JerryCoffin " *"[x & 1] is far too readable, how about (x&1)[" *"] instead? ;)
 
@PolymorphicPotato hmm
 
@FredOverflow meh & 1.
 
4:49 PM
well @PolymorphicPotato apparently I'm still doing something wrong
but I am closer
 
Allocating memory for an object in a compacting garbage collector is so much fun!
 
@FredOverflow I don't like the parens.
 
It's just heapEnd += type.instanceSize!
 
why is [1,2,3] & mapped (+1) ambiguous, and over mapped (+1) [1,2,3] is not?
 
Ladies and gentlemen, I present: php programmers:
0
Q: Using wget with shell_exec and at command?

Duddy67I've been struggling with shell_exec PHP function and at linux command for 2 days. To make it short, this works: shell_exec('/usr/bin/at 09:32 <<EOF touch /var/www/website/hello.txt EOF' ); this doesn't: shell_exec('/usr/bin/at 09:32 <<EOF wget -O - -q -t 1 "http://192.168.56.1...

 
4:56 PM
fail link is fail
i guess youre one of them
 
@OmnipotentEntity reminds me of a guy using a socket instead of Guzzle or even the curl API.
 
@Borgleader I know that place!
 
@R.MartinhoFernandes Haha wat, seriously?
 
Yes!
It's close to work.
 
Nice!
Also, since you'r here, did you see my "bug report"?
 
4:57 PM
Yes.
 
applyMove = (g ^. units) & access %~ (position .~ end)
I've come to this
I just need access now
wait no
this is hard :S
 
Name things with letin.
It may make it easier to understand what you are doing.
 
doing it now
 
5:16 PM
Is there any company that provide the exams to be a MS certified online or they are all physical exams? For instance MSCD, etc...
 
@OmnipotentEntity Anything that's not game programmers (you excluded)
 
@JerryCoffin now I'm curious just how easy it was to travel to Romania in 1988
was it an open country, or closed akin to NK
 
cron is not equivalent to at :ssh:
 
@CatPlusPlus, this is true.
However, calling at from a php script to do a wget is brain damaged.
and he almost certainly wants to do whatever it is regularly.
 
Try explaining queue systems to person using PHP
Also speaking of cron, I should configure backups
 
5:22 PM
I guess it's not surprising tourism back then was closely supervised by our secret police
it was viewed as the #1 way for spies to infiltrate the country lol
 
People coming to the country is usually a good way to infiltrate it yes
It's kinda hard to do if you're not there
 
I think you're right
all resorts being owned by the state also made supervision easy
I'd really like to go back in time and live in communist romania for a week, to see how it was like
but no longer than a week
no wait, there was no internet back then
I'm fine here
 
Oh my. Vlad's at it again. My O(N) solution apparently wasn't good enough, so he's chimed in with an O(N^2 log N) solution instead. stackoverflow.com/a/25594372/179910
9
@AlexM. Honestly, I'm not sure. That was around the time the walls were crumbling, so the answer might have been somewhat different in January 1988 than in December 1988--but I'm not sure. The Berlin wall didn't come down 'til November 1989, so I'd guess it was probably still pretty well closed through most of '88.
 
@JerryCoffin I'm so glad that we have world class programmers like him around to keep us lowly plebs in line.
 
You're too troll to fully comprehend the betterness of this slower algorithm
 
5:37 PM
@CatPlusPlus Apparently--but at least he (or somebody, but almost certainly him, IMO) down-voted my answer to help keep me in line.
 
@JerryCoffin countered
 
> Unemployed.
Gee really
@Borgleader Don't do that that's dumb
 
@CatPlusPlus Dont do what? Upvote Jerry's answer? Its better =/
 
@Borgleader If you're upvoting because you honestly think it's helpful/useful, thanks. If you're doing it just to counter an un-explained down-vote...please don't.
 
@JerryCoffin Well it is better than his.
 
5:47 PM
@chmod711telkitty It is. It's just not... linked in both directions. Like a door you can only walk through from one direction.
There's a system that's supposed to fix these, but it needs some fixin'
IIRC, someone's working on that
 
the fix needs... a fix xD
 
user3010322
template <typename F, typename = typename std::enable_if<std::is_floating_point<F>::value>::type>
q( F f ) : res( static_cast<T>( f * detail::t_pow<2, m>::value ) ) {

}
 
user3010322
That's the proper kind of std::enable_if, right?
 

« first day (1415 days earlier)      last day (3530 days later) »