« first day (2229 days earlier)      last day (2720 days later) » 

4:00 PM
@BartekBanachewicz it's hard to remove the shit
 

C++ Questions and Answers

Solve problems and approach solutions. Just ask and lurkers wi...
 
@thecoshman If they forced me to use Java, I'd be looking for a new job. Like most jokes, if it has to be explained, it obviously failed. Sorry.
 
@nwp I can write in whatever really
doesn't mean I won't rant about it -.-
see the problem is that I get I can create working things in python
what really gets to me is the attitude of its community that disagrees with me
when they're obviously wrong
everyone's wrong
 
even you are wrong
 
I actually don't mind using Java
 
4:01 PM
I mind using any language really
all of them are bad
all of them
 
@ratchetfreak I probably should, but I haven't had a reason to touch it in a few years, and don't really expect to very soon either.
 
@ratchetfreak mmm is ther a mod that could possible move it there? Or should I just copy paste
 
The main problem is that people are fundamentally bad, so even with a good language, it'd be a pain in the arse to try and work with it
 
@thecoshman Well, that's the first problem.
 
@thecoshman but I find some comfort in using languages that are bad just because there weren't enough resources to make them better
 
4:02 PM
If people are going to violate things like SRP so much, they are going to do it not matter what langauge
 
using languages that are bad because their designers are dumb is just a pita
 
thanks Jerry
 
like, Lua also has numerous problems and annoyances
but at least I can feel that its creators really tried
and they had a smidge of competence
using python just makes me question human intelligence
 
Ven
@BartekBanachewicz did you know that in print(foo), (Python 2), the trailing comma is here to tell print not to append a newline?
2
 
4:04 PM
yes
 
Lua isn't that bad though... a bit funky, but nice overall
 
sure it isn't
but it's also far from perfect
 
Aiming for perfection can be a deep rabbit hole
 
so is Haskell, and Rust, and Terra, and whatever language you can say I "like"
@thecoshman if you're not aiming for perfection you lose no matter what
have you seen shooting competitors aim beside the target because they're gonna miss it anyway
 
Well... I have compose-able function things now vOv
 
4:06 PM
if your goal never was to make a language with non-retarded semantics, you sure as heck won't make one
 
@BartekBanachewicz "going to miss anyway"?
 
@thecoshman the whole "practical" bs
IOW making shortcuts in formal spec to make "print" spell out nicer
and then you get that
2 mins ago, by Ven
@BartekBanachewicz did you know that in print(foo), (Python 2), the trailing comma is here to tell print not to append a newline?
 
max
what's wrong with lua ?
 
but yeah, I know what you mean, if you don't even try to make a good language, and just cobble shit together as you need it... you get stuck with shit like PHP and JS
 
I actually really like Lua, so I guess I'm not the one to ask :P
@thecoshman precisely
it's a fundamentally different approach to design
 
4:07 PM
@Borgleader ooh fancy bullets
 
And refusal to depreciate means you don't get a new PHP that could have nice unified syntax. And even if you did, refusal to update and move on means you get stuck with python 2 & 3
 
correct again.
 
Ven
@thecoshman PHP did deprecate a bunch of stuff
 
this is all because of the shortcuts they make
 
Ven
Lua's multi-arg return is kinda weird tho.
 
nwp
4:09 PM
@BartekBanachewicz maybe not making shortcuts is prohibitively expensive
 
Ven
foo[bar()] = 5 # if bar() multi-returned, only the 1st value is used
 
I think it's great that Google looked at Angular, and basically said "Well... we certainly would do things differently if we started over. Let's start over"
 
@Ven the "check 2nd param for errors" idiom is kinda silly
@nwp sure, if your goal is to make a language in two weeks
that's how JS was born
 
Obviously, such antics have to be balanced, you are not going to build a community for a language/library/framework if every release invalidates everything ever. And with out a community it's very had for such things to be used
@nwp only if you are a shortsighted tool
 
that's why it's super important to flesh out important, hard choices early on
cue Rust early releases
 
4:11 PM
Or make it clear when shit is still wip "so don't write stuff and expect to be able to leave it alone for ever"... cue Rust
 
I am not saying that language design is easy, but pretending it is and going "I want all the nice syntax" route without tackling the hard problems won't make it so
@thecoshman they kinda did make it clear it's wip though
 
max
@Ven my eyes
 
@Ven actually I'm not sure how my VM would handle that
 
Ven
check and fix it
 
what do you mean by "fix"?
 
Ven
4:14 PM
it's probably broken in your VM :P
maybe because your VM is broken
 
@BartekBanachewicz my point
 
Ven
:(
 
over focus on "nice things" tends to leave a lot of warts in things you aren't thinking about in the design fase
 
@Ven although I will give you that I should really newtype the result list to get rid of that ugly partial head
 
Ven
4:19 PM
(:[])
 
what :D
inb4 "OMG OPERATORS"
 
Ven
from me?
cmon
 
nah, surely not from you
you made me realize that I actually miss working on Turnip
 
Ven
that's not my school :P
 
I just wish it wasn't so useless
 
Ven
4:21 PM
well
how much of Lua does it run
 
nwp
@Ven is that a "design fase" or an "ugly partial head"
 
Ven
@nwp it's a pure
@BartekBanachewicz just didn't want to write pure or return
 
nwp
ah, face-lift, right
 
@Ven I'm not particularly fond of monad/app instance for []
call me prejudiced
 
Ven
4:22 PM
well, pure/returnfor [] is easy enough to understand. (:[]) is a bit funny looking ;-)
 
eh, for one if I actually did that newtype, that pure could stay there
but that's about it really
 
Ven
no I mean
(:[]) is strictly equal to pure
 
as long as we're talking []. What I had in mind was a newtype/data to get rid of head, which, if made an instance of App, would still accept pure to construct it
 
Ven
so my solution is actually better on all points
: ^)
 
Ven
4:25 PM
nevermind that I've only written Haskell twice in my life
I'm the best at hoogle
it should dispatch to a metatable call, right?
 
oh, yeah. I just haven't implemented metatables yet.
 
Ven
wtf dude
so many monaderrors
that's ugly as fuck :c you could technically have an AST with an operator called for 3 operands >.>
 
@Ven Well if Lua could do e.g. (+)(a,b,c), yeah. But that won't parse.
 
Ven
;-)
can you change an integer's metatable?
 
I can never remember that actually
But I don't think Lua is particularly clever in its implementation either.
@Ven also, well, not really. AST.BinOp name lhs rhs kinda doesn't allow that. It's just when it's passed through eval.
 
Ven
4:32 PM
your types allow that. bad! :)
 
it's just because I resort to eval (Call ...) to call the operator
 
Ven
myeah
not gonna bore you on how I'd do that. Or on how I implemented my lisp in perl ;P
since eval doesn't do the same in both, by far. It should. Terra probably does
 
@Ven See, so technically my implementation isn't bad per se, it's just not really super close to Lua operator semantics :P
 
Ven
yeah..
the nitty-gritty are always dangerous.(or is? /cc @sehe)
 
I didn't strive at 100% Lua compatibility when I started, anyway.
 
Ven
4:35 PM
it's like your own™ Lua?
 
It was more "easily implementable subset" than "my own".
 
Ven
ah, that makes sense
 
4:56 PM
> the cold elixir makes you resistant to capturing objectives in wvw
capturing objectives confirmed coded as a condition (reference
cc @GundolfGundelfinger they really dropped the ball hard on QA this week so I’ll just mention this one, which is great
 
@Ven nitty-gritty is strictly an adiective, AFAIK. So, that means the choice is yours, depending on what you want to suggest is the numerus of the elided noun. (I'd expect the nitty-gritty details are always dangerous)
You might make it more intentional by saying "the nitty-gritties" (when it comes down to the nitty-gritties)
But I've not heard that before
 
sehe-en -Wpedantic
 
nitty-picky
 
Ell
woop woop
 
dooʍ dooʍ
 
Ell
5:08 PM
I implemented de bruijn renaming via a recursion scheme
I'm one step closer
 
Ven
@sehe I like it, thanks.
 
5:27 PM
88
Q: Fired because your skills are too far above your coworkers

Mik378I have been working for five months for a big French company building great things, a good product with trend methodologies. I've just learned from an internal coworker (technical expert) that I will likely be let go because there's a too huge of a gap between me and other developers in terms o...

headdesk
> I could cure cancer with template metaprogramming in C++, but many whom I work with are barely versed in the basics of Object Oriented Design.
lol
 
user406009
@fredoverflow Maybe that's an alt for Rapptz? :P
 
yay I've sold my amp
finally
 
Ven
gz
 
5:43 PM
it's been only taking space for quite some time now
I have to ship it though which is not fun
 
> a big French company
Well there's your problem.
 
Ven
^
 
@fredoverflow pff
 
Ell
not the paid ones :V
 
5:51 PM
@R.MartinhoFernandes Monnneeyyyyyy
 
Meet th robot robot from toyota. it can't walk but can say shit. to keep you happy
 
I'm probably going to migrate to F-Droid soon
The Play Store feels less welcoming every day
 
@R.MartinhoFernandes What's wrong with app store. Developers getting more greeedy or desperate?
 
Ell
hmm. I can't get **/*.idc to ignore *.idc across all directories in my .gitignore to work :3
 
wow curly braces are cancer
not that I didn't know it before
 
19 hours ago, by Feeds
posted on November 21, 2016 by Scott Meyers

In Effective Modern C++, one of the explanations I have in Item 7 ("Distinguish between () and {} when creating objects") is this: If you want to call a std::initializer_list constructor with an empty std::initializer_list, you do it by making the empty braces a constructor argument—by putting the empty braces inside the parentheses or braces demarcating what you’re passing: class Widget {

glad to see Scott blog about C++ again :)
> In my pre-retirement-from-C++ days, that'd have been my cue to dive into the Standard to figure out what behavior was correct and, more importantly, why, but now that I'm supposed to be kicking back on tropical islands and downing piña coladas by the bucket (a scenario that would be more plausible if I laid around on beaches...or drank), I decided to stop my research at the point where things got complicated.
 
Now I'm sad :(
 
so I made a presentation about MapReduce
I basically call Google a totally non-innovative crunch pit
@fredoverflow good to hear that other people are sane as well and are dropping C++
the humanity has to start stopping using it someday
 
6:32 PM
And replace it with what, Rust?
 
Ell
@BartekBanachewicz aren't you using it? :P
 
@Ell I am doing everything I can to avoid that
I stopped writing it at work more than a year ago
I am actively looking for alternatives for Arduino as well
@fredoverflow Or Terra. Or Haskell.
I've just basically lost any hope that C++ can be fixed
 
Ell
well, it's clearly the best option
 
even if after C++17 some major changes happen, at work we're about 5 years behind the cutting edge for core components. That means, given that C++20 will be a minor release, the earliest I can get reasonable features is 2028
 
6:36 PM
@Ell "clearly"? I'm not so sure.
 
Ell
okay, well "evidently"
@fredoverflow lol
 
@Ell argumentum ad populum?
 
Ell
I mean because you're using it
so you have determined it's the best option, for now at least
 
Ven
@BartekBanachewicz which is correct
 
@Ell It was the option that would give me the results quickest, but I don't consider it the best by far.
 
Ven
6:39 PM
The only reason I'd see myself working for Google is money. Which is not impossible but still subpar.
 
Xeo
@BartekBanachewicz "C++20 will be minor" what
It'll have all the TSs
 
@Xeo really?
what happened to the 3+3 cycle?
 
Xeo
C++17 is "minor"
 
Ell
^
 
Xeo
6:40 PM
or "medium-ish"
as Michael Wong put it at Meeting C++
 
I thought it was 11 big, 14 small, 17 big, 20 small ....
 
Xeo
that's what it was supposed to be
 
@Ell The speed of development is an important criterion for early prototypes, but for longer term projects.
 
Xeo
but 17 ended up being just "medium".
 
@Xeo sigh
@Xeo and 20 will make up for it?
 
Xeo
6:41 PM
but there are a whole lot of TS either released or almost ready for release
 
well then, that means I might start using "all the fancy stuff" in 2025
 
Xeo
as if you're still at that workplace in 9 years
well, 8
 
that's exactly my point
even if C++ eventually becomes decent, we're talking about a huge timeline here, and I see languages with much more potential
I can always learn it again in 8 years. I've proven I can do it once.
Right now I'd much rather see Haskell2018 with superb records which I could actually walk to a meeting with and say "we're gonna use that".
And again, for Arduino and super small embedded I really think Terra's metaprogramming model could be much better.
 
Ven
SuperbRecords(tm)
 
> cmake -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="AVR" ../
ugh
does that mean I need to build the whole LLVM
 
Ell
6:47 PM
well balls. I need to write recursion schemes for bifunctors or something like that vOv
 
> I doubt it. There aren’t any compile errors, but there are a few undefined
symbols while linking as of now. It can’t really be used just yet.
 
Ell
data TermF a b where a is the next type and b is the next term :S
 
7:10 PM
Okay that's a new one.
> It was quite strange back in the days when Java introduced a 4 letter extension, .java, when every other file-extension at the time was only 3 letters long. Kotlin cuts it down to two letters, .kt, almost as if they're making a statement saying, "we're tired of boilerplate".
@thecoshman lol
 
7:28 PM
That guy is just shooting in the dark because there's a bounty stackoverflow.com/a/40712540/85371 He has two "answers"
@Ven That's a keeper
 
7:59 PM
why the heck the kotlin is needed java is so fucking simple as javascript . PHP getting even more uglier.
 
user406009
@BartekBanachewicz Are there actual legitimate proposals to improve Haskell's records?
 
8:30 PM
Once you start using Boost Spirit, you realize every correspondind question on SO has been answered by @sehe
 
Only boost. And only parts of that.
 
@sehe How can I forward declare a rule?
I have to express a recursive rule, hence cannot just use auto as its type, clearly.
 
Huh. Forward declaration applies to types, right. Rules have relatively simple types, and you can only compose them by reference
 
Well, "forward declare" as in define it and then initialize it later
 
@Columbo Ah. I thought you already meant qi::rule<>. But, in that case: qi::rule<> (all the samples have it)
 
8:34 PM
@sehe Wait, is that x3::rule, or something different?
 
qi::rule<It> a, b, c;
a = b >> c;
b = ...;
c = ...;
 
Because x3::rule needs one template parameter at least, and that's supposed to be an ID
@sehe Wait, what?! You can assign the expression to it, but not initialize it with it?
I call bs.
 
@Columbo Are you using X3 (that's experimental). In that case, yes, still x3::rule. But you'll have to use a tag-type dispatch to associate a rule definition to the rule type (BOOST_SPIRIT_DEFINE() macro helps with that)
@Columbo I call gross impatience.
 
@sehe Why?
 
It's a smart way to enable compiler firewalling and still have maximum inlining. In fact, this is what makes X3 a lot faster than the already-not-too-shabby Qi
 
8:38 PM
Hmm, you know your shit. :-) Thanks a lot!
Wait... this doesn't work at block scope?
xD
 
@Columbo Nope. That's because the macros specialize ADL-enabled overloads for parse_rule<>, which is necessarily at namespace scope.
 
@sehe Wait, is this the trick employed by BOOST_TYPEOF? The one where the size of the return type of the overload is used to index a type table?
 
So yeah, there you have a drawback of X3. You can have close-to-Qi semantics (I think) using x3::any_parser<> (your friendly type-erasing rule adaptor, think std::function<> for parser expressions) but you ... pay
@Columbo I don't know how BOOST_TYPEOF works. Sounds... fascinating
 
Ell
volke
 
8:44 PM
i have this idea: constexpr + neural turing machines = lean back and let the compiler write the program?
 
Ell
neural turing machines?
 
turing machine with neural network (2014)
like, i imagine something like turing({1, 5, 2, 7, 4, 9, 8}, { 1, 2, 4, 5, 7, 8, 9 }, someVectorToSort);
with the first and the second ones being examples of what the compiler must program
 
@sehe Can the *_def be in another namespace?
 
of course, with more examples!
 
@JohannesSchaub-litb lol
 
8:53 PM
@Columbo Sure. The def could even be function local. The "def" is the "unspecified-type value"
 
@JohannesSchaub-litb There's a problem with that though, you'd have to use auto for the generated thing. hides
 
I want a neural tuning machine
 
user1804599
 
user1804599
Look at my beautiful farm.
 
9:02 PM
u got a live farming youtube channel?
 
user1804599
XD
 
Ell
9:25 PM
@rightfold very nice
I want to play minecraft now
 
user1804599
join :p
 
Ell
I'm eating :3
 
user1804599
I can whitelist you if you give me your nickname.
 
Ell
I think you already have me whitelisted
 
user1804599
This is a new server.
 
Ell
9:26 PM
ah
elliotpotts I think
 
user1804599
Only a couple weeks old.
 
user1804599
ok
 
user1804599
I sent you the IP on Slack.
 
uegh
my pcb's graph is p much nonplanar
 
poor electrons need to walk uphill
 
9:37 PM
it's all because I fucked up initial pin layout
I guess I'll have to go back to the drawing board with that
 
Man. There's not a lot to love about the way US is shaping up for the new term youtube.com/watch?v=aZZNz6HdEno
Thank you @free_coffee and @PSIAlt! This trick will allow my upcoming Asio-based library to provide both handler and coroutine-based APIs without having to implement everything twice! — Emile Cormier Dec 18 '14 at 17:28
I'm also quite excited about this
 
9:53 PM
@sehe How about it providing a future-based API? :(
WTB static reflection and code generation to get promisify_all.
 
WTB?
Want To Buy?
I'm not a big fan of those. Coroutines will be my go-to for a while.
 
user1804599
lol futures without monad abstractions
 
eh suck
if I do the ground on the 6th pin
that means I can't use my 5-pin connectors
I need 6-pin even for one-directional stuff
 
@rightfold Shush, I see a monad in your future.
 
there's way too much to learn about those things
 
9:59 PM
There. That should highlight this exceptional answer properly
The OP could use a vote to reward his bravery, too I feel.
It may be a good cause to phrase your question /that/ way (or post a new one) focusing on the design goals, instead of the incidental implementation mishaps encountered. (I'd figure that people like Tanner Sansbury would be able to shed some light there.) — sehe Nov 18 '14 at 23:36
And (shed-some-light) he did!
Two years down the road, I'm finally ready to absorb it and brave enough to start tackling this in my work codebase.
 
@Borgleader TIL: English is a programming language: stackoverflow.com/questions/40751409/…
 
@stevecheckoway @johnregehr Is this a competition now? I'm very competitive when it comes to terrible code.. https://t.co/I9e0iJK1mH
 
user1804599
10:27 PM
final class StringConverter implements Converter {
    use SingletonConverter;

    public function fromPg(string $pg) {
        return $pg;
    }

    public function toPg($value): string {
        return $value;
    }
}
 
I've finally got the most size-optimal sorting networks known to mankind /o/
Or least they correspond to the best sizes I've found on the internet.
 
An achievement would be to get a sorting network that is more optimal than any known to mankind. :P
 
I've got one.
 
Are you not part of mankind=?
 
hm
so
I am switching my network over from Verison to Verison
 
10:37 PM
@CaptainGiraffe I don't know.
 
Hmm. I need to think of a topic I could submit for ACCU. Ideally I'd talk about something cool that I've created, but... Vapor is that something cool, but it's really not far enough yet. :|
 
@Morwenn You expect an exalted status for this =) Morwenn, the first transcendental! =)
 
@Griwes Make a talk about how to survive in a C++ chatroom.
 
:D
...I'm not the right person to give that talk.
I'm the predator here. Usually. :D
 
10:41 PM
if there is apex predator, then there is bottom layer predator?
like a predator that every other predator picks on?
 
Also, hmm. Not sure I want to really showcase the code that Vapor's generating currently, Chandler could see it and start hating me for putting his compiler through having to compile it... :D
 
Tel, carbon got a pretty crappy deal.
 
carbon ... as the one in carbohydrate?
 
I have an acute case of project sadness
everything seems bland
llvm's avr support seems nonexistent
writing languages is hard
 
@Griwes That's also an appropriate way to survive :p
 
10:58 PM
Oh gosh, I forgot root password to my server
sadness overflow
 
this is interesting though
> safe and deterministic concurrency with side effects
 
nwp
they should really try to make these things less ugly
 
he did p much exactly what I wanted to do
even included raw C interpolation
oh this guy's from PUC-Rio
 
Having an army of solar panels is nothing new, an entire town near Ayers Rocks has been powered by solar.
 
11:03 PM
I guess making languages is popular there
interesting, looks like he wrote the compiler in Lua
 
@Griwes I don't have String.starts_with, but I guess I'd better write it out.
 
/* HACK_8: _ceu_occ holds __ceu_ret */
tceu_evt_occ __ceu_occ = { {CEU_INPUT__CLEAR,{_ceu_occ}}, CEU_APP.seq+1, &__ceu_range,
                           {(tceu_code_mem*)&CEU_APP.root,
                            0, (tceu_ntrl)(CEU_APP.root.mem.trails_n-1)}
                         };
oh god
I'm going to sleep
 
Night.
 
@Mysticial rofl
 
user1804599
Never cease to amaze
 
user1804599
11:10 PM
This is the calendar for any common year starting on Thursday, January 1 (dominical letter D). Examples: Gregorian years 1981, 1987, 1998, 2009, 2015, 2026, 2037, and 2043 or Julian year 1915 (see bottom tables). This is the only common year where three Friday the 13ths can happen; specifically, the months of February, March, and November. Leap years starting on Sundays share this characteristic. A common year is a year with 365 days, i.e. not a leap year. This kind of year has 53 weeks in the ISO 8601 week - day format. == References... ==
 
@Telkitty predetors have lower layers. Bottommost layer is called herbivore.
 
@Griwes At what point would you want to handle arguments with ----stuff ? That would almost always be an error...
 
never thought herbivores as predators, always associate them with preys
 
11:26 PM
They prey upon plants
 
and plants prey upon soil
 
nwp
plants are the most oppressed creatures on earth, even vegetarians devour them "because they taste good"
9
 
Ven
@ThePhD what do you think of my version
I wrote starts_with the line above._.
 
11:46 PM
@Ven Your starts_with will fail for a string of size 1 when called on --, because OCaml is smart and uses exceptions rather than option to communicate problems.
A simple if guard fixes that though
 
Ven
Substr str 0 N where String.length str < N triggers an exception?
I've never seen anything that retarded.
You're right that's easily fixed, tho.
On that note, it's 1am and I need sleep, not split.
 
let starts_with str pre =
	let prelen = (String.length pre) in
	prelen <= (String.length str ) && pre = (String.sub str 0 prelen)
That's the shortest I can do since short circuiting works in OCaml, I think.
@Ven Sleep well.
 
Ven
Sounds fair
 
Samoyed - wolf in sheep skin
 
So here is a description of my new, not described before, but not exactly original sorting network for 29 inputs.
3
I'm somewhat proud, now I can go to sleep :D
 

« first day (2229 days earlier)      last day (2720 days later) »