Re: [hlcoders] Problems with STL and min/max of Source Engine

2014-07-27 Thread AnAkIn
I did a quick benchmark on linux with gcc 4.9.1/clang 3.4.2, and it looks
like std::vector is actually faster than CUtlVector when inserting 10
elements:
CUtlVector: 9021 µs
std::vector: 4456 µs
It's faster as well when removing the first 1000:
CUtlVector: 88 µs
std::vector: 39 µs

It may have been true 10 years ago that Valve's STL was faster than the
system's one, but I doubt it is today.


2014-07-19 18:12 GMT+02:00 Jorge Rodriguez :

> This may not convince you to use it but in fact valves template library is
> faster than STL. It has a few gotchas as far as usage goes but standard STL
> implementations tend to be somewhat slow especially in debug mode.
> El jul 18, 2014 1:27 PM, "Borzh"  escribió:
>
> I just include  and that breaks everything (I don't need to use
>> min/max of course).
>> I just was writing external plugin for source and I don't really know all
>> valve internals.
>> Just prefer use STL, which I know is an awesome (and well tested in all
>> ways) library.
>>
>>
>> 2014-07-18 16:48 GMT-03:00 Skyler York :
>>
>>> Quick side note, but you can wrap std::min/max in parenthesis to prevent
>>> macro expansion. It's not pretty but it works:
>>>
>>> (std::max)(a, b);
>>>
>>>
>>> On Fri, Jul 18, 2014 at 11:33 AM, Tony "omega" Sergi <
>>> omegal...@gmail.com> wrote:
>>>
 I don't understand why you need to use stl at all.. when the reason why
 it's incompatible, is because pretty much every use of stl has been wrapped
 by valve functions in order to tie it all into the memory manager. tier1 is
 full of engine compatible containers and whatnot for anything you could
 need to do.


 On Fri, Jul 18, 2014 at 9:20 PM, Borzh  wrote:

> I had to undefine it, undefine MINMAX_H also, so it could be included
> after that and then include minmax.h manually.
> Anyway it is ugly solution and macros should be written in uppercase
> to not confuse with methods.
>
>
> 2014-07-17 21:25 GMT-03:00 Dexter Haslem :
>
> why not just undefine it before STL headers?
>>
>> On Thu, Jul 17, 2014 at 11:33 AM, Borzh  wrote:
>> > Hello all,
>> >
>> > I propose using template functions in minmax.h instead of defines.
>> Or at
>> > least use uppercase letters for macros.
>> >
>> > It has been discussed a lot of times:
>> > - windows.h defines min/max, it is ugly, ok but I thought Valve is
>> not
>> > Microsoft. At least for Windows you can #define NOMINMAX before
>> include
>> > windows.h.
>> >
>> > - Valve's minmax.h defines min/max and you can't use STL because it
>> tries to
>> > apply macros to std::min and std::max which breaks everything!!!
>> Can't avoid
>> > it, because Valve use this macros everywhere!!!
>> >
>> > If someone from Valve is reading this, please do something, it is
>> awful !!!
>> >
>> > Thanks,
>> > Boris.
>> >
>> > ___
>> > To unsubscribe, edit your list preferences, or view the list
>> archives,
>> > please visit:
>> > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>> >
>> >
>>
>> ___
>> To unsubscribe, edit your list preferences, or view the list
>> archives, please visit:
>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>
>>
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>
>
>


 --
 -Tony

 ___
 To unsubscribe, edit your list preferences, or view the list archives,
 please visit:
 https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders



>>>
>>> ___
>>> To unsubscribe, edit your list preferences, or view the list archives,
>>> please visit:
>>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>>
>>>
>>>
>>
>> ___
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>
>>
>>
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>
>
>
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders



Re: [hlcoders] Problems with STL and min/max of Source Engine

2014-07-18 Thread AnAkIn
Just include "valve_minmax_off.h" before including algorithm.


2014-07-18 22:26 GMT+02:00 Borzh :

> I just include  and that breaks everything (I don't need to use
> min/max of course).
> I just was writing external plugin for source and I don't really know all
> valve internals.
> Just prefer use STL, which I know is an awesome (and well tested in all
> ways) library.
>
>
> 2014-07-18 16:48 GMT-03:00 Skyler York :
>
> Quick side note, but you can wrap std::min/max in parenthesis to prevent
>> macro expansion. It's not pretty but it works:
>>
>> (std::max)(a, b);
>>
>>
>> On Fri, Jul 18, 2014 at 11:33 AM, Tony "omega" Sergi > > wrote:
>>
>>> I don't understand why you need to use stl at all.. when the reason why
>>> it's incompatible, is because pretty much every use of stl has been wrapped
>>> by valve functions in order to tie it all into the memory manager. tier1 is
>>> full of engine compatible containers and whatnot for anything you could
>>> need to do.
>>>
>>>
>>> On Fri, Jul 18, 2014 at 9:20 PM, Borzh  wrote:
>>>
 I had to undefine it, undefine MINMAX_H also, so it could be included
 after that and then include minmax.h manually.
 Anyway it is ugly solution and macros should be written in uppercase to
 not confuse with methods.


 2014-07-17 21:25 GMT-03:00 Dexter Haslem :

 why not just undefine it before STL headers?
>
> On Thu, Jul 17, 2014 at 11:33 AM, Borzh  wrote:
> > Hello all,
> >
> > I propose using template functions in minmax.h instead of defines.
> Or at
> > least use uppercase letters for macros.
> >
> > It has been discussed a lot of times:
> > - windows.h defines min/max, it is ugly, ok but I thought Valve is
> not
> > Microsoft. At least for Windows you can #define NOMINMAX before
> include
> > windows.h.
> >
> > - Valve's minmax.h defines min/max and you can't use STL because it
> tries to
> > apply macros to std::min and std::max which breaks everything!!!
> Can't avoid
> > it, because Valve use this macros everywhere!!!
> >
> > If someone from Valve is reading this, please do something, it is
> awful !!!
> >
> > Thanks,
> > Boris.
> >
> > ___
> > To unsubscribe, edit your list preferences, or view the list
> archives,
> > please visit:
> > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
> >
> >
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>
>

 ___
 To unsubscribe, edit your list preferences, or view the list archives,
 please visit:
 https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders



>>>
>>>
>>> --
>>> -Tony
>>>
>>> ___
>>> To unsubscribe, edit your list preferences, or view the list archives,
>>> please visit:
>>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>>
>>>
>>>
>>
>> ___
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>
>>
>>
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>
>
>
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders



Re: [hlcoders] how to create a mod with non steam HL with no errors , and that language use hl non steam

2010-07-24 Thread AnAkIn .
Are you kidding?

2010/7/24 joel olgado 

>
> a question im creating a mod for HALF-LIFE called Sector B-12
>
> and I want to work in non steam hl version , and the hl won version .
> I need to create a new hl.dll ? I do not know what to
> do?
> i install a WON HL MOD (normal mod with the HL original dll) in NON STEAM
> HL  and does not work and i saw several mods with compatibility with non
> steam and WON...
> and a ultimate question :
>
> and that language use hl non steam
>
> VISUAL C++  or visual situdio 2008  (or other)
> Thanks
>
>
> help me plase
>
>
>
>
> _
> Pronto descubrirás un nuevo Hotmail. Nos estamos reinventando. Preparate
> para lo que se viene.
> http://www.nuevohotmail.com
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


-- 
Best regards,
AnAkIn,
-
ESL EU TF2 Admin
http://www.esl.eu/eu/tf2
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders