« first day (2413 days earlier)      last day (2518 days later) » 

12:06 AM
So I have a Rust struct that's basically a glorified array of Strings in named fields. Should I expose a Foo::new(str, ...) interface, or should I just leave it as-is and expect instances to be declared using Foo { name: String::from("str"), ... } syntax?
 
Ell
why do you need to use String::from("str") instead of just "str"?
 
@LucDanton eh bah :(
 
Because rust keeps literal strings (str) and string classes (String) separate for performance reasons. I need the String class, but input is almost always str.
Just wondering whether to go with verbose syntax + explicit meaning, or to go with concise syntax. If I do Foo::new(str, ...), then you have to know the expected order for the input. There's 9 different fields to assign.
 
user1804599
It doesn't do it for performance reasons.
 
user1804599
It does it for semantic reasons.
 
user1804599
12:13 AM
str is the same as [u8] except guaranteed UTF-8.
 
@BoundaryImposition It's almost as if the Trump regime wants to maximize the exposure of terrorist threats in Europe :|
 
user1804599
String is the same as Vec<u8> except guaranteed UTF-8.
 
user1804599
str is not only for string literals. It's like std::string_view.
 
@rightfold Yeah, that's correct. In a roundabout way, it gives better optimizations because Vec is harder to reason about (not impossible) at compiletime.
 
user1804599
A &'a str can point into a String.
 
user1804599
12:16 AM
A &'a String can't.
 
user1804599
They serve different purposes.
 
Yes. So that out of the way, should I choose concise or explicit in this context?
 
user1804599
If you want ownership, use String, otherwise use &'a str or &'a mut str.
 
Ell
@Aaron3468 have a with_strs or something named constructor
 
user1804599
Your constructor should take a String.
 
user1804599
12:19 AM
This way the caller can decide to move an existing String if they already happen to have one.
 
Ell
@rightfold he wants convenience though
 
user1804599
Don't take by reference if you are immediately going to copy it.
 
@rightfold That's a fair compromise I think.
 
user1804599
@Ell Then he shouldn't use Rust.
 
user1804599
Also convenient can be built on top. It must not be a requirement for API design.
 
user1804599
12:21 AM
A good API is easy to implement and easy to adapt.
 
I wonder if it would be possible to make a macro that 'zips' a series of value expressions onto the fields of a struct.
Rather than doing the classic series of self.value = value; in the constructor with each argument.
 
This isn't a C++ question, but rather a general question. I'm wanting to make a game and have been for a long time but I'm not sure where to start really. I know the programming language I want to code it in well. However, I am still not sure where to start as I do not know how to do computer art, modeling, etc. I only know how to use the language and it's API's that come with it
 
@fredoverflow thank god; i never understood why they were opposed to the idea before
 
I was going to ask this as a normal question on the website but I was afraid it would get deleted or locked because it somehow not qualify as a programming question
 
@MarfGamer Download Unreal Engine and start with that.
 
12:30 AM
I will do so immediately
anything else I need to know?
 
@MarfGamer Games are hard to make. Very hard. And most of the work that goes in a game isn't code.
 
Alright. I was thinking that code would be a smaller part too (Modeling, Texturing, Voice Acting, Music Making, Map making, etc.)
 
@EtiennedeMartel Exactly this. Coding an engine is hard. Making a concept that's fun and generating good content is even harder
 
@Aaron3468 Engines aren't even hard to make. They just take a while.
I worked on a game engine for several years. It's not so bad.
 
Yeah, lots of patience, a bit of good design. Not a lot of difficult code.
Just a large amount
 
12:38 AM
Games are hard because it's hard to know in advance what makes a game "good".
Most problems in game engines have already been solved.
In games? It always seems like you have to start over.
 
What do you mean "start over"? As in come up with new concepts?
 
Try something.
Oh it doesnt work.
rinse repeat until it does
 
ah
 
Basically you make something, see if it's fun or interesting, then try again. Also look for any bugs and decide whether they're worth patching/blocking (because no engine is perfect).
And art/music can be one of the more time-consuming parts of development.
 
Right
I currently have a basic story that I've been drafting with my friend, have game concepts, know what the characters should look like, etc. But I haven't been able to see if any of that actually works yet as a game
However, since we're on this topic at the moment, when would be the time for someone to make their own game engine other than for the sake of making a game engine?
 
12:50 AM
Don't make your own engine if you have the choice. A studio has time, budget, and people to make custom engines. Indies don't generally have enough to commit to a custom engine, especially if they want to release cross-platform.
The only time it's really feasible is if you need functionality that is abnormal, like true non-euclidean geometry + raytracing.
What genre is your game idea?
 
First person shooter than switches between from First Person Shooting to Third Person combat for certain things, kind of like in Dead by Daylight
Except not a horror game
So yeah I wouldn't really need an entire engine to switch the camera angle here and there
I got that idea from playing Dead by Daylight actually, simply switching the camera view made a huge change in the gameplay and I wanted to try and make a game that did something similar.
 
Nope, you won't need a custom engine. Unreal Engine is a perfect fit for you. Not going to lie though, a first person game, especially ones that are not demos, are long projects.
 
I wouldn't be surprised. For now I'm going to try to make a demo with models of the characters with them talking, doing their moves, etc.
 
Start with stock assets and develop from there.
 
Alright
 
12:55 AM
So basically, get everything more or less working the way you like, then worry about animating, modelling, music, etc. last. There's lots of good free content to prototype with.
 
ok
 
1:07 AM
WHAT
HOW HAVE I NOT BEEN TOLD ABOUT UNREAL ENGINE BEFORE
I'M ONLY IN THE TUTORIAL AND IT'S ALREADY AMAZING
 
A) lay of the caps lock
B) stop living under a rock. problem solved.
 
