Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/42/d436282994/htdocs/wp.vpalos.com/wp-content/plugins/wp-markdown/markdownify/markdownify.php on line 299

Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d436282994/htdocs/wp.vpalos.com/wp-content/plugins/wp-markdown/markdownify/markdownify.php:299) in /homepages/42/d436282994/htdocs/wp.vpalos.com/wp-includes/feed-rss2-comments.php on line 8
Comments for vpalos.com http://vpalos.com // milk, cookies, segfaults... Thu, 02 Oct 2014 20:44:59 +0000 hourly 1 https://wordpress.org/?v=4.4.2 Comment on Universal getter for plain JS objects. by Fully dynamic JSON handling in Scala | vpalos.com http://vpalos.com/1439/universal-getter-for-plain-js-objects/comment-page-1/#comment-465 Thu, 02 Oct 2014 20:44:59 +0000 http://vpalos.com/?p=1439#comment-465 […] to work with JSON structures in Scala just as easily as in JavaScript (though even in JS you need some wizardry to be able to to this […]

]]>
Comment on Lua2C, an updated version by Jeff Hill http://vpalos.com/669/lua2c/comment-page-1/#comment-292 Thu, 08 May 2014 22:37:01 +0000 http://vpalos.com/?p=669#comment-292 === modified file src/lua/utility/lua2c.lua
— src/lua/utility/lua2c.lua 2014-05-08 16:14:52 +0000
+++ src/lua/utility/lua2c.lua 2014-05-08 22:33:55 +0000
@@ -224,7 +224,7 @@
ok, so probably we dont open the output file in binary mode

— Submit.
if ( destination ) then
– local outfile = assert ( io.open(destination, ‘wb’ ) )
+ local outfile = assert ( io.open(destination, ‘w’ ) )
outfile:write ( output )
outfile:close ()
else

]]>
Comment on Lua2C, an updated version by Jeff Hill http://vpalos.com/669/lua2c/comment-page-1/#comment-291 Thu, 08 May 2014 16:03:21 +0000 http://vpalos.com/?p=669#comment-291 Also maybe a lua newbee can add an output file option

=== modified file src/lua/utility/lua2c.lua
— src/lua/utility/lua2c.lua 2014-05-08 15:24:36 +0000
+++ src/lua/utility/lua2c.lua 2014-05-08 15:53:29 +0000
@@ -45,6 +45,9 @@
result status, but instead terminates the program on error. This
behaviour is desirable in many cases when it is unacceptable for
an embedded file not to load successfully.
+
+ -o
+ specifies the name of the output file

Compiles a Lua source into a C header file which can be included into
an existing C program via the ‘#include’ directive. This file defines
@@ -70,20 +73,28 @@

— Arguments.
local source
+local destination
local do_help
local do_compile
local do_minify
local do_encrypt
local do_unsafe
+local do_out_file
for i, v in ipairs(arg or {}) do
– if v:find(‘^-.+$’) then
– do_help = v:find(‘h’, 1, true)
– do_compile = v:find(‘c’, 1, true)
– do_minify = v:find(‘s’, 1, true)
– do_encrypt = v:find(‘e’, 1, true)
– do_unsafe = v:find(‘u’, 1, true)
– else
– source = arg[i]
+ if ( do_out_file ) then
+ destination = arg[i]
+ do_out_file = false
+ else
+ if v:find(‘^-.+$’) then
+ do_help = v:find(‘h’, 1, true)
+ do_compile = v:find(‘c’, 1, true)
+ do_minify = v:find(‘s’, 1, true)
+ do_encrypt = v:find(‘e’, 1, true)
+ do_unsafe = v:find(‘u’, 1, true)
+ do_out_file = v:find(‘o’, 1, true)
+ else
+ source = arg[i]
+ end
end
end
do_help = do_help or not source
@@ -94,12 +105,12 @@
return
end

— Read file.
+– Read input file.
local identity = source:lower():gsub(‘^.+/’, ”):gsub(‘[^%w_]’, ‘_’)
-local file = assert(io.open(source, ‘rb’))
-local content = file:read’*a’
+local infile = assert(io.open(source, ‘rb’))
+local content = infile:read’*a’
local length = content:len()
-file:close()
+infile:close()

