« first day (1584 days earlier)      last day (3373 days later) » 

9:00 AM
@sehe It is tightly packed (unlike Bartek's mom) already. The only explanation left is the specs are utterly wrong (like Bartek).
 
user1804599
Ah __closure__. Nice.
 
@райтфолд now I want to add lambdary things :\ like 'none' and 'any' that take a collection and a fn
 
user1804599
Or __globals__.
 
Fuck this I don't want to be a programmer anymore
 
user1804599
@thecoshman Java has that.
 
user1804599
9:01 AM
Oh wait you probably use Java 5! :D
 
@райтфолд Java 8 does
@райтфолд 7
 
user1804599
Java 8 is Java just like C++14 is C++.
 
that's why peeps to need to say they are suffering java 7 like they are suffering C++11
 
More like Java 8 is like C++11. Not really C++14, IMNSHO!
 
though, 7 and 11 are both at that point where you can start to tolerate life
 
9:03 AM
lol
 
@AMostMajestuousCapybara :) It's good to see you still caring. I like that
Hrmppff Stack Overflow is still inaccessible from the office. I'm strongly suspecting a prank now
 
@AMostMajestuousCapybara How long have you been doing it professionally?
 
Liar
 
@AMostMajestuousCapybara lol
 
9:03 AM
@AMostMajestuousCapybara congratulations, you are now a programmer :D
 
@sehe Hey this is my very first job since my graduation
 
What. Really. I thought you were pushing the buttons for maximum effect
 
@AMostMajestuousCapybara It took me about two years to get to that point.
 
proffessinal programming means you are ok with being shat on from up high
2
 
9:04 AM
So you mean, the first paid gig?
 
@sehe Okay, technically, 1 month and 10 days
 
@thecoshman senior :)
 
funny thing, I first miss spelt that as 'progresional'
 
So funny
 
@sehe oh
 
9:05 AM
@sehe Yes. First job that isn't an internship.
 
senior programmer means you get too see the ass hole shitting directly onto you
 
@thecoshman Nope. At least not where I work, being a senior.
I am well shielded.
 
vOv here we have people being made senior after like three years
which imo is an utter joke
 
@thecoshman Hmm...took me 4 years. lol
 
@AMostMajestuousCapybara I think the other experience counts as half a job.
 
9:07 AM
@sehe Is that a subtle compliment
 
@thecoshman seniority is not an automatic time thing. I'd make Robot senior in a jiffy
@AMostMajestuousCapybara It wasn't a sneer, if that's what you fear
 
lol, taking the shitting analogy...
 
My first job was working in automotive for Alpine Electronics' subcontractor. We were being fed shit and we pooped out something that was less shit than the shit we digested. lol
 
> Write valid JSON with operator<<
No shit
 
9:10 AM
{ "operator<<" : "valid JSON" }
 
@sehe oh I know that, I just think it cheapens the notion when most people are going for it after only such a short time. These are people in their first job as well.
 
fuck python, spent like 20 minutes debugging an error due to an indentation problem.
 
> // You can use this hideous syntax if you do not want to bring in the whole jsonv namespace:
using jsonv::operator"" _json;
This one doesn't look to be entirely hot air though
 
jsonv::hot_air
 
@thecoshman Some really are precocious
 
9:13 AM
@sehe huh?
oh sure, some maybe 'senior' level almost right away, but when 90% of people are senior and most after a few years, none are.
 
True (unless you have a brilliant team)
 
... just some of scrubs who are not wanted any more.
but can't just be fired
 
And when I sum the fields manually I get 229 WHAT IS GOING ON
oooh
I figured it :)
And it pisses me even more.
Wait no.
Okay fuck this
I'll become a chef instead
 
hint: you're doing it wrong
 
user1804599
NICE
 
user1804599
9:19 AM
@require(lambda: x >= 0.0)
def sqrt(x):
    import math
    return math.sqrt(x)
 
user1804599
I got this working. :)
 
user1804599
No need to repeat x in the lambda!
 