tru tru
 
1:21 AM
^^; It's a pretty huge name in game dev
 
Unity Engine is another one
 
Unity's okay, but not so nice looking. They're both the de facto engines though.
 
1:48 AM
man this was a confusing conversation before I remembered I had marfgamer plonked
@Borgleader @TonyTheLion cautious floof
 
2:45 AM
@Xeo Alice to Zouroku is a good show to watch on a side monitor while I'm multi-tasking.
A bit too boring to give my full attention to. :)
 
I can't watch anime as a side thing yet
reading subtitles requires attention and I can only listen to japanese with 5% accuracy
also such listening would most likely also consume all my attention
 
It took me some time to be able to do that.
I don't always need to read the subtitles to know roughly what's going on.
Even if I don't understand exactly what they're saying, I can get a good feel for it from just the tone and the setting.
 
I'm okay as long as the stuff they're talking about is pretty simple.
 
It's usually the really technical shows that need full attention.
 
3:06 AM
@jaggedSpire lol
 
Just started Clockwork Planet. Looks like another good background show.
Instantly recognized OP as fripside.
 
3:25 AM
lemme guess, your multi-tasking only 2 things: watching anime and chatting on the internet
 
3:43 AM
enum class SamplesPerPixel { invalid, one, three };
const std::map<int, SamplesPerPixel> int_SamplesPerPixel = { {1,SamplesPerPixel::one},{ 3,SamplesPerPixel::three } };
const std::map<SamplesPerPixel, int> SamplesPerPixel_int = { { SamplesPerPixel::one,1 },{ SamplesPerPixel::three,3 } };
^ lol, should have been an int for example.
 
> as sharp as a sack of wet mice
welp, that's a new one
 
@Mikhail ew
 
Neither wet or mice contribute anything towards being sharp, although random items in the sack such as mice bared teeth and tiny claws maybe sharp and can cause damage in unintended areas. I would not suggest handling a sack of wet mice with bare hand.
 
 
1 hour later…
4:57 AM
Hmmm, the more I look at this problem, the more I realize I'm just coming up with an absurdly verbose way to do it.
 
5:12 AM
....huh
I'll be 25 and three minutes less than three hours old when the solar eclipse hits totality in the south of the city I currently live in.
illuminati confirmed
 
<3
 
I'm just saying hi. I won't be there for three whole days.
 
sad ones
 
Stay safe and loving :3
Bye ^^
 
5:16 AM
@Morwenn <3 <3 <3 You too
 
:))
@jaggedSpire Also good luck.
 
thanks :)
 
@jaggedSpire Step 1. don't
 
@RudiantoPrasetya alas, the web service I was working with and assumed was implemented in a sane way is a pandora's box of bad decisions, untestable code, hanging resources including database connections, hidden assumptions and singletons. The guy actually also partially made his own dynamic typing system. In C#.
As the only one who knows wtf it's even supposed to do, and the one who wanted new functionality out of it...
:\
I've not been this angry in months if not years
it's beyond the pale
It's less than a year old
what the hell
 
@jaggedSpire lol
 
5:28 AM
that's not even the custom SQL binding it uses
 
you absolutely don't want to see the code here
 
that wraps everything in XML and then parses it again.
why?
 
@Morwenn <3
 
For the glory of Satan, I'd say. But Satan has standards
 
There is a special circle in hell for those developers who write singletons
 
5:30 AM
this web service shouldn't even be logically grouped with its surroundings. It lies on completely different assumptions than the code it re-uses. He had to have known that--he wrote the code it reused in the first place!
 
using System.JobSecurity;
 
@jaggedSpire that picture on the cover is perfect
 
@RudiantoPrasetya oh, he's gooone
@Cauterite the picture link is actually broken for me :V
 
@jaggedSpire then it's one of those devs who dgaf
 
seems right
also former manager that according to rumor lied about recent coding experience to get back to development
 
5:33 AM
@jaggedSpire well you've got the book, so i'm assuming you've seen the cover
 
@jaggedSpire "ah yes I've written many kernel modules using only CSS3 and HTML7"
 
@Cauterite well, I saw it on the website. I got the kindle version, and the display I use doesn't show the covers...
 
what a shame
 
@RudiantoPrasetya lol
 
reminds me of running IIS in kernel mode
 
5:36 AM
ISIS in kernel mode
 
eh, I can change it back. It's just such a pain to go through the book listing page by page that I try to maximize the books per page
 
@Mikhail lol
 
i can't imagine ever owning more than about 3 books, wouldn't be a problem for me
 
2.3 is a good number to own
 
they keep adding use guides and I'm too lazy to remove the old ones
also I have...9 books on this
a whole 9
v impressive, me
 
5:39 AM
7 of them are the harry potter trilogy
 
and you can't fit them all on one screen?
 
especially not with all the user guides
 
You can listen to the code listings while working out at the gym!
 
I sometimes watch C++ conference videos at the gym
 
@RudiantoPrasetya two are actually dresden files. Four are code-related
 
5:40 AM
"what the fuck is this guy doing"
 
bein' a neeeerrrrd
 
@jaggedSpire as in dresden, germany?
 
I actually read the majority of Effective Modern C++ on the treadmill, so
 
nearly falling off at each SFINAE
 
@RudiantoPrasetya as in Harry Dresden, Professional Wizard in Chicago
 
5:42 AM
@jaggedSpire oh :(
 
that time of the month
need to pick up sim card from post office
now I only have 2 sim - one for everyday use, one for testing
 
@RudiantoPrasetya it's a good series and I like it, but I keep putting off reading it for the latest fanfic lulz because I'm an uncultured fool
wizard books are wizard
 
5:56 AM
what's it about? @jaggedSpire
or is it literally about a wizard?
 
it is literally about a wizard who is also a private eye and occasionally helps the CPD when things go south in a weird way.
it's great
and with that, it is bedtime
 
applying sunscreen to your face like you are waxing an apple!
not that I have waxed any apples
 
why would you put wax on an apple?
 
6:32 AM
@Cauterite why put makeup on face?
 
that was my next question
though i'm not sure sunscreen qualifies as makeup
 
to help preserve the flavour
 
mmm, wax…
*drools*
 
6:46 AM
That explains why apples feel so greasy.
 
@Cauterite Maybe they feared people would confuse type inference with dynamic typing? :)
 
