• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 15:08
CEST 21:08
KST 04:08
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL22] Ro16 Preview: Rough Waters10[ASL22] Ro24 Preview: Siren's Call8[ASL22] Ro24 Preview: Summer's End9Serral wins HomeStory Cup 2915Serral wins Maestros of the Game 244
Community News
StarCraft open world shooter announced at BlizzCon22Weekly Cups (Aug 30-Sep 7): herO thrives amid growing schism10Official StarCraft website teases new content ahead of BlizzCon?154Stellar Fest TWO the Moon (Dec 16-20)9Weekly Cups (August 24-30): Patches' balance mod takes over3
StarCraft 2
General
StarCraft open world shooter announced at BlizzCon Balance hotfix patch 5.0.16b (July 16) Team Liquid Map Contest #22: Results and Winners Weekly Cups (Aug 30-Sep 7): herO thrives amid growing schism SC4ALL: II Winner will earn a spot at HSC 30!
Tourneys
RSL goes to London! 2026 Offline Finals Nov 21-22 KSL Week #92 IntoTheTV X SOOP SC2 League : Weekly & Monthly 2026 GSTL Announcement Sparkling Tuna Cup - Weekly Open Tournament
Strategy
[G] Having the right mentality to improve
Custom Maps
Nexus Wars 2021 GUIDE [M] (2) Industrial Park
External Content
Mutation # 542 The Ascended Mutation # 541 Binary Choice The PondCast: SC2 News & Results Mutation # 540 Dodge This
Brood War
General
Official StarCraft website teases new content ahead of BlizzCon? Broodwar Prediction Market BGH Auto Balance -> http://bghmmr.eu/ Practice Partners (Official) [D] Brainstorming a balance patch for Brood war
Tourneys
[ASL22] Ro16 Group A [ASL22] Ro16 Group B Escore Tournament - Season 3 Small VOD Thread 2.0
Strategy
Replay Review Process - What do you do? Simple Questions, Simple Answers Odyssey Mineral Stack Saturation Game Theory for Starcraft
Other Games
General Games
Nintendo Switch Thread EVE Corporation Diablo IV [Maplestory Hardcore] Let's Play~!! General RTS Discussion Thread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
[TL LoL EUW IHs] Teemo shall perish TSM pausing esports and CLG Dead
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread UK Politics Mega-thread Things Aren’t Peaceful in Palestine Trading/Investing Thread Russo-Ukrainian War Thread
Fan Clubs
MarineLorD Fan Club The Creator Fan Club The ShoWTimE Fan Club
Media & Entertainment
Diablo Animated Series on Netflix Movie Discussion!
Sports
Football (Soccer) Thread TeamLiquid Health and Fitness Initiative For 2023 MLB/Baseball 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Northern Ireland Global Starcraft
Blogs
Virtual Romance, Real-Life C…
TrAiDoS
Regacy Esports:Our Goa…
regacyesports
Dreaming of BW patches (mod…
c3rberUs
LOCKPICKING NOOB
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 6881 users

The Big Programming Thread - Page 555

Forum Index > General Forum
Post a Reply
Prev 1 553 554 555 556 557 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
xtorn
Profile Blog Joined December 2013
4067 Posts
Last Edited: 2014-12-07 18:15:16
December 07 2014 18:14 GMT
#11081
On December 05 2014 05:55 darkness wrote:
Has anyone had experience with drawing images in C# by utilising GPU? I have to use Win Forms and GDI+ doesn't seem too nice when it has to draw frequently on a bitmap. The problem is CPU usage is higher than acceptable, and I think GPU should do the heavy lifting here.

you need a third party solution that will offload from CPU to GPU.
Cudafy is really cool, i played with it once. It's a sort of plug and play solution, that lets you pass workload to the GPU, switch data back and forth between CPU and GPU , stuff like that.

https://cudafy.codeplex.com/documentation

Download, reference the assembly, then it's as easy as:


[Cudafy]
public static void SomeCalculation()
{
//this executes on the GPU because of the cudafy attribute
}
<3 things - Life | Kane | Innovation | Scarlett | Solar | MMA
Ben...
Profile Joined January 2011
Canada3485 Posts
December 07 2014 20:08 GMT
#11082
On December 08 2014 03:14 xtorn wrote:
Show nested quote +
On December 05 2014 05:55 darkness wrote:
Has anyone had experience with drawing images in C# by utilising GPU? I have to use Win Forms and GDI+ doesn't seem too nice when it has to draw frequently on a bitmap. The problem is CPU usage is higher than acceptable, and I think GPU should do the heavy lifting here.

you need a third party solution that will offload from CPU to GPU.
Cudafy is really cool, i played with it once. It's a sort of plug and play solution, that lets you pass workload to the GPU, switch data back and forth between CPU and GPU , stuff like that.

https://cudafy.codeplex.com/documentation

Download, reference the assembly, then it's as easy as:


[Cudafy]
public static void SomeCalculation()
{
//this executes on the GPU because of the cudafy attribute
}

Oh wow that looks really neat. I think I'll mess with it a bit after finals. Maybe implement some image processing stuff and compare how fast it runs on my CPU vs. on my GPU. I quite enjoy doing that kind of stuff.
"Cliiiiiiiiiiiiiiiiide" -Tastosis
delHospital
Profile Blog Joined December 2010
Poland261 Posts
December 07 2014 21:34 GMT
#11083
On December 07 2014 20:10 spinesheath wrote:
So they didn't actually fix anything with HTML5. Good that I don't really do that stuff.
Just comparing the size of these two pages says everything...
http://www.w3.org/TR/html5/syntax.html#syntax
http://www.w3.org/TR/html5/the-xhtml-syntax.html

The HTML5 syntax is very simple (it's 8.1 in the page you linked). The complicated part is the parsing algorithm (8.2), the intent of which is to handle non-conforming documents in a uniform fashion across all browsers. If your job is creating websites, then you don't need to worry about any of that.
Manit0u
Profile Blog Joined August 2004
Poland17843 Posts
Last Edited: 2014-12-09 09:23:04
December 08 2014 12:02 GMT
#11084
On December 07 2014 20:10 spinesheath wrote:
So they didn't actually fix anything with HTML5. Good that I don't really do that stuff.
Just comparing the size of these two pages says everything...
http://www.w3.org/TR/html5/syntax.html#syntax
http://www.w3.org/TR/html5/the-xhtml-syntax.html


Why do you even compare them? You know of course that the second document you linked is just a layer added on top of the first one so it's rather the question of reading just the first document or both of them?

On December 08 2014 01:36 sabas123 wrote:
im having to make a full featured chat plugin for wordpress with node js with 0 js experiance, its confusing as fuck0o


WordPress sucks. Don't do anything for WordPress. Let it die a horrible death.

And speaking of JS experience - just wait until you see stuff like that:


var someVar = !!foo.bar;
Time is precious. Waste it wisely.
Manit0u
Profile Blog Joined August 2004
Poland17843 Posts
December 09 2014 11:32 GMT
#11085
Does anyone here have experience with Magento? I could use some help...
Time is precious. Waste it wisely.
bangsholt
Profile Joined June 2011
Denmark138 Posts
December 09 2014 17:21 GMT
#11086
On December 09 2014 20:32 Manit0u wrote:
Does anyone here have experience with Magento? I could use some help...


It helps to state *what* you need help with, rather than asking if someone can help, unless it's something that's specific to Magento - but that's hard to guess ;o)

On December 08 2014 21:02 Manit0u wrote:
WordPress Magento sucks. Don't do anything for WordPress Magento . Let it die a horrible death.


:o)

On another note... I was dumb a year ago when I first setup source control, spent a whole day today cherry-picking in Git to untangle the mess I made.

Now, all hail the Gitflow! (Atlassian style)
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
December 09 2014 18:04 GMT
#11087
https://www.atlassian.com/git/tutorials/comparing-workflows/centralized-workflow

hmm, this is a neat article, puts into words all the stuff i want to do but don't :p
There is no one like you in the universe.
RoyGBiv_13
Profile Blog Joined August 2010
United States1275 Posts
December 09 2014 18:12 GMT
#11088
On December 08 2014 21:02 Manit0u wrote:
+ Show Spoiler +

On December 07 2014 20:10 spinesheath wrote:
So they didn't actually fix anything with HTML5. Good that I don't really do that stuff.
Just comparing the size of these two pages says everything...
http://www.w3.org/TR/html5/syntax.html#syntax
http://www.w3.org/TR/html5/the-xhtml-syntax.html


Why do you even compare them? You know of course that the second document you linked is just a layer added on top of the first one so it's rather the question of reading just the first document or both of them?

On December 08 2014 01:36 sabas123 wrote:
im having to make a full featured chat plugin for wordpress with node js with 0 js experiance, its confusing as fuck0o


WordPress sucks. Don't do anything for WordPress. Let it die a horrible death.

And speaking of JS experience - just wait until you see stuff like that:


var someVar = !!foo.bar;


The Bang-Bang is a time honored tradition of converting an int to a boolean. I'd hardly consider it an egregious JS error. Of course, it's javascript, so its not actually a boolean, but "1" or "0", which is baffling in itself.
Any sufficiently advanced technology is indistinguishable from magic
Manit0u
Profile Blog Joined August 2004
Poland17843 Posts
Last Edited: 2014-12-10 09:30:42
December 10 2014 09:23 GMT
#11089
On December 10 2014 02:21 bangsholt wrote:
Show nested quote +
On December 09 2014 20:32 Manit0u wrote:
Does anyone here have experience with Magento? I could use some help...


It helps to state *what* you need help with, rather than asking if someone can help, unless it's something that's specific to Magento - but that's hard to guess ;o)


It's VERY specific to Magento backend, but I've made some headway in this matter.

And a work-related question to all of you. The current situation in my company is pretty crap since 3 senior devs are leaving which will leave me as the single person doing the backend for 3 existing and 5 new projects until the replacement is found (which might be never, seeing how in the past 2 months the company has hired only 1 junior dev while interviewing 5-6 candidates each week). Now, the predicament I'm in is that I most likely won't be able to handle all those projects by myself, especially that some of them use custom features developed by the company I work at (and I'm not working here long) but haven't worked on yet. The senior devs say that it's pretty complicated and those custom features are full of bugs and hacks and are under the process of being re-written from scratch... All this will leave me with no choice but to work over hours on stuff that I might not be able to handle and then not get paid because the projects will fail or at least fall way behind schedule.

Should I jump ship while I still can?
Time is precious. Waste it wisely.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
Last Edited: 2014-12-10 10:56:09
December 10 2014 10:55 GMT
#11090
On December 10 2014 18:23 Manit0u wrote:
Show nested quote +
On December 10 2014 02:21 bangsholt wrote:
On December 09 2014 20:32 Manit0u wrote:
Does anyone here have experience with Magento? I could use some help...


It helps to state *what* you need help with, rather than asking if someone can help, unless it's something that's specific to Magento - but that's hard to guess ;o)


It's VERY specific to Magento backend, but I've made some headway in this matter.

And a work-related question to all of you. The current situation in my company is pretty crap since 3 senior devs are leaving which will leave me as the single person doing the backend for 3 existing and 5 new projects until the replacement is found (which might be never, seeing how in the past 2 months the company has hired only 1 junior dev while interviewing 5-6 candidates each week). Now, the predicament I'm in is that I most likely won't be able to handle all those projects by myself, especially that some of them use custom features developed by the company I work at (and I'm not working here long) but haven't worked on yet. The senior devs say that it's pretty complicated and those custom features are full of bugs and hacks and are under the process of being re-written from scratch... All this will leave me with no choice but to work over hours on stuff that I might not be able to handle and then not get paid because the projects will fail or at least fall way behind schedule.

Should I jump ship while I still can?


Unless there is something revenue affecting that doesn't work at that point in time and did work before you touched it, i.e. you screwed it up, don't work overtime. If projects fail or fall behind schedule because you are understaffed, it's not your fault. Make sure your superiors understand in advance, i.e. right now, that this will happen and then it's their job to find a solution, not yours. If they require you to work overtime outside of maybe launch/release day because of their screw-ups, well, don't.

Whether you jump ship or not is up to you, but in the end if you aren't happy in a company, you can always shop around anyways without straight up quitting first.
Khalum
Profile Joined September 2010
Austria831 Posts
December 10 2014 12:12 GMT
#11091
On December 10 2014 19:55 Morfildur wrote:
Show nested quote +
On December 10 2014 18:23 Manit0u wrote:
On December 10 2014 02:21 bangsholt wrote:
On December 09 2014 20:32 Manit0u wrote:
Does anyone here have experience with Magento? I could use some help...


It helps to state *what* you need help with, rather than asking if someone can help, unless it's something that's specific to Magento - but that's hard to guess ;o)


It's VERY specific to Magento backend, but I've made some headway in this matter.

And a work-related question to all of you. The current situation in my company is pretty crap since 3 senior devs are leaving which will leave me as the single person doing the backend for 3 existing and 5 new projects until the replacement is found (which might be never, seeing how in the past 2 months the company has hired only 1 junior dev while interviewing 5-6 candidates each week). Now, the predicament I'm in is that I most likely won't be able to handle all those projects by myself, especially that some of them use custom features developed by the company I work at (and I'm not working here long) but haven't worked on yet. The senior devs say that it's pretty complicated and those custom features are full of bugs and hacks and are under the process of being re-written from scratch... All this will leave me with no choice but to work over hours on stuff that I might not be able to handle and then not get paid because the projects will fail or at least fall way behind schedule.

Should I jump ship while I still can?


Unless there is something revenue affecting that doesn't work at that point in time and did work before you touched it, i.e. you screwed it up, don't work overtime. If projects fail or fall behind schedule because you are understaffed, it's not your fault. Make sure your superiors understand in advance, i.e. right now, that this will happen and then it's their job to find a solution, not yours. If they require you to work overtime outside of maybe launch/release day because of their screw-ups, well, don't.

Whether you jump ship or not is up to you, but in the end if you aren't happy in a company, you can always shop around anyways without straight up quitting first.


I agree with this 100%. If you screw something up you need to fix it. But don't clean up behind others, especially overtime.

Also, I'd probably not jump ship right now because I like challenges and I'd want to at least give it a go. If it doesn't work out it doesn't work out but the potential for improving yourself and learning a ton would definately be tempting for me. Just don't let the situation get to you. Do what you can and be upfront about what you can and can't handle.
_fool
Profile Joined February 2011
Netherlands685 Posts
December 10 2014 12:17 GMT
#11092
On December 10 2014 19:55 Morfildur wrote:
Show nested quote +
On December 10 2014 18:23 Manit0u wrote:
On December 10 2014 02:21 bangsholt wrote:
On December 09 2014 20:32 Manit0u wrote:
Does anyone here have experience with Magento? I could use some help...


It helps to state *what* you need help with, rather than asking if someone can help, unless it's something that's specific to Magento - but that's hard to guess ;o)


It's VERY specific to Magento backend, but I've made some headway in this matter.

And a work-related question to all of you. The current situation in my company is pretty crap since 3 senior devs are leaving which will leave me as the single person doing the backend for 3 existing and 5 new projects until the replacement is found (which might be never, seeing how in the past 2 months the company has hired only 1 junior dev while interviewing 5-6 candidates each week). Now, the predicament I'm in is that I most likely won't be able to handle all those projects by myself, especially that some of them use custom features developed by the company I work at (and I'm not working here long) but haven't worked on yet. The senior devs say that it's pretty complicated and those custom features are full of bugs and hacks and are under the process of being re-written from scratch... All this will leave me with no choice but to work over hours on stuff that I might not be able to handle and then not get paid because the projects will fail or at least fall way behind schedule.

Should I jump ship while I still can?


Unless there is something revenue affecting that doesn't work at that point in time and did work before you touched it, i.e. you screwed it up, don't work overtime. If projects fail or fall behind schedule because you are understaffed, it's not your fault. Make sure your superiors understand in advance, i.e. right now, that this will happen and then it's their job to find a solution, not yours. If they require you to work overtime outside of maybe launch/release day because of their screw-ups, well, don't.

Whether you jump ship or not is up to you, but in the end if you aren't happy in a company, you can always shop around anyways without straight up quitting first.


Exactly this. Any company that takes software seriously will realize that this is not something 1 guy can fix with working overtime. If they don't see that, then jump ship (try to have another ship available .

As far as I see it, working overtime is only acceptable around new releases/severe production issues. And working overtime now should be compensated by working undertime tomorrow (or asap).

If you're structurally working overtime, a) it's a management problem, not your problem, and b) you working overtime probably won't solve the issue anyways.
"News is to the mind what sugar is to the body"
nunez
Profile Blog Joined February 2011
Norway4003 Posts
December 10 2014 12:22 GMT
#11093
On December 10 2014 18:23 Manit0u wrote:
Show nested quote +
On December 10 2014 02:21 bangsholt wrote:
On December 09 2014 20:32 Manit0u wrote:
Does anyone here have experience with Magento? I could use some help...


It helps to state *what* you need help with, rather than asking if someone can help, unless it's something that's specific to Magento - but that's hard to guess ;o)


It's VERY specific to Magento backend, but I've made some headway in this matter.

And a work-related question to all of you. The current situation in my company is pretty crap since 3 senior devs are leaving which will leave me as the single person doing the backend for 3 existing and 5 new projects until the replacement is found (which might be never, seeing how in the past 2 months the company has hired only 1 junior dev while interviewing 5-6 candidates each week). Now, the predicament I'm in is that I most likely won't be able to handle all those projects by myself, especially that some of them use custom features developed by the company I work at (and I'm not working here long) but haven't worked on yet. The senior devs say that it's pretty complicated and those custom features are full of bugs and hacks and are under the process of being re-written from scratch... All this will leave me with no choice but to work over hours on stuff that I might not be able to handle and then not get paid because the projects will fail or at least fall way behind schedule.

Should I jump ship while I still can?

burn all other bridges, immerse yourself in the code and become one with the machines.
conspired against by a confederacy of dunces.
Manit0u
Profile Blog Joined August 2004
Poland17843 Posts
December 10 2014 12:28 GMT
#11094
On December 10 2014 21:22 nunez wrote:
Show nested quote +
On December 10 2014 18:23 Manit0u wrote:
And a work-related question to all of you. The current situation in my company is pretty crap since 3 senior devs are leaving which will leave me as the single person doing the backend for 3 existing and 5 new projects until the replacement is found (which might be never, seeing how in the past 2 months the company has hired only 1 junior dev while interviewing 5-6 candidates each week). Now, the predicament I'm in is that I most likely won't be able to handle all those projects by myself, especially that some of them use custom features developed by the company I work at (and I'm not working here long) but haven't worked on yet. The senior devs say that it's pretty complicated and those custom features are full of bugs and hacks and are under the process of being re-written from scratch... All this will leave me with no choice but to work over hours on stuff that I might not be able to handle and then not get paid because the projects will fail or at least fall way behind schedule.

Should I jump ship while I still can?

burn all other bridges, immerse yourself in the code and become one with the machines.


[image loading]
Time is precious. Waste it wisely.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
December 10 2014 12:35 GMT
#11095
ooh.
conspired against by a confederacy of dunces.
LaNague
Profile Blog Joined April 2010
Germany9118 Posts
December 10 2014 12:53 GMT
#11096
Unless you get payed for a senior position with its responsibilities, its really not your job to worry about project deadlines and work overtime to meet them.

Your employer signed contracts he cant fullfill, its not your problem, just try your best during the time they pay you for.
You can of course try and show some initiative if you maybe are looking to fill one of those open positions.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2014-12-10 14:58:05
December 10 2014 14:35 GMT
#11097
been fixing some lame bugs, here's some code:
a very simple finite state machine framework using crtp and multimethods.
the machine takes care of function dispatch, depending on the state type currently held and symbol type currently being processed, but defers the actual transition to the engine (supplied by user).

the machine requires that the engine class provides:
      a nested typedef seq::sequence<...> containing the set of symbols
      a nested typedef seq::sequence<...> containing the set of states
      a static constexpr initial state
      for any pair of types from the state and the symbol set there exists a function call operator returning a state

+ Show Spoiler [finite state machine] +
//crtp-fsm machine, templated on engine
template<class engine>
struct machine:engine
{

template<class... arg_t>
machine(arg_t&&... arg):
engine(forward<arg_t>(arg)...)
{}

//generate abstracts/variants
using abstract_state=seq::forward<typename engine::states,jeh::abstract>;
using abstract_symbol=seq::forward<typename engine::symbols,jeh::abstract>;

abstract_state _state{engine::initial};

//dispatcher
template<class state,class symbol>
void
operator()(const state& st,const symbol& sy)
{
_state=static_cast<engine&>(*this)(st,sy); //cast to engine and call transition
}

//process a symbol
machine&
operator()(const abstract_symbol& sy)
{
jeh::deconstruct(*this,_state,sy); //multimethod dispatch / binary visit
return *this;
}

};

+ Show Spoiler [finite state engine] +
//fsm engine modelling the average tl poster
struct poster{

string alias;
poster(string alias_):alias(move(alias_)){}

//states
struct not_banned{};
struct banned{};

//state set, required by machine
using states=seq::sequence<not_banned,banned>;

static constexpr not_banned initial{}; //initial state, required by machine

//symbols
struct post{ string text; };
struct lurk{};
struct ban{ string reason; };

//symbol set, required by machine
using symbols=seq::sequence<post,lurk,ban>;

//transitions, syntax: to_state operator()(const from_state&,const symbol&){ ... }

//catch all
template<class state,class symbol>
state
operator()(const state&,const symbol&)
{ cout<<"confused...\n"; }

//can post when not banned
not_banned
operator()(const not_banned&,const post& p)
{ cout<<alias<<" posted: "<<p.text<<"\n"; }

//can be banned in any state
template<class state>
banned
operator()(const state&,const ban& b)
{ cout<<"banned "<<alias<<": "<<b.reason<<"\n"; }

//can lurk in any state
template<class state>
state
operator()(const state&,const lurk&)
{ cout<<alias<<" lurking\n"; }

};

+ Show Spoiler [main] +
	//simple program
try{
machine<poster> nunez("nunez");

std::cout<<"\n--------------session 0--------------\n";
nunez
(poster::lurk{})
(poster::lurk{})
(poster::post{"kappa"})
;
std::cout<<"-------------------------------------\n";

std::cout<<"\n--------------session 1--------------\n";
nunez
(poster::post{"who made you king then?"})
(poster::ban{"corruptor of youth!"})
(poster::post{"i'm being oppressed!"})
(poster::ban{"i punish thee!"})
(poster::lurk{})
;
std::cout<<"-------------------------------------\n\n";
}catch(const exception& e){
cout<<e.what()<<endl;
}

+ Show Spoiler [output] +
[jeh@gimli work]$ ./workbench 

--------------session 0--------------
nunez lurking
nunez lurking
nunez posted: kappa
-------------------------------------

--------------session 1--------------
nunez posted: who made you king then?
banned nunez: corruptor of youth!
confused...
banned nunez: i punish thee!
nunez lurking
-------------------------------------


+ Show Spoiler [full source] +
#include<exception>
#include<iostream>
#include<seq/seq.hpp>
#include<abstract/abstract.hpp>

using namespace std;

//simple fsm framework, crtp on engine
template<class engine>
struct machine:engine
{

template<class... arg_t>
machine(arg_t&&... arg):
engine(forward<arg_t>(arg)...)
{}

using abstract_state=seq::forward<typename engine::states,jeh::abstract>;
using abstract_symbol=seq::forward<typename engine::symbols,jeh::abstract>;

abstract_state _state{engine::initial};

template<class state,class symbol> //dispatcher
void
operator()(const state& st,const symbol& sy)
{ _state=static_cast<engine&>(*this)(st,sy); }

//process a symbol
machine&
operator()(const abstract_symbol& sy)
{
jeh::deconstruct(*this,_state,_sy); //multimethod dispatch
return *this;
}

};

struct poster{

string alias;
poster(string alias_):alias(move(alias_)){}

//states
struct not_banned{};
struct banned{};

//state set, required by machine
using states=seq::sequence<not_banned,banned>;

static constexpr not_banned initial{}; //initial state, required by machine

//symbols
struct post{ string text; };
struct lurk{};
struct ban{ string reason; };

//symbol set, required by machine
using symbols=seq::sequence<post,lurk,ban>;

//transitions, syntax: to_state operator()(const from_state&,const symbol&){ ... }

//catch all
template<class state,class symbol>
state
operator()(const state&,const symbol&)
{ cout<<"confused...\n"; }

//can post when not banned
not_banned
operator()(const not_banned&,const post& p)
{ cout<<alias<<" posted: "<<p.text<<"\n"; }

//can be banned in any state
template<class state>
banned
operator()(const state&,const ban& b)
{ cout<<"banned "<<alias<<": "<<b.reason<<"\n"; }

//can lurk in any state
template<class state>
state
operator()(const state&,const lurk&)
{ cout<<"nunez lurking\n"; }

};

int
main()
{
try{
machine<poster> nunez("nunez");

std::cout<<"\n--------------session 0--------------\n";
nunez
(poster::lurk{})
(poster::lurk{})
(poster::post{"kappa"})
;
std::cout<<"-------------------------------------\n";

std::cout<<"\n--------------session 1--------------\n";
nunez
(poster::post{"who made you king then?"})
(poster::ban{"corruptor of youth!"})
(poster::post{"i'm being oppressed!"})
(poster::ban{"i punish thee!"})
(poster::lurk{})
;
std::cout<<"-------------------------------------\n\n";
}catch(const exception& e){
cout<<e.what()<<endl;
}
}


seq - simple utility library for type sequence manipulation
abstract - tiny variant / n-nary visitor implementation
conspired against by a confederacy of dunces.
Duval
Profile Blog Joined February 2011
Belgium144 Posts
December 14 2014 00:53 GMT
#11098
I'm still a CS student, but is it that "easy" to not worry about deadlines on a job? Whenever I'm working on a project for school I usually get quite excited and often spend 'overtime' on perfecting rather useless features :p
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
December 14 2014 00:56 GMT
#11099
On December 14 2014 09:53 Duval wrote:
I'm still a CS student, but is it that "easy" to not worry about deadlines on a job? Whenever I'm working on a project for school I usually get quite excited and often spend 'overtime' on perfecting rather useless features :p

Passion only gets you so far, and sooner or later you have to rely on good ol' discipline to make sure you get your work done. Which usually comes down to having schedules and sticking to them.
Average means I'm better than half of you.
phar
Profile Joined August 2011
United States1080 Posts
December 14 2014 01:06 GMT
#11100
On December 14 2014 09:53 Duval wrote:
I'm still a CS student, but is it that "easy" to not worry about deadlines on a job? Whenever I'm working on a project for school I usually get quite excited and often spend 'overtime' on perfecting rather useless features :p

Many people continue to do this in the workplace. Many don't, and will opt for a better work-life balance. It also depends on the industry, company, team, and/or specific boss. For instance my boss right now does not care if deadlines slip (literally just yesterday he said, "If [the thing you're currently working on] slips, it's fine."). Some places (like say, your average game dev studio with hard deadlines), that doesn't fly :\
Who after all is today speaking about the destruction of the Armenians?
Prev 1 553 554 555 556 557 1032 Next
Please log in or register to reply.
Live Events Refresh
AI Arena Tournament
17:00
Swiss - Round 1
Laughngamez YouTube
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 924
Tasteless 485
CosmosSc2 71
StarCraft: Brood War
Britney 23250
Calm 3282
firebathero 986
Artosis 669
Shuttle 567
Mini 158
Dewaltoss 110
HiyA 69
910 64
Mong 46
[ Show more ]
Hm[arnc] 25
Noble 7
Dota 2
qojqva3119
420jenkins306
monkeys_forever69
canceldota24
Counter-Strike
fl0m1757
Fnx 717
Super Smash Bros
Chillindude15
Heroes of the Storm
Liquid`Hasu982
Trikslyr81
Other Games
Grubby7902
B2W.Neo1405
JimRising 545
Mlord353
XaKoH 195
QueenE53
Organizations
Heroes of the Storm
Heroes of the Storm2800
StarCraft 2
StarCraft1620
Other Games
EGCTV1305
StarCraft 2
ComeBackTV 977
StarCraft: Brood War
Afreeca ASL 621
Other Games
BasetradeTV60
angryscii46
[ Show 17 non-featured ]
StarCraft 2
• Hupsaiya 82
• EnkiAlexander 42
• printf 33
• Kozan
• Migwel
• AfreecaTV YouTube
• intothetv
• IndyKCrew
StarCraft: Brood War
• Airneanach29
• FirePhoenix16
• Pr0nogo 4
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• Jankos1924
Other Games
• imaqtpie696
• Shiphtur169
Upcoming Events
OSC
1h 22m
Sparkling Tuna Cup
14h 52m
WardiTV Invitational
15h 52m
ByuN vs Percival
Cure vs Classic
Shopify Rebellion Sundays
19h 52m
Spirit vs Mixu
Clem vs TBD
RSL Revival
20h 52m
Serral vs Rogue
BlizzCon
23h 22m
IdrA vs MC
Replay Cast
1d 4h
Afreeca Starleague
1d 14h
Light vs JyJ
Soulkey vs hero
WardiTV Weekly
1d 15h
Monday Night Weeklies
1d 20h
[ Show More ]
Afreeca Starleague
2 days
Snow vs Shinee
Shine vs EffOrt
GSL
2 days
PiGosaur Cup
3 days
The PondCast
3 days
Kung Fu Cup
3 days
Replay Cast
4 days
KCM Race Survival
4 days
IntoTheTV X SOOP
4 days
Replay Cast
5 days
IntoTheTV X SOOP
5 days
Replay Cast
6 days
GSL
6 days
Liquipedia Results

Completed

Acropolis #5 - TRS
PiG Sty Festival 8.0
Big Dog Cup 2026 Div 1

Ongoing

KCM Race Survival 2026 Season 3
K-JUNGMAN
ASL Season 22
Super Anchor Qualifying S3
CSL 2026 AUTUMN (S22)
Acropolis #5
RSL Revival: Season 6
Calamity Invitational
FISSURE Playground #3
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026

Upcoming

Blizzard Classic Cup 2026
Acropolis #5 - GSA
Acropolis #5 - GSB
Acropolis #5 - GSC
SC4ALL II: Brood War
HSC XXX
Stellar Fest 2: Lunar Cup
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Offline Finals
Blizzard Classic Cup 2026
PGL Major Singapore 2026
Stake Ranked Episode 6
BLAST Rivals Fall 2026
IEM Beijing 2026
Stake Ranked Episode 5
PGL Masters Bucharest 2026
1win Private Club #2
Thunderpick World Champ. '26
ESL Pro League Season 24
Stake Ranked Episode 4
1win Private Club #1
Logitech G Play Connect 2026
SL StarSeries Fall 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.