The documentation is really littered with expressions like "this is not very complicated", "JSON Voorhees provides utilities to make this easy for you to use", "JSON Voorhees makes this very easy for you.", "Putting values of different types is super-easy", "JSON Voorhees is designed with ease-of-use in mind", "However, there is an easier way!", "JSON Voorhees takes a "batteries included" approach."
Anyhoops. It looks like this library actually delivers some gooddity
 
9:21 AM
@sehe we need an std::json
 
user1804599
No, we need proper Unicode support first.
 
user1804599
lol C++ and Unicode
 
we really don't.
 
> union value_storage
{
object_impl* object;
array_impl* array;
string_impl* string;
int64_t integer;
double decimal;
bool boolean;
};
@Mikhail nope. Boost Json, maybe
 
user1804599
eww union
 
9:22 AM
I don't get you guys, python has built in json support and it works for me, why can't I do it with C++?
 
mmm. I was hoping it would have the zero copy approach rather than dyn-alloc for anything > 2 pointers
@Mikhail Because C++ is not Python
 
@Jefffrey I had a nice talk with my flatmate about record syntax and so I obtained another PoV on the matter. We basically agreed that given TH, you can simply not use record syntax at all and write everything as naked Q expressions that will generate the data for you; that's what records ultimately do, but implemented as a language feature, not a library. If TH was more decent we could kick records out for good.
 
user1804599
JSON in statically typed language is a pain unless you have automatic marshalling/unmarshalling like in Go, or dynamic typing like in C#.
 
user1804599
C++ makes both extremely difficult.
 
@sehe Thats circular reasoning, if you give me json we will be 50% there...
 
9:24 AM
> with my flatmate
(a) This must be tiring (b) I thought you moved in with your gf? (did I miss something)
@Mikhail 50% where, exactly?
 
@sehe To having C++ replace python
 
lol
 
BWHAHAHAHAHAHAHAHAHAHAHAA
@Mikhail Good luck with that
That's the largest non-sensical non-goal I've heard in my entire work-week until now
 
user1804599
C++ doesn't have to replace Python.
 
user1804599
C++ and Python have completely different goals.
 
9:26 AM
@райтфолд C++'s has the aim of RAII, everything else is taste?
 
@sehe Hasn't the work week just started?
 
user1804599
@Mikhail I don't see what RAII has to do with anything.
 
@sehe we moved in together with Natalia and a bunch of friends. Before we had a two-story house with a garden, and right now the same bunch of us is renting a fairly large apartment closer to the centre. It was cheaper back when I was studying more intensely. That being said, we're in progress of refurbishing a flat that "freed up" in my family and are planning to move there on our own around March
 
user1804599
Python has GC and with, so?
 
user1804599
(which are vastly superior)
 
9:27 AM
ATM we have a ~33msq room for our two.
 
lol
 
@райтфолд for most applications, yes
 
user1804599
WTB Perl 6's let in C++.
 
user1804599
> Restores a variable's value at the end of scope if the block exits unsuccessfully
 
user image
6
 
9:31 AM
> non-sensical non-goal
 
@sehe must.not.start.another.oop.debate.
 
Dat accidental sentence grouping
 
Hi guys
 
@BartekBanachewicz Aw. It must be really hard to be hear if /that/ already tempts you
Just star as funny, and keep your pants on
 
@sehe No SomethingProxyFactory :(
 
Why would the telly be a singleton!!!
 
@AndyProwl No ShitMultiplexer aka toilets
 
Yeah that too
 
Needs jokes about Windows
 
> We're really sorry, but anonymous uploading in your country has been disabled.
> Please <a href="/register">register for an account</a> and try uploading again.
How about <i>no</i>
 
9:36 AM
@sehe lol
 
user1804599
None if json_account['Logo'] is None else b64decode(json_account['Logo']) I want Option and map fuck Python.
 
@райтфолд map fuck [python]
 
user1804599
fuck has side-effects. You lose.
 
user1804599
sequence_ $ map fuck [python]
 
user1804599
Or just fuck python.
 
9:37 AM
What kind of side effects
 
user1804599
Impregnation.
 
user1804599
Pregnant pythons create more pythons.
 
let rec spawn = ...
 
What did I walk in on?
 
user1804599
9:38 AM
Although with human seed you end up with /r/hybridanimals.
 
@райтфолд so you replaced his side-effectless map with an effectful sequence_? wtf dude
 
Match /r/* with -> bunch of faggots
 
user1804599
@BartekBanachewicz applying fuck is useless if you throw away the result.
 
don't throw it away then
@Maxpm Haskell, as always
 
@BartekBanachewicz I already said it
 
9:41 AM
lol
you're just jealous because your language can't display thousands of polar bear images
 
It can display billions of cartesian bear images
 
user1804599
I just wrote some beautiful code:
 
user1804599
def _json_to_logo(json_logo):
    if json_logo is None:
        return None
    with BytesIO(b64decode(json_logo)) as data:
        return Image.open(data)
 
user1804599
@BartekBanachewicz That's what I do by using sequence_.
 
print too hipster?
 
user1804599
9:50 AM
print $ map fuck [python] is pointless.
 
user1804599
It prints a list of I/O actions.
 
@AMostMajestuousCapybara :S
 
(~.~<.~>\\+.) :: (Profunctor p, Functor f) => (a -> f b) -> p b r -> f (p a r) This operator clearly specifies what it does in the type.
hihihihi
 
user1804599
What'd you do if decoding some data can succeed but you substitute failing parts with null but still want to report errors?
 
user1804599
10:00 AM
Currently I just add the errors to a set and return a pair of the resulting data and a set of exceptions.
 
{-# LANGUAGE QuasiQuotes #-}

fNeedle :: (Int, Int, Int) -> (Int, Int, Int, Int)
fNeedle = [nd|
    }=={(+1)}=\==========================>
              \
    }===\     \             /============>
        \     \             /
    }=) \ (==={uncurry div}=/={negate}===>
        \
        \=={(*2)}========================>
|]
lol language ideas for rightfold
 
user1804599
Embed Funciton in Haskell.
 
user1804599
Funciton is extremely interesting.
 
user1804599
And invariant under 90° rotations!
 
@райтфолд you will want to specify context here
@райтфолд At least the double "but" is confusing. How many oppositions did you really want to make?
 
user1804599
10:03 AM
@sehe Importing customer data from accounting software JSON API, but if decoding the customer's logo fails I don't want to abort the whole import, but I do want to signal that decoding the logo failed.
 
@sehe Double butt for maximum confusion
 
user1804599
I currently do this:
 
user1804599
try:
    with BytesIO(b64decode(json_logo)) as data:
        return Image.open(data)
except Exception as ex:
    errors.add(ex)
    return None
 
user1804599
And later return result, errors.
 
user1804599
I think it's the right approach.
 
user1804599
10:08 AM
Logging/whatever is up to the API consumer.
 
user1804599
; Proteus exposes a single macro, proteus/let-mutable:
(use 'proteus)
(let-mutable [x 0]
  (dotimes [_ 100]
    (set! x (inc x)))
  x)
 
user1804599
Now this I like.
 
user1804599
Today is the birthday of Galileo Galilei.
 
@sehe do you know how to use Qi without Phoenix?
 
10:20 AM
@райтфолд the usual approach is to import everything and return the rejected records annotated by the rejection reason. The point of the exercise is to make it extremely easy for user/admin to retry the rejected batch (by copy/pasting the reject batch, and optionally editing)
 
Galileo Galilei (Italian pronunciation: [ɡaliˈlɛːo ɡaliˈlɛi]; 15 February 1564 – 8 January 1642), often known mononymously as Galileo, was an Italian physicist, mathematician, engineer, astronomer, and philosopher who played a major role in the scientific revolution during the Renaissance. His achievements include improvements to the telescope and consequent astronomical observations and support for Copernicanism. Galileo has been called the "father of modern observational astronomy", the "father of modern physics", the "father of science", and "the father of modern science". His contributions...
1 day off
 
@R.MartinhoFernandes Hmm? What is the problem? Because you can't - obviously - but it's very easy to use it without Phoenix in the interface. Perhaps you can link some code (on SO)?
 
user1804599
@sehe I see.
 
@sehe I mean, if I want to use C++ lambdas for semantic actions, do I need to do something special? Which argument types should they take, etc.
(A link to docs would suffice)
 
user1804599
So I return a pair of the correct data and a set of (invalid data, error) pairs.
 
10:23 AM
@R.MartinhoFernandes I don't think it's in the docs. It should work for BOOST_RESULT_OF_USE_DECLTYPE compilers (which in 1_57 should be most relevant compilers)?
 
user1804599
Seems very nice. Thanks.
 
@R.MartinhoFernandes Sadly it's indeed not in the docs. boost.org/doc/libs/1_57_0/libs/spirit/doc/html/spirit/qi/… - Might be somehwere else still. I think the most useful article for you would be boost.org/doc/libs/1_57_0/libs/spirit/doc/html/spirit/qi/…
 
Thanks.
Btw, how do you debug this shit?
 
#define BOOST_SPIRIT_DEBUG BOOST_SPIRIT_DEBUG_NODES((rule1)(rule2)...) :)
 
user1804599
I have been thinking of different equality methods.
 
10:27 AM
I would really like to just see the stuff. But I have a feeling you prefer to navigate on your own
 
heh the polar bear app would be a great screensaver actually
 
user1804599
One for value equality, one for at-the-moment equality and one for numerical equality.
 
@sehe It's hard to make small.
A finicky AV.
 
AV?
 
10:29 AM
they suck. I'm gonna call infinite left recursion... 30% chance factoring the dev skill in
@BartekBanachewicz It's clear that you don't really appreciate screensavers much
 
hmm i would appreciate if my app wouldn't busy wait though
14% CPU usage suggests filling single core to 100%
maybe I could sleep just a bit
 
hehe love it
added sleep 0 -> CPU usage 14% -> 1%
 
user1804599
nice it.
 
user1804599
and use other programs
 
10:36 AM
huh... isn't their a function like 'yield' that is meant to signal that your thread is willing to let others do stuff at this point
 
@BartekBanachewicz Er.
 
Except yield puts your thread in the ready list while sleep suspends it from being scheduled again for the specified duration
 
@AMostMajestuousCapybara the difference being...
 
@BartekBanachewicz you have 7 cores?
 
10:37 AM
@sehe no, 3.5 with hyper threading
 
@Rapptz I didn't think repeat (0) was that useful.
 
@AMostMajestuousCapybara wow. I didn't know that
 
user1804599
Should I support expando objects?
 
@FredOverflow File under "late replies"
@райтфолд Nope. They're bad for your health
 
@FredOverflow What about 10?
 
10:38 AM
@sehe 4x2
 
user1804599
@sehe how?
 
@R.MartinhoFernandes Ten is fine
@райтфолд For the same reason that VB6 is bad for your health. Actually it's worse. You don't need this.
 
Oh nevermind. Got confused by the stupid backslashes.
 
user1804599
@sehe OK
 
10:39 AM
That doesn't bode well for the parser o.O
 
@thecoshman What is not clear in my sentence?
 
sigh. arseholes.
 
this is very interesting
 
@AMostMajestuousCapybara well, how does that differ in practice? Either way the thread is ready to start work again (especially when you sleep 0).
 
the cpu usage drops to 1 after I save a file in ST
 
10:40 AM
Jun 26 '14 at 19:58, by rightfold
Arrays and dictionaries FTW.
 
sigh, fuck perf optimizations
 
Jun 21 '14 at 11:14, by rightfold
I like dictionaries.
 
user1804599
lol
 
@R.MartinhoFernandes What about it? 10 is between 1 and 999.
 
@thecoshman Eh, they're different mechanisms. I agree the difference between yield and sleep 0 is tenue though.
 
10:42 AM
@FredOverflow depends on you're point of view
@AMostMajestuousCapybara but effectively they do the same. I see how 'yield' and 'sleep 1000' differ, you have have that minimum time before your thread could start up again.
 
No they don't do the same
There's 2 different syscalls for that
 
o_0 my belly just made a grunt like a zombie pigman from minecraft
@AMostMajestuousCapybara 'effectively'
 
Xeo
@thecoshman Eating zombie pigman is not advised.
 
let's say you have a really busy core, does yeild() or sleep(0)` impact that order your thread would be resumed?
 
The sleep 0 will prevent your thread from being scheduled in the remaining time slice, which is not the case of yield
Like, imagine there are no other ready-threads: yield will return immediately, sleep 0 won't
 
user1804599
10:47 AM
%3 = call i32 @_Z1gv()
ret i32 %3
 
@AMostMajestuousCapybara ooh, so yield could become a more like a no-op if the core is not doing much, but sleep(0) will force at least some idle time
 
user1804599
clang y u no TCO
 
@райтфолд it hard problem to solve man
 
@thecoshman It's a no op if no other thread can be scheduled
 
@AMostMajestuousCapybara oh, well I see now. that makes more sense... so yeah... if you just want to give other threads a chance to do stuff at the end of each iteration, 'yield()' would be preferable... maybe...
 
user1804599
10:49 AM
I need TCO. :<
 
though I'd guess it's probably not worth worrying about such low level stuff.
 
Depends how level your program should be
 
AARGDFGdFGFJSLKDFHSJKLEHFS
 
@thecoshman I just worry about the CPU usage
 
It's either polymorphic lambdas or Phoenix :(
 
user1804599
10:51 AM
Hmm it does a tail call if there are no locals.
 
@райтфолд Maybe it likes foreigners only
 
I wish c++ had a proper type for bit flags
 
hmpf still filling the cpu time
 
user1804599
I know what I will do.
 
the hell
 
10:52 AM
@EtiennedeMartel is that you
 
user1804599
I will transform the tail recursion into a goto.
 
        Just t <- liftIO G.getTime
        let tDiff = t - (lastUpdateTime gs)

        let desiredFPS = 60.0
        let desiredSPF = 1.0 / desiredFPS

        when (tDiff > desiredSPF) $ do
            runHate $ updateFn gs
            modify $ \x -> x { lastUpdateTime = t }

        when (tDiff < desiredSPF) $ do
            liftIO $ threadDelay (floor $ 1000000 * (desiredSPF - tDiff))
am I doing something terribly wrong
 
yay our Moscow network admins allowed stackoverflow.com traffic again o.O
@R.MartinhoFernandes Them lovely context types....
@R.MartinhoFernandes I'm pretty sure (convinced) you could achieve whatever you need by simpler means. I never use lambdas or handwritten SA functors. I hate those. I field all my needs using vanilla attribute propagation/transformations or the Customization Points
 
Meh, I'd have had a lot less trouble if I just wrote a parser by hand. C++ sucks.
2
 
@BartekBanachewicz why? if you have a program that has work to do, I'd worry about it not using CPU
 
10:57 AM
@R.MartinhoFernandes Or this library is too ambitious for C++03..1y support
 
No, C++ just sucks for this.
 
@thecoshman no, it just has to run at constant intervals
 
External parser generators FTW. I can actually debug those.
 
Also, I keep saying I recommend Spirit only if people write adhoc parsers a lot. So you can afford the learning investment
 
@BartekBanachewicz oh, 'fixed' fps shite?
 
10:58 AM
@R.MartinhoFernandes I think Spirit X3 should be loooots better (it's also c++11/y only). But it's a labour of love (like Spirit v2) and there's no due date
 
@thecoshman not fixed fps. Fixed update step
 
I never got the point of the fixed update
 
If it's an EDSL in C++, it's bound to be subpar.
It's bound to be stuck with subpar tooling (i.e. none).
 
@AMostMajestuousCapybara it can make some things easier
 
hm okay the idles are way too short for some reason
 

« first day (1584 days earlier)      last day (3373 days later) »