@Mysticial bakabt is back up, but no new accounts can be made and you have to login to view anything.
 
7:11 AM
@jaggedSpire I cringe whenever I see "Robert C. Martin Series"
 
What does the T-shirt say?
 
Don't tell the Pope - Eretical lecture tour?
 
Heretical lecturer
 
nwp
@fredoverflow zazzle.com/…
 
7:25 AM
@nwp Hmm... I wouldn't wear it.
 
7:39 AM
@fredoverflow zazzle.com/…
 
8:18 AM
@Mikhail Kotlin is <3
 
@sehe yes
"omg look how immigration has ruined their lives, and also we don't care about protecting operational integrity for them because this is the USA and providing information to American citizens is all that matters"
it's sick
we wouldn't dream of being so callous the other way around
 
Heretical lectourer
 
nwp
@BoundaryImposition there are countries that do that, but they are labeled "axis of evil" or something like that
 
8:36 AM
> Haskell.org projects
Safe streaming with linear types
@RudiantoPrasetya itshappening.apng
 
9:07 AM
how do i do this using unique_ptr if my compiler does not support make_unique? std::make_shared<std::thread>(&ThreadPool::worker, this)
 
there’s not much point to an std::unique_ptr<std::thread>, you might as well be using the std::thread directly
 
but that would create it inside the stack instead of in the heap , right ?
 
why do you need it to be on the heap?
 
C makes heap cheap
 
if the thread runs a lambda , wouldn't there be a chance that it would run out of stack memory ?
 
9:18 AM
@spakai the short answer is no. an std::thread object stands for an OS thread, but it isn't that thread. e.g. scribbling over such an object does not scribble over what’s happening in the thread, the same way that defacing an std::ofstream object is unlikely to write output to the file it stands for
 
@spakai why are you concerned with lambdas in particular?
you're not using a lambda in your example, yet you're trying to allocate the thread object on the heap
there's not a lot of difference between lambda and non-lambda in this respect
the thread is going to have its own stack
 
@LucDanton Impressive
inb4 angery rustaceans
 
ok. so there is no reason to actually creating it in the heap then. i have seen some code that does that .
 
@LucDanton Is it actually specified that stud thread stands for an OS thread?
 
@RudiantoPrasetya sort of, yeah
 
9:28 AM
Would a conforming stud implementation be allowed to implement stud thread as fibers instead? Entirely in user mode, I mean.
 
@RudiantoPrasetya you’d need to preserve thread_local semantics
 
@LucDanton I guess that's not too complicated
 
outside of that I don’t think the end-user could observe a difference, could they?
I have no idea how that ties to C threads though
 
@Andy
 
@LucDanton From within the language no
 
9:31 AM
@spakai hm?
 
@RudiantoPrasetya the term is 'ornery' btw
 
- Abilities
Moves Evasively
Blocks
seems about right
Should've also added refactors threading model every few months
 
don't thread on me
 
say ma phore say ma phore
 
don't multithread on me
 
9:45 AM
@Andy i create the threads , the the worker() picks up lambdas from the queue and executes them. std::deque<std::function<void()>>
 
@spakai Try std::future
 
10:02 AM
@Mikhail I do have lambdas packaged into std::packaged_tasks wrapped in a shared_ptr and then passed into the std::deque<std::function<void()>>, so i get std::future from the packaged_tasks
 
@spakai The pitfall with that scheme is that threads are not well pooled. You might have a few ms overhead from costly thread creation/destruction, and also migration.
I'd recommend you wrap everything into a producer/consumer style queue
 
@Mikhail is that an overhead because of std::packaged_task or something else?
 
creating and destroying new threads has overhead, quite a lot actually
 
I expected something more peculiar :)
 
Well on Windows condition variables have poor response time by default, if you're looking for oddities
 
10:13 AM
I already removed having shared_ptrs pointing to threads after the earlier discussion :) unit tests still work.
 
@spakai a little ugly, so done doesn't need to be an atomic and while (!done) should be while(true)
also wtf is this (unsigned int i{0}; i < numberOfThreads; i++)
i=0
also you have a class but all the members are public
 
it’s subtle but std::function is redundant. everything can be done in terms of std::packaged_task, which in turn means that the std::shared_ptr<std::packaged_task<…>> workaround can be removed and flattened to std::packaged_task<…>
 
10:29 AM
thanks @Mikhail @Luc Danton, gonna look into it.
and digest it
 
10:55 AM
@BartekBanachewicz why?
 
#BREAKING NATO will join anti-IS coalition at Trump summit: Stoltenberg
WELCOME TO THE CLUB!
 
Jan 14 at 13:23, by milleniumbug
@fredoverflow I've tried sleeping but I accidentally stumbled over the original article and was so enraged while reading it, I can't sleep now
 
It's not clear but the significance of this message is that U.S. wants to share costs of Syrian war.
 
@jaggedSpire probably that one
 
...is that book ill-regarded?
 
11:07 AM
@LucDanton "defacing" :D
@spakai that code is either weird, or has some lifetime management requirements - it's not unusual to use "the heap" (read: dynamic storage duration) simply to get finer control over lifetime
like otherwise, if you're in a function, your std::thread is just going to go out of scope pretty soon
but yeah the std::thread could be as pathetic as a single pthread handle or smth (I don't know exactly what it needs to store)
> I have seen this piece of code in one of the C++ project in windows enviroment. just wondering what does the meaning of %12.10lg. Anyone has idea?
kill me
 
@jaggedSpire actually dunno, I doubt "Uncle Bob" actually dabbled much with it
I own a copy but I've yet to start reading it
 
From the first three chapters, he seems to be making a fair amount of sense so far. The main premise of the book seems to be that untested code is legacy code, and I can see someone taking issue with that.
It seems to mostly discuss refactoring techniques to demystify and modernize code while not introducing bugs, namely writing tests for your system, splitting it into smaller subsystems where it's easy to do so without changing much code and writing tests for those until you get to reasonably sized chunks of functionality that have all expected cases fully tested so you can tell if and where you break something
nothing really bizarre
 
nwp
I have yet to experience the benefits of increased productivity from tests.
 
but I'm only 1/12 of the way through
 
nwp
All that I have found tests to be good for is to lock down behavior which usually is not what you want.
 
@nwp in this case it seems like it is what you want at least
 
Ell
@Mgetz why would they?
 
@Ell because this could compromise the security of thousands of british citizens for no actual value
just because Theresa May is an idiot doesn't mean that GCHQ is
 
@Mgetz goodbye lads
 
@ChemiCalChems I don't get it?
 
11:35 AM
@Mgetz i don't know if you get it or not, why not ask yourself?
jk, i'm just saying goodbye to the british people
 
@ChemiCalChems your response makes zero sense
 
@Mgetz both responses make sense. the goodbye lads one was a joke on british being unable to communicate outside the uk and the question about why you are asking me was a joke in the punctuation you used in that sentence
 
@BoundaryImposition which code is weird , the shared_ptr or the one without
 
@spakai the one with, possibly (but probably not)
it really just depends
@Mgetz Theresa May is actually a pretty decent leader IMO. But government has long been an advocate for Big Brother style oversight somehow without comprehending its inherent danger
I'm considering defecting from the Conservatives in this election for a number of reasons (mostly internet privacy and fox hunting, if I'm honest; more funding for the NHS wouldn't hurt either, but the crunch on services is actually fundamentally not their fault) and it's frustrating that that comes at the time when their leader is actually pretty decent
 
11:50 AM
@BoundaryImposition she's no Margret Thatcher, but she's 1000x better than Corbin who has no backbone. As for the actual issues I can't speak to that largely
 
12:03 PM
F^&%$&*%!!! Terribly bad news! Neighbour is renovating the shed (garage/storage/granny flat), the possum that used to live there is moving house ... into our garage! It might be the same possum that used to live in our garage until it's evicted ...
 
user1804599
Can you enable -fwrapv for a specific expression?
 
user1804599
Maybe I should just enable this anyway.
 
@Mgetz :/
Oh well
 
@R.MartinhoFernandes just be glad that banks are moving out of the UK
 
12:27 PM
@Telkitty fucking migrants
 
hobo wildlife
nomad
alien possum
 
> > "not being happy with its implementation" is basically dev talk for "it's shit, we know, we'll work on it"
> [game director:] It's shit, we know, we're working on it.
 
said possum
 
@Telkitty I thought its a bat until I read the text below the image
 
nwp
12:44 PM
@Telkitty looks like a sky demon
 
those eyes, right? ... click to enlarge and enjoy the full (blur) resolution
half purple, half orange .. totally demonic
 
Police catch a pigeon with 200 ecstasy pills hidden in a little backpack https://t.co/vSB9eYtd84
4
 
user1804599
drugsduif
 
@nwp systemctl restart sky
 
1:40 PM
Can enum class be passed accross dll-interface? Will different CRTs understand same enum class?
 
@Borgleader @TonyTheLion :)
 
@Mgetz Corbyn, and he is a communist.
 
you say that like it's implicitly a bad thing
are you an american
 
1:56 PM
@Telkitty Terribly bad news, indeed. Devastating. We'll try not to forget Marawi, Manchester and May. But it sure is hard to keep reporting on everything fairly when things like evicted possums returning after a travel ban take the lime-light, understandably.
@BoundaryImposition He's a wilx, a class of his own
 
@jaggedSpire I don't think about him very fondly
 
is the reason you're not fond because of technical competence or personality?
 
@jaggedSpire there's no need to be rude about Bartek
 
I meant something like being a horrible person in real life, or being someone like Peter Sommerlad who doesn't know what they're talking about at all
 
again there is no need to accuse Bartek of such horrible things!
 
user1804599
2:29 PM
if (in == 0.0) {
  REQUIRE(!std::signbit(value));
}
 
user1804599
yay I thought of the negative zero edge case
 
user1804599
SECTION("2147483647") { test_neg_int(2147483647.0, -2147483647.0); }
SECTION("-2147483647") { test_neg_int(-2147483647.0, 2147483647.0); }
SECTION("-2147483648") { test_neg_int(-2147483648.0, -2147483648.0); }
 
user1804599
:v:
 
@jaggedSpire I would throw the stick :D
 
2:41 PM
13
Q: What is the main difference between chmod and chown?

saravana kumar kandasamiIn some examples, I saw that some used chown instead of chmod. I do not know where to use chmod and chown. Please explain to me the difference between them, when and why I should use either.

13 upvotes.
(at least)
 
user1804599
> In Japanese culture, Hatsuyume (初夢) is the first dream one has in the new year. It is considered to be particularly good luck to dream of Mount Fuji, a hawk, and an eggplant.
 
user1804599
wat
 
@rightfold I'm pretty sure if you can have both 3 things in one single dream which is the first of the year.... Then you might be lucky to have all the condition to happen for something as unlikely as this.
 
user1804599
I throw away most CVs since I only want lucky candidates.
 
3:09 PM
@rightfold lol
it's cheating anyway
if you're Japanese the last thing you think about on the last day of the year is probably "boy, I hope I dream about Mount Fuji, a hawk and an eggplant". And then it's in your mind...
the only thing you're potentially risking then is that you have the dream slightly before midnight, though I believe the odds are low
 
3:43 PM
Pentagon finds that more than 100 civilians killed after the U.S. dropped a bomb on a building in Mosul in March. http://apne.ws/2r05SMH
4
remind me, did they darken that French tower because of that?
 
Abyx, I wonder how you can breathe with all that hatred stuck in your throat all the time.
5
 
dark_eiffel_tower_for_isis.jpg
@EtiennedeMartel why do you think it's "hatred"?
why would one hate reality? it's like hating winter
 
@Abyx remind me, didn't you get kicked for that already?
 
Abyx never gets kicked.
 
@R.MartinhoFernandes for picture or a file name?
or maybe for something else?
I can't tell, didn't see any explanation back then
no really
think of it - IS kills your civilians - or you kill IS' civilians. Can you see a difference? I can not.
however I see lots of hypocrisy
 
user1804599
3:55 PM
@sehe Where does _a_type come from?
 
at this rate ill repcap on one answer \o/ I feel like @Mysticial :P
 
lol
 
4:12 PM
@Ell Because a lead-in line like: "There been no suggestion that weakened security would have stopped the deadly attack in Manchester" that's clearly missing a word makes it look like Brits can't speak English as well as Americans--and claiming mastery of the English language is nearly the only consolation that people like LRiO have in life.
 
4:34 PM
@rightfold From the header. Specifically it's a Phoenix placeholder type
 
user1804599
Thanks, I found it.
 
user1804599
@sehe Does does your example construct a Array from a vector when the constructor is not inherited?
 
It's a placeholder for the qi::local. You could also use boost::phoenix::ref(somelocalvar) but that's less clean: makes the grammar stateful and therefore not reentrant/threadsafe
@rightfold No. Spirit propagates into bound container attributes by push-back (it's a generic policy, so it also works with non-push-backable containers. In fact, it's extensible to your own types)
So, I didn't inherit the constructors because I did't need to.
Minimalist Bjarnism
 
Just noticed this:
197
Q: Tearing Down the Structure of Documentation

Jon EricsonIf you have told us (or privately thought) Documentation isn't working: You are correct. It isn't. Yet. Since early on in the private beta of Documentation, we’ve used a simple, rigid structure: Tags => Topics => Examples + optional sections At the time, users wondered if this was the right s...

So instead of accepting the sunk cost, they're doubling down on it. I hope it doesn't put too much of a drain on resources from the main site.
 
user1804599
@sehe OK.
 
4:38 PM
good evening gentlemen
 
@Mysticial omg tl;dr
 
user1804599
@sehe Can I turn a parser that yields an A into a parser that yields a B if I have a function B(A)?
 
I have a question but I've no idea where to ask it - Quora is too unreliable, programmers.SE would tag it off-topic.. so maybe it's worth asking here since the visitors are really experienced developers. It's a methodological type of question.
 
@rightfold Yes, using a semantic action
 
user1804599
[qi::_val = phoenix::bind(make_array, qi::_1)] like so?
 
4:45 PM
Though if the function is constructor, you can use attr_transform<> (with implicit conversion only)
 
user1804599
I get incomprehensible errors.
 
@rightfold Basically. Look at phx::function<MakeArray> make_array; though. That makes it [_val = make_array(_1)];
 
@Mikhail One of the recent Skylake X benchmark leaks seems to suggest that the higher-end HEDT models might actually have the good AVX512. But no where near enough info to draw any real conclusions.
 
@rightfold SSCCE or GTFO :)
 
user1804599
src/bytecode.cpp:109:57:   required from here
/usr/include/boost/spirit/home/qi/auxiliary/lazy.hpp:161:13: error: no type named ‘type’ in ‘struct boost::result_of<boost::phoenix::actor<boost::phoenix::composite<boost::phoenix::detail::function_eval<1>, boost::fusion::vector<boost::phoenix::value<boost::spirit::terminal<boost::spirit::tag::repeat> >, boost::spirit::local_variable<0>, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > >(boost::spirit::unused_type, boo
 
4:46 PM
(I need to run. I'll find it later)
 
user1804599
lol
 
user1804599
I don't think I will use Spirit.
 

« first day (2413 days earlier)      last day (2518 days later) »