kemal kemalcr crystal pass parameter variable to render partial

Looks like you can!

use it as a local variable

– <%= render “views/_box_movie_nik.ecr” %>
+ <%= want_name = true; render “views/_box_movie_nik.ecr” %>

if it says

 

In views/_box_movie_nik.ecr:9:17

9 | <%= want_name ? movie.name_with_episode : movie.episode_without_name %>
^——–
Error: read before assignment to local variable ‘want_name’

 

that means that somewhere you’re using it you’re not setting that variable so run with –error-trace to find it 🙂

spring woe

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘XXX’ defined in class path resource [com/xx/y/core/metadatastore/api/persistence/metadata-session-beans.xml]: Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)

        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:240)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1148)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)

        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

        … 91 more

May have meant “bump spring version from

4.3.4.RELEASE to 

4.3.12.RELEASE

???

 

mysql weirdness

Re-enter new password:
… Failed! Error: File ‘./mysql/user.MYD’ not found (Errcode: 2 – No such file or directory)

 

meant “cleanup using this instead”:

https://askubuntu.com/q/1018312/20972

from the question LOL

 

ffmpeg cross woe

In file included from libavutil/hwcontext_cuda.c:24:
libavutil/hwcontext_cuda.c: In function ‘cuda_device_uninit’:
libavutil/hwcontext_cuda.c:286:28: error: ‘CudaFunctions’ {aka ‘struct CudaFunctions’} has no member named ‘cuDevicePrimaryCtxRelease’
CHECK_CU(cu->cuDevicePrimaryCtxRelease(hwctx->internal->cuda_device));
^~
libavutil/cuda_check.h:62:114: note: in definition of macro ‘FF_CUDA_CHECK_DL’
#define FF_CUDA_CHECK_DL(avclass, cudl, x) ff_cuda_check(avclass, cudl->cuGetErrorName, cudl->cuGetErrorString, (x), #x)
^
libavutil/hwcontext_cuda.c:286:17: note: in expansion of macro ‘CHECK_CU’
CHECK_CU(cu->cuDevicePrimaryCtxRelease(hwctx->internal->cuda_device));
^~~~~~~~
libavutil/hwcontext_cuda.c: In function ‘cuda_device_create’:
libavutil/hwcontext_cuda.c:356:28: error: ‘CudaFunctions’ {aka ‘struct CudaFunctions’} has no member named ‘cuDevicePrimaryCtxGetState’; did you mean ‘cuDeviceGetName’?
ret = CHECK_CU(cu->cuDevicePrimaryCtxGetState(hwctx->internal->cuda_device, &dev_flags, &dev_active));

^~~~~~~~
libavutil/hwcontext_cuda.c:369:26: error: ‘CudaFunctions’ {aka ‘struct CudaFunctions’} has no member named ‘cuDevicePrimaryCtxRetain’
ret = CHECK_CU(cu->cuDevicePrimaryCtxRetain(&hwctx->cuda_ctx, hwctx->internal->cuda_device));
^~
libavutil/cuda_check.h:62:114: note: in definition of macro ‘FF_CUDA_CHECK_DL’
#define FF_CUDA_CHECK_DL(avclass, cudl, x) ff_cuda_check(avclass, cudl->cuGetErrorName, cudl->cuGetErrorString, (x), #x)
^
libavutil/hwcontext_cuda.c:369:15: note: in expansion of macro ‘CHECK_CU’
ret = CHECK_CU(cu->cuDevicePrimaryCtxRetain(&hwctx->cuda_ctx, hwctx->internal->cuda_device));
^~~~~~~~
make: *** [ffbuild/common.mak:59: libavutil/hwcontext_cuda.o] Error 1
make: *** Waiting for unfinished jobs….

meant this

libvpx vp9 woe

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 360088.0x57ef8]
0x01fa8176 in g_shell_parse_argv ()
(gdb) bt
#0 0x01fa8176 in g_shell_parse_argv ()
#1 0x00000000 in ?? ()

not sure what it meant (cross compile mingw)

crystal make woe

/home/rdp/dev/crystal/src/llvm/ext/llvm_ext.o: In function `LLVMExtNewDIBuilder’:
llvm_ext.cc:(.text.LLVMExtNewDIBuilder+0x22): undefined reference to `llvm::DIBuilder::DIBuilder(llvm::Module&, bool)’
/home/rdp/dev/crystal/src/llvm/ext/llvm_ext.o: In function `LLVMExtDIBuilderCreateFile’:
llvm_ext.cc:(.text.LLVMExtDIBuilderCreateFile+0x4c): undefined reference to `llvm::DIBuilder::createFile(llvm::StringRef, llvm::StringRef, llvm::DIFile::ChecksumKind, llvm::StringRef)’
/home/rdp/dev/crystal/src/llvm/ext/llvm_ext.o: In function `LLVMExtDIBuilderCreateCompileUnit’:
llvm_ext.cc:(.text.LLVMExtDIBuilderCreateCompileUnit+0x5a): undefined reference to `llvm::DIBuilder::createFile(llvm::StringRef, llvm::StringRef, llvm::DIFile::ChecksumKind, llvm::StringRef)’
/home/rdp/dev/crystal/src/llvm/ext/llvm_ext.o: In function `LLVMExtDIBuilderCreateEnumerationType’:
llvm_ext.cc:(.text.LLVMExtDIBuilderCreateEnumerationType+0x66): undefined reference to `llvm::DIBuilder::createEnumerationType(llvm::DIScope*, llvm::StringRef, llvm::DIFile*, unsigned int, unsigned long, unsigned int, llvm::MDTupleTypedArrayWrapper<llvm::DINode>, llvm::DIType*, llvm::StringRef)’
/home/rdp/dev/crystal/src/llvm/ext/llvm_ext.o: In function `LLVMExtDIBuilderCreateEnumerator’:
llvm_ext.cc:(.text.LLVMExtDIBuilderCreateEnumerator+0x35): undefined reference to `llvm::DIBuilder::createEnumerator(llvm::StringRef, long)’
/home/rdp/dev/crystal/src/llvm/ext/llvm_ext.o: In function `LLVMExtWriteBitcodeWithSummaryToFile’:
llvm_ext.cc:(.text.LLVMExtWriteBitcodeWithSummaryToFile+0xc5): undefined reference to `llvm::WriteBitcodeToFile(llvm::Module const*, llvm::raw_ostream&, bool, llvm::ModuleSummaryIndex const*, bool, std::array<unsigned int, 5ul>*)’
collect2: error: ld returned 1 exit status

 

meant “you just upgraded from llvm 6 to 7, run make clean first”

ssl_connect returns before ssl_accept does broken pipe

turns out to be a “new feature” in 1.1.1 or something phreaky dang it.

basically if a client “only sends then closes the connection” the server can still be in the middle of its “two step ssl_accept handshake” (the second step of it, which is after the client has free permission to move on), and so it sends its second step [hasn’t read any bytes coming in yet], and the server says “what you smoking tex, this connection is already hard closed!”

only if using unidirectional shutdown.

OK this smells insane <sigh>.

Unhandled exception in spawn: Error writing to socket: Broken pipe (Errno)
from src/socket.cr:82:13 in ‘unbuffered_write’

here

https://github.com/openssl/openssl/issues/6904

https://github.com/openssl/openssl/issues/7948

it’s sporadic? and time sensitive? ai ai …

because if it happens to “get that second step across the wire” in time before the close then it won’t get the EPIPE response…

ai ai …

Roger's meanderings, notes to himself, bug reports, and other things