Skip to content

Instantly share code, notes, and snippets.

proc newSeqAlias[T](): seq[T] =
result = newSeq[T]()
template test(t: typedesc) =
var mmmm = newSeqAlias[t]()
when isMainModule:
test(int)
proc newSeqAlias[T](): seq[T] =
result = newSeq[T]
template test(t: typedesc) =
var mmmm = newSeqAlias[t]()
when isMainModule:
test(int)
import macros
macro test(s: stmt): stmt =
result = quote do:
discard $i
test:
proc addNums(x: int, y:int): int = x + y
type TVert = tuple
pos: vec3
norm: vec3
uv: vec2
type TMVP = tuple
model: mat4x4
view: mat4x4
proj:mat4x4
type TVSOut = tuple
uv: vec2
if(foo) {
docrap;
if(bar) {
domore
}
}
1> DebuggingServer.cpp
1>..\..\..\source\scriptinterface\DebuggingServer.cpp(53): error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'std::basic_ostream<char,std::char_traits<char>>' (or there is no acceptable conversion)
1> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\ostream(498): could be 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(std::basic_streambuf<char,std::char_traits<char>> *)'
1> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\ostream(478): or 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(const void *)'
1> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\ostream(458): or 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(long double)'
1> C:\Program Files (x86)\Microsoft Visual Studi
==========================================================================
DEBUG SPEW: No debug_filter.cfg found, so only general, error, and warning
categories can be shown and no debug_filter.cfg info will be saved.
==========================================================================
FreeSpace 2 Open version: 3.6.19
Passed cmdline options:
-missile_lighting
-3dshockwave
-soft_particles
-post_process
==========================================================================
DEBUG SPEW: No debug_filter.cfg found, so only general, error, and warning
categories can be shown and no debug_filter.cfg info will be saved.
==========================================================================
FreeSpace 2 Open version: 3.6.17.9481
Passed cmdline options:
-mod blueplanet2,blueplanet,mediavps_3612
-fullscreen_window
Building file index...
Found root pack 'C:\GOG Games\Freespace 2\blueplanet2\adv-bp2.vp' with a checksum of 0x4d6319c8
==========================================================================
DEBUG SPEW: No debug_filter.cfg found, so only general, error, and warning
categories can be shown and no debug_filter.cfg info will be saved.
==========================================================================
FreeSpace 2 Open version: 3.6.17.9481
Passed cmdline options:
-mod blueplanet,mediavps_3612
Building file index...
Found root pack 'C:\GOG Games\Freespace 2\blueplanet\adv-bp.vp' with a checksum of 0x6e9d550d
Found root pack 'C:\GOG Games\Freespace 2\blueplanet\bp-audio1.vp' with a checksum of 0x53c3080c
main_hall_init() was passed a blank mainhall name, loading first available mainhall.
ntdll.dll! ZwWaitForSingleObject + 12 bytes
KERNELBASE.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_17_DEBUG_SSE2_BP.exe! SCP_DumpStack + 354 bytes
fs2_open_3_6_17_DEBUG_SSE2_BP.exe! Warning + 495 bytes
fs2_open_3_6_17_DEBUG_SSE2_BP.exe! main_hall_init + 217 bytes
fs2_open_3_6_17_DEBUG_SSE2_BP.exe! game_enter_state + 403 bytes
fs2_open_3_6_17_DEBUG_SSE2_BP.exe! gameseq_set_state + 310 bytes
fs2_open_3_6_17_DEBUG_SSE2_BP.exe! game_process_event + 134 bytes
fs2_open_3_6_17_DEBUG_SSE2_BP.exe! gameseq_process_events + 152 bytes