— Minify.
if do_minify then
@@ -212,4 +223,10 @@
identity, length, content, length, source)

— Submit.
-io.write(output)
+if ( destination ) then
+ local outfile = assert ( io.open(destination, ‘wb’ ) )
+ outfile:write ( output )
+ outfile:close ()
+else
+ io.write(output)
+end

]]>
Comment on Lua2C, an updated version by Jeff Hill http://vpalos.com/669/lua2c/comment-page-1/#comment-290 Thu, 08 May 2014 15:05:53 +0000 http://vpalos.com/?p=669#comment-290 Hi,

A lua newbee am I, but perhaps some changes may be needed for lua 5.2 and latest lpeg.

Thanks,

Jeff Hill

=== modified file src/lua/utility/lua2c.lua
— src/lua/utility/lua2c.lua 2014-05-08 14:58:55 +0000
+++ src/lua/utility/lua2c.lua 2014-05-08 15:00:30 +0000
@@ -13,8 +13,8 @@

— Requirements.
-require’bit’
-require’lpeg’
+–require’bit’
+local lpeg = require”lpeg”

— Aliases.
local P, R, V, S, C, Cs, Cb, Cg, Cmt =
@@ -113,7 +113,7 @@
level = assert(text:find(‘]’..level..’]’, start, true),
‘unclosed long brackets’)
return level + 2
– end,
+ end * 1,
string = (‘”‘ * ((P’\\\\’ + P’\\”‘ + 1) – P'”‘)^0 * ‘”‘) +
(“‘” * ((P’\\\\’ + P”\\'” + 1) – P”‘”)^0 * “‘”),
strings = V’heredoc’ + V’string’,

]]>
Comment on A simple(r) approach for class-based OOP in JavaScript. by vpalos.com » Blog Archive » Class.js: classes for the masses. http://vpalos.com/1076/a-simpler-approach-for-class-based-oop-in-javascript/comment-page-1/#comment-288 Sun, 02 Dec 2012 04:56:41 +0000 http://vpalos.com/?p=1076#comment-288 […] on an older post of mine, I decided to write a new article about an(other) implementation of OOP Classes in […]

]]>
Comment on Loomiere by Valeriu Paloş http://vpalos.com/loomiere/comment-page-1/#comment-286 Thu, 19 Jul 2012 04:11:00 +0000 http://vpalos.com/?page_id=446#comment-286 Vezi primul articol din site. 😀

]]>
Comment on Loomiere by Valeriu Paloş http://vpalos.com/loomiere/comment-page-1/#comment-285 Thu, 19 Jul 2012 04:09:00 +0000 http://vpalos.com/?page_id=446#comment-285 It’s out… finally. See…
http://vpalos.com/1165/loomiere-2-0-1-beta-finally-out/

]]>
Comment on Loomiere by Valeriu Paloş http://vpalos.com/loomiere/comment-page-1/#comment-284 Thu, 19 Jul 2012 04:08:00 +0000 http://vpalos.com/?page_id=446#comment-284 Here it is…
http://vpalos.com/1165/loomiere-2-0-1-beta-finally-out/

]]>
Comment on Loomiere 2.0.1-beta finally out! by vpalos.com » Blog Archive » First impressions on Loomiere/Stream performance http://vpalos.com/1165/loomiere-2-0-1-beta-finally-out/comment-page-1/#comment-283 Mon, 16 Jul 2012 21:22:20 +0000 http://vpalos.com/?p=1165#comment-283 […] UPDATE: http://vpalos.com/1165/loomiere-2-0-1-beta-finally-out/ […]

]]>
Comment on Loomiere 2.0.1-beta finally out! by vpalos.com » Blog Archive » “Loomiere 2.0 teaser” reloaded http://vpalos.com/1165/loomiere-2-0-1-beta-finally-out/comment-page-1/#comment-282 Mon, 16 Jul 2012 21:21:56 +0000 http://vpalos.com/?p=1165#comment-282 […] UPDATE: http://vpalos.com/1165/loomiere-2-0-1-beta-finally-out/ […]

]]>