2017年01月15日 (日) 09:31 | 編集
【Qiita記事】
【XorShift128 on 8languages】
メンテナンスとかもちょいちょいやって、オンラインコンパイラのURL付けたりしました。
詳細はQiita記事の下の方参照。
あとは、XorShift128+の実装。
こちらはJSで試したところ不可能といった無念な結果に…
JSでできないならやる意味無いよねと言うことで続ける意思はほぼ無いです。
こっちもQiitaにずらずら書いたのでとりあえず。
【Qiita: JavaScriptにXorShift128+を移植してみたかった】
【XorShift128 on 8languages】
メンテナンスとかもちょいちょいやって、オンラインコンパイラのURL付けたりしました。
詳細はQiita記事の下の方参照。
あとは、XorShift128+の実装。
こちらはJSで試したところ不可能といった無念な結果に…
JSでできないならやる意味無いよねと言うことで続ける意思はほぼ無いです。
こっちもQiitaにずらずら書いたのでとりあえず。
【Qiita: JavaScriptにXorShift128+を移植してみたかった】
2016年11月16日 (水) 00:55 | 編集
HSP mistプラグイン
HSPのmistプラグインの魔力にヤバさを感じたので色々テスト。
ラムダ式みたいな使い方ができるのが一番うれしい。
ちなみにマルチスレッド機能についてはこちらで使用しています。
HSPのmistプラグインの魔力にヤバさを感じたので色々テスト。
ラムダ式みたいな使い方ができるのが一番うれしい。
ちなみにマルチスレッド機能についてはこちらで使用しています。
#runtime "hsp3cl"
#include "mist.hsp"
mstOpenHspLib
#module Program
#defcfunc callback str func
mstCompile func
return mstLoad("return infunc(\""+"hoge"+"\","+365+")")
//即時関数もどき
#defcfunc fn str func,str funcrun
mstCompile func
return mstLoad(funcrun)
#global
mes callback({"
#defcfunc infunc str x,int y
return \"\"+x+\":\"+y
"})
mes fn({"#defcfunc f str x,int y
return \"\"+x+\":\"+y
"},"return f(\"foo\",500)")
mes fn({"#defcfunc f str x,int y
return "bas"+x+y
"},"return f(\"foo\",500)")
mes fn({"
#defcfunc fact int i,int max
if i\\3=0 && i\\5=0 {
mes \"Fizz Buzz\"
} _ //アンダーバーが無いとエラー
else:if i\\3=0 {
mes \"Fizz\"
} _
else:if i\\5=0 {
mes \"Buzz\"
} _
else {
mes i
}
return (if ithen fact(i+1,max)
else "End Fizz Buzz!!")
"},"return fact(0,100)")
mstDestroy
2016年10月05日 (水) 00:26 | 編集
ここを参考にVB.NETでコンパイルしてみた。
MsgBoxなどVB専用の構文を使用するには、proj内に
<Import Include="Microsoft.VisualBasic" />
が必要な模様。
MsgBoxなどVB専用の構文を使用するには、proj内に
<Import Include="Microsoft.VisualBasic" />
が必要な模様。
<!-- app.proj -->
<?xml version="1.0" encoding="utf-8" ?>
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="Build" >
<PropertyGroup>
<AssemblyName>heyvb</AssemblyName>
<OutputType>winexe</OutputType>
<OutputPath>.\</OutputPath>
</PropertyGroup>
<ItemGroup>
<ApplicationDefinition Include="app.xaml" />
<Page Include="win.xaml" />
<Import Include="Microsoft.VisualBasic" />
<Reference Include="System" />
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
<Import Project="$(MSBuildBinPath)\Microsoft.WinFX.targets" />
</Project>
<!-- app.xaml -->
<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
StartupUri="win.xaml"
/>
<!-- win.xaml -->
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="win"
Title="タイトゥル"
Width="400"
Height="400">
<Button Click="clk" Content="HeyVB" />
<x:Code>
<![CDATA[
sub clk(sender as object, e as RoutedEventArgs)
MsgBox("VB TEST!!")
end sub
]]>
</x:Code>
</Window>