1
0
Fork 0
mirror of https://gitlab.com/news-flash/article_scraper.git synced 2025-07-07 16:15:32 +02:00

replace multiple <br>s with single <p>

This commit is contained in:
Jan Lukas Gernert 2023-04-29 18:20:28 +02:00
parent c4f8bd2bc2
commit 16b102b313
8 changed files with 264 additions and 236 deletions

View file

@ -1,27 +1,16 @@
<article><div> <article><div>
<div><img alt="GNOME" src="https://www.phoronix.com/assets/categories/gnome.webp" width="100" height="100"/></div> <div><img alt="GNOME" src="https://www.phoronix.com/assets/categories/gnome.webp" width="100" height="100"/></div>
It's been one month already since the debut of <a href="https://www.phoronix.com/search/GNOME+44" target="_blank">GNOME 44</a> and out today is the first point release. It's been one month already since the debut of <a href="https://www.phoronix.com/search/GNOME+44" target="_blank">GNOME 44</a> and out today is the first point release.
<br/> <p>GNOME 44.1 brings many fixes to this updated Linux desktop, including many crash fixes and addressing newly uncovered memory leaks. Some of the GNOME 44.1 highlights include:
<br/>GNOME 44.1 brings many fixes to this updated Linux desktop, including many crash fixes and addressing newly uncovered memory leaks. Some of the GNOME 44.1 highlights include: </p><p>- Many fixes to GNOME Shell, including crash fixes, memory leak fixes, and other items addressed.
<br/> </p><p>- GNOME's Mutter has also seen numerous fixes, including improved screencast support, fixing support for resizing windows via the keyboard, enabling modifiers by default for non-native backends, and various other fixes.
<br/>- Many fixes to GNOME Shell, including crash fixes, memory leak fixes, and other items addressed. </p><p>- The GNOME Settings Daemon will now connect to light sensors asynchronously.
<br/> </p><p>- Crash fixes for GNOME Software and the Nautilus file manager.
<br/>- GNOME's Mutter has also seen numerous fixes, including improved screencast support, fixing support for resizing windows via the keyboard, enabling modifiers by default for non-native backends, and various other fixes. </p><p>- Nautilus now allows extraction of .tar.zst and .zstd archives.
<br/> </p><p>- GNOME Control Center's display area now allows configuring all monitors and applying those settings at once.
<br/>- The GNOME Settings Daemon will now connect to light sensors asynchronously. </p><p>- GNOME Calls will no longer crash on empty/null call ID.
<br/> </p><p>- GNOME Web (Epiphany) has seen some crash fixes.
<br/>- Crash fixes for GNOME Software and the Nautilus file manager. </p><p>- GNOME Boxes for virtualization has a fix to always enable the boot menu option and fixing 3D acceleration not sticking at startup.
<br/> </p><p>- GNOME Calendar has stability and performance improvements to its search.
<br/>- Nautilus now allows extraction of .tar.zst and .zstd archives. <br/></p><p><img src="https://www.phoronix.net/image.php?id=2023&amp;image=fedora38_beta_2_med" alt="Fedora 38 with GNOME 44"/></p>
<br/>
<br/>- GNOME Control Center's display area now allows configuring all monitors and applying those settings at once.
<br/>
<br/>- GNOME Calls will no longer crash on empty/null call ID.
<br/>
<br/>- GNOME Web (Epiphany) has seen some crash fixes.
<br/>
<br/>- GNOME Boxes for virtualization has a fix to always enable the boot menu option and fixing 3D acceleration not sticking at startup.
<br/>
<br/>- GNOME Calendar has stability and performance improvements to its search.
<br/><p><img src="https://www.phoronix.net/image.php?id=2023&amp;image=fedora38_beta_2_med" alt="Fedora 38 with GNOME 44"/></p>
<br/>More details on the GNOME 44.1 changes via the <a href="https://discourse.gnome.org/t/gnome-44-1-released/15092" target="_blank">release announcement</a>.</div></article> <br/>More details on the GNOME 44.1 changes via the <a href="https://discourse.gnome.org/t/gnome-44-1-released/15092" target="_blank">release announcement</a>.</div></article>

View file

@ -1,10 +1,7 @@
<article><div id="readability-page-1" itemprop="description articleBody"><p> <article><div id="readability-page-1" itemprop="description articleBody"><p>
I've written a couple of posts in the past few months but they were all for <a href="http://blog.ioactive.com/search/label/Andrew%20Zonenberg" target="_blank">the blog at work</a> so I figured I'm long overdue for one on Silicon Exposed.</p><h2> I've written a couple of posts in the past few months but they were all for <a href="http://blog.ioactive.com/search/label/Andrew%20Zonenberg" target="_blank">the blog at work</a> so I figured I'm long overdue for one on Silicon Exposed.</p><h2>
So what's a GreenPak?</h2> So what's a GreenPak?</h2>
<br/><p> Silego Technology is a fabless semiconductor company located in the SF Bay area, which makes (among other things) a line of programmable logic devices known as GreenPak. Their <a href="http://www.silego.com/products/greenpak5.html" target="_blank">5th generation parts</a> were just announced, but I started this project before that happened so I'm still targeting the <a href="http://www.silego.com/products/greenpak4.html" target="_blank">4th generation</a>.<br/> <br/><p> Silego Technology is a fabless semiconductor company located in the SF Bay area, which makes (among other things) a line of programmable logic devices known as GreenPak. Their <a href="http://www.silego.com/products/greenpak5.html" target="_blank">5th generation parts</a> were just announced, but I started this project before that happened so I'm still targeting the <a href="http://www.silego.com/products/greenpak4.html" target="_blank">4th generation</a>.</p><p> GreenPak devices are kind of like itty bitty <a href="http://www.cypress.com/products/32-bit-arm-cortex-m-psoc" target="_blank">PSoCs</a> - they have a mixed signal fabric with an ADC, DACs, comparators, voltage references, plus a digital LUT/FF fabric and some typical digital MCU peripherals like counters and oscillators (but no CPU).</p><p> It's actually an interesting architecture - FPGAs (including some devices marketed as CPLDs) are a 2D array of LUTs connected via wires to adjacent cells, and true (product term) CPLDs are a star topology of AND-OR arrays connected by a crossbar. GreenPak, on the other hand, is a star topology of LUTs, flipflops, and analog/digital hard IP connected to a crossbar.</p><p> Without further ado, here's a block diagram showing all the cool stuff you get in the SLG46620V:</p><table>
<br/> GreenPak devices are kind of like itty bitty <a href="http://www.cypress.com/products/32-bit-arm-cortex-m-psoc" target="_blank">PSoCs</a> - they have a mixed signal fabric with an ADC, DACs, comparators, voltage references, plus a digital LUT/FF fabric and some typical digital MCU peripherals like counters and oscillators (but no CPU).<br/>
<br/> It's actually an interesting architecture - FPGAs (including some devices marketed as CPLDs) are a 2D array of LUTs connected via wires to adjacent cells, and true (product term) CPLDs are a star topology of AND-OR arrays connected by a crossbar. GreenPak, on the other hand, is a star topology of LUTs, flipflops, and analog/digital hard IP connected to a crossbar.<br/>
<br/> Without further ado, here's a block diagram showing all the cool stuff you get in the SLG46620V:</p><table>
<tbody> <tbody>
<tr> <tr>
<td> <td>
@ -16,11 +13,7 @@
</tr> </tr>
</tbody> </tbody>
</table><p> </table><p>
They're also tiny (the SLG46620V is a 20-pin 0.4mm pitch STQFN measuring 2x3 mm, and the lower gate count SLG46140V is a mere 1.6x2 mm) and probably the cheapest programmable logic device on the market - $0.50 in low volume and less than $0.40 in larger quantities.<br/> They're also tiny (the SLG46620V is a 20-pin 0.4mm pitch STQFN measuring 2x3 mm, and the lower gate count SLG46140V is a mere 1.6x2 mm) and probably the cheapest programmable logic device on the market - $0.50 in low volume and less than $0.40 in larger quantities.</p><p> The Vdd range of GreenPak4 is huge, more like what you'd expect from an MCU than an FPGA! It can run on anything from 1.8 to 5V, although performance is only specified at 1.8, 3.3, and 5V nominal voltages. There's also a dual-rail version that trades one of the GPIO pins for a second power supply pin, allowing you to interface to logic at two different voltage levels.</p><p> To support low-cost/space-constrained applications, they even have the configuration memory on die. It's one-time programmable and needs external Vpp to program (presumably Silego didn't want to waste die area on charge pumps that would only be used once) but has a SRAM programming mode for prototyping.</p><p> The best part is that the development software (GreenPak Designer) is free of charge and provided for all major operating systems including Linux! Unfortunately, the only supported design entry method is schematic entry and there's no way to write your design in a HDL.</p><p> While schematics may be fine for quick tinkering on really simple designs, they quickly get unwieldy. The nightmare of a circuit shown below is just a bunch of counters hooked up to LEDs that blink at various rates.</p><table>
<br/> The Vdd range of GreenPak4 is huge, more like what you'd expect from an MCU than an FPGA! It can run on anything from 1.8 to 5V, although performance is only specified at 1.8, 3.3, and 5V nominal voltages. There's also a dual-rail version that trades one of the GPIO pins for a second power supply pin, allowing you to interface to logic at two different voltage levels.<br/>
<br/> To support low-cost/space-constrained applications, they even have the configuration memory on die. It's one-time programmable and needs external Vpp to program (presumably Silego didn't want to waste die area on charge pumps that would only be used once) but has a SRAM programming mode for prototyping.<br/>
<br/> The best part is that the development software (GreenPak Designer) is free of charge and provided for all major operating systems including Linux! Unfortunately, the only supported design entry method is schematic entry and there's no way to write your design in a HDL.<br/>
<br/> While schematics may be fine for quick tinkering on really simple designs, they quickly get unwieldy. The nightmare of a circuit shown below is just a bunch of counters hooked up to LEDs that blink at various rates.</p><table>
<tbody> <tbody>
<tr> <tr>
<td> <td>
@ -32,14 +25,9 @@
</tr> </tr>
</tbody> </tbody>
</table><p> </table><p>
As if this wasn't enough of a problem, the largest GreenPak4 device (the SLG46620V) is split into two halves with limited routing between them, and the GUI doesn't help the user manage this complexity at all - you have to draw your schematic in two halves and add "cross connections" between them.<br/> As if this wasn't enough of a problem, the largest GreenPak4 device (the SLG46620V) is split into two halves with limited routing between them, and the GUI doesn't help the user manage this complexity at all - you have to draw your schematic in two halves and add "cross connections" between them.</p><p> The icing on the cake is that schematics are a pain to diff and collaborate on. Although GreenPak schematics are XML based, which is a touch better than binary, who wants to read a giant XML diff and try to figure out what's going on in the circuit?</p><p> This isn't going to be a post on the quirks of Silego's software, though - that would be boring. As it turns out, there's one more exciting feature of these chips that I didn't mention earlier: the configuration bitstream is 100% documented in the device datasheet! This is unheard of in the programmable logic world. As Nick of Arachnid Labs <a href="http://www.arachnidlabs.com/blog/2015/03/30/greenpak/" target="_blank">says</a>, the chip is "just dying for someone to write a VHDL or Verilog compiler for it". As you can probably guess by from the title of this post, I've been busy doing exactly that.</p><h2>
<br/> The icing on the cake is that schematics are a pain to diff and collaborate on. Although GreenPak schematics are XML based, which is a touch better than binary, who wants to read a giant XML diff and try to figure out what's going on in the circuit?<br/>
<br/> This isn't going to be a post on the quirks of Silego's software, though - that would be boring. As it turns out, there's one more exciting feature of these chips that I didn't mention earlier: the configuration bitstream is 100% documented in the device datasheet! This is unheard of in the programmable logic world. As Nick of Arachnid Labs <a href="http://www.arachnidlabs.com/blog/2015/03/30/greenpak/" target="_blank">says</a>, the chip is "just dying for someone to write a VHDL or Verilog compiler for it". As you can probably guess by from the title of this post, I've been busy doing exactly that.</p><h2>
Great! How does it work?</h2> Great! How does it work?</h2>
<br/><p> Rather than wasting time writing a synthesizer, I decided to write a GreenPak technology library for Clifford Wolf's excellent open source synthesis tool, <a href="http://www.clifford.at/yosys/" target="_blank">Yosys</a>, and then make a place-and-route tool to turn that into a final netlist. The post-PAR netlist can then be loaded into GreenPak Designer in order to program the device.<br/> <br/><p> Rather than wasting time writing a synthesizer, I decided to write a GreenPak technology library for Clifford Wolf's excellent open source synthesis tool, <a href="http://www.clifford.at/yosys/" target="_blank">Yosys</a>, and then make a place-and-route tool to turn that into a final netlist. The post-PAR netlist can then be loaded into GreenPak Designer in order to program the device.</p><p> The first step of the process is to run the "synth_greenpak4" Yosys flow on the Verilog source. This runs a generic RTL synthesis pass, then some coarse-grained extraction passes to infer shift register and counter cells from behavioral logic, and finally maps the remaining logic to LUT/FF cells and outputs a JSON-formatted netlist.</p><p> Once the design has been synthesized, my tool (named, surprisingly, gp4par) is then launched on the netlist. It begins by parsing the JSON and constructing a directed graph of cell objects in memory. A second graph, containing all of the primitives in the device and the legal connections between them, is then created based on the device specified on the command line. (As of now only the SLG46620V is supported; the SLG46621V can be added fairly easily but the SLG46140V has a slightly different microarchitecture which will require a bit more work to support.)</p><p> After the graphs are generated, each node in the netlist graph is assigned a numeric label identifying the type of cell and each node in the device graph is assigned a list of legal labels: for example, an I/O buffer site is legal for an input buffer, output buffer, or bidirectional buffer.</p><table>
<br/> The first step of the process is to run the "synth_greenpak4" Yosys flow on the Verilog source. This runs a generic RTL synthesis pass, then some coarse-grained extraction passes to infer shift register and counter cells from behavioral logic, and finally maps the remaining logic to LUT/FF cells and outputs a JSON-formatted netlist.<br/>
<br/> Once the design has been synthesized, my tool (named, surprisingly, gp4par) is then launched on the netlist. It begins by parsing the JSON and constructing a directed graph of cell objects in memory. A second graph, containing all of the primitives in the device and the legal connections between them, is then created based on the device specified on the command line. (As of now only the SLG46620V is supported; the SLG46621V can be added fairly easily but the SLG46140V has a slightly different microarchitecture which will require a bit more work to support.)<br/>
<br/> After the graphs are generated, each node in the netlist graph is assigned a numeric label identifying the type of cell and each node in the device graph is assigned a list of legal labels: for example, an I/O buffer site is legal for an input buffer, output buffer, or bidirectional buffer.</p><table>
<tbody> <tbody>
<tr> <tr>
<td> <td>
@ -71,8 +59,7 @@
<li>Re-compute the score for the design. If it's better, accept this change and start the next iteration.</li> <li>Re-compute the score for the design. If it's better, accept this change and start the next iteration.</li>
<li>If the score is worse, accept it with a random probability which decreases as the iteration number goes up. If the change is not accepted, restore the previous placement.</li> <li>If the score is worse, accept it with a random probability which decreases as the iteration number goes up. If the change is not accepted, restore the previous placement.</li>
</ol><p> </ol><p>
After optimization, the design is checked for routability. If any edges in the netlist graph don't correspond to edges in the device graph, the user probably asked for something impossible (for example, trying to hook a flipflop's output to a comparator's reference voltage input) so fail with an error.<br/> After optimization, the design is checked for routability. If any edges in the netlist graph don't correspond to edges in the device graph, the user probably asked for something impossible (for example, trying to hook a flipflop's output to a comparator's reference voltage input) so fail with an error.</p><p> The design is then routed. This is quite simple due to the crossbar structure of the device. For each edge in the netlist:<br/></p><ol>
<br/> The design is then routed. This is quite simple due to the crossbar structure of the device. For each edge in the netlist:</p><ol>
<li>If dedicated (non-fabric) routing is used for this path, configure the destination's input mux appropriately and stop.</li> <li>If dedicated (non-fabric) routing is used for this path, configure the destination's input mux appropriately and stop.</li>
<li>If the source and destination are in the same half of the device, configure the destination's input mux appropriately and stop.</li> <li>If the source and destination are in the same half of the device, configure the destination's input mux appropriately and stop.</li>
<li>A cross-connection must be used. Check if we already used one to bring the source signal to the other half of the device. If found, configure the destination to route from that cross-connection and stop.</li> <li>A cross-connection must be used. Check if we already used one to bring the source signal to the other half of the device. If found, configure the destination to route from that cross-connection and stop.</li>
@ -84,26 +71,14 @@
<li>If an I/O buffer is connected to analog hard IP, fail with an error if it's not configured in analog mode.</li> <li>If an I/O buffer is connected to analog hard IP, fail with an error if it's not configured in analog mode.</li>
<li>Some signals (such as comparator inputs and oscillator power-down controls) are generated by a shared mux and fed to many loads. If different loads require conflicting settings for the shared mux, fail with an error.</li> <li>Some signals (such as comparator inputs and oscillator power-down controls) are generated by a shared mux and fed to many loads. If different loads require conflicting settings for the shared mux, fail with an error.</li>
</ul><p> </ul><p>
If DRC passes with no errors, configure all of the individual cells in the netlist based on the HDL parameters. Fail with an error if an invalid configuration was requested.<br/> If DRC passes with no errors, configure all of the individual cells in the netlist based on the HDL parameters. Fail with an error if an invalid configuration was requested.</p><p> Finally, generate the bitstream from all of the per-cell configuration and write it to a file.</p><h2>
<br/> Finally, generate the bitstream from all of the per-cell configuration and write it to a file.</p><h2>
Great, let's get started!</h2><p> Great, let's get started!</h2><p>
If you don't already have one, you'll need to buy a <a href="http://www.silego.com/buy/index.php?main_page=product_info&amp;products_id=388" target="_blank">GreenPak4 development kit</a>. The kit includes samples of the SLG46620V (among other devices) and a programmer/emulation board. While you're waiting for it to arrive, install <a href="http://www.silego.com/softdoc/software.html" target="_blank">GreenPak Designer</a>.<br/> If you don't already have one, you'll need to buy a <a href="http://www.silego.com/buy/index.php?main_page=product_info&amp;products_id=388" target="_blank">GreenPak4 development kit</a>. The kit includes samples of the SLG46620V (among other devices) and a programmer/emulation board. While you're waiting for it to arrive, install <a href="http://www.silego.com/softdoc/software.html" target="_blank">GreenPak Designer</a>.</p><p> Download and install Yosys. Although Clifford is pretty good at merging my pull requests, only <a href="https://github.com/azonenberg/yosys/" target="_blank">my fork on Github</a> is guaranteed to have the most up-to-date support for GreenPak devices so don't be surprised if you can't use a bleeding-edge feature with mainline Yosys.</p><p> Download and install gp4par. You can get it from <a href="https://github.com/azonenberg/openfpga/" target="_blank">the Github repository</a>.</p><p> Write your HDL, compile with Yosys, P&amp;R with gp4par, and import the bitstream into GreenPak Designer to program the target device. The most current gp4par manual is included in LaTeX source form in the source tree and is automatically built as part of the compile process. If you're just browsing, there's a <a href="http://thanatos.virtual.antikernel.net/unlisted/gp4-hdl.pdf" target="_blank">relatively recent PDF version</a> on my web server.</p><p> If you'd like to see the Verilog that produced the nightmare of a schematic I showed above, <a href="https://github.com/azonenberg/openfpga/blob/master/tests/greenpak4/Blinky/Blinky.v" target="_blank">here it is</a>.</p><p> Be advised that this project is still very much a work in progress and there are still a number of SLG46620V features I don't support (see the manual for exact details).</p><h2>
<br/> Download and install Yosys. Although Clifford is pretty good at merging my pull requests, only <a href="https://github.com/azonenberg/yosys/" target="_blank">my fork on Github</a> is guaranteed to have the most up-to-date support for GreenPak devices so don't be surprised if you can't use a bleeding-edge feature with mainline Yosys.<br/>
<br/> Download and install gp4par. You can get it from <a href="https://github.com/azonenberg/openfpga/" target="_blank">the Github repository</a>.<br/>
<br/> Write your HDL, compile with Yosys, P&amp;R with gp4par, and import the bitstream into GreenPak Designer to program the target device. The most current gp4par manual is included in LaTeX source form in the source tree and is automatically built as part of the compile process. If you're just browsing, there's a <a href="http://thanatos.virtual.antikernel.net/unlisted/gp4-hdl.pdf" target="_blank">relatively recent PDF version</a> on my web server.<br/>
<br/> If you'd like to see the Verilog that produced the nightmare of a schematic I showed above, <a href="https://github.com/azonenberg/openfpga/blob/master/tests/greenpak4/Blinky/Blinky.v" target="_blank">here it is</a>.<br/>
<br/> Be advised that this project is still very much a work in progress and there are still a number of SLG46620V features I don't support (see the manual for exact details).</p><h2>
I love it / it segfaulted / there's a problem in the manual!</h2><p> I love it / it segfaulted / there's a problem in the manual!</h2><p>
Hop in our IRC channel (##openfpga on Freenode) and let me know. Feedback is great, pull requests are even better,</p><h2> Hop in our IRC channel (##openfpga on Freenode) and let me know. Feedback is great, pull requests are even better,</p><h2>
You're competing with Silego's IDE. Have they found out and sued you yet?</h2><p> You're competing with Silego's IDE. Have they found out and sued you yet?</h2><p>
Nope. They're fully aware of what I'm doing and are rolling out the red carpet for me. They love the idea of a HDL flow as an alternative to schematic entry and are pretty amazed at how fast it's coming together.<br/> Nope. They're fully aware of what I'm doing and are rolling out the red carpet for me. They love the idea of a HDL flow as an alternative to schematic entry and are pretty amazed at how fast it's coming together.</p><p> After I reported a few bugs in their datasheets they decided to skip the middleman and give me direct access to the engineer who writes their documentation so that I can get faster responses. The last time I found a problem (two different parts of the datasheet contradicted each other) an updated datasheet was in my inbox and on their website by the next day. I only wish Xilinx gave me that kind of treatment!</p><p> They've even <a href="https://twitter.com/SilegoTech/status/717018987771469824" target="_blank">offered me free hardware</a> to help me add support for their latest product family, although I plan to get GreenPak4 support to a more stable state before taking them up on the offer.</p><h2>
<br/> After I reported a few bugs in their datasheets they decided to skip the middleman and give me direct access to the engineer who writes their documentation so that I can get faster responses. The last time I found a problem (two different parts of the datasheet contradicted each other) an updated datasheet was in my inbox and on their website by the next day. I only wish Xilinx gave me that kind of treatment!<br/>
<br/> They've even <a href="https://twitter.com/SilegoTech/status/717018987771469824" target="_blank">offered me free hardware</a> to help me add support for their latest product family, although I plan to get GreenPak4 support to a more stable state before taking them up on the offer.</p><h2>
So what's next?</h2> So what's next?</h2>
<br/><p> Better testing, for starters. I have to verify functionality by hand with a DMM and oscilloscope, which is time consuming.<br/> <br/><p> Better testing, for starters. I have to verify functionality by hand with a DMM and oscilloscope, which is time consuming.</p><p> My contact at Silego says they're going to be giving me documentation on the SRAM emulation interface soon, so I'm going to make a hardware-in-loop test platform that connects to my desktop and the Silego ZIF socket, and lets me load new bitstreams via a scriptable interface. It'll have FPGA-based digital I/O as well as an ADC and DAC on every device pin, plus an adjustable voltage regulator for power, so I can feed in arbitrary mixed-signal test waveforms and write PC-based unit tests to verify correct behavior.</p><p> Other than that, I want to finish support for the SLG46620V in the next month or two. The SLG46621V will be an easy addition since only one pin and the relevant configuration bits have changed from the 46620 (I suspect they're the same die, just bonded out differently).</p><p> Once that's done I'll have to do some more extensive work to add the SLG46140V since the architecture is a bit different (a lot of the combinatorial logic is merged into multi-function blocks). Luckily, the 46140 has a lot in common architecturally with the GreenPak5 family, so once that's done GreenPak5 will probably be a lot easier to add support for.</p><p> My thanks go out to Clifford Wolf, whitequark, the IRC users in ##openfpga, and everyone at Silego I've worked with to help make this possible. I hope that one day this project will become mature enough that Silego will ship it as an officially supported extension to GreenPak Designer, making history by becoming the first modern programmable logic vendor to ship a fully open source synthesis and P&amp;R suite.
<br/> My contact at Silego says they're going to be giving me documentation on the SRAM emulation interface soon, so I'm going to make a hardware-in-loop test platform that connects to my desktop and the Silego ZIF socket, and lets me load new bitstreams via a scriptable interface. It'll have FPGA-based digital I/O as well as an ADC and DAC on every device pin, plus an adjustable voltage regulator for power, so I can feed in arbitrary mixed-signal test waveforms and write PC-based unit tests to verify correct behavior.<br/>
<br/> Other than that, I want to finish support for the SLG46620V in the next month or two. The SLG46621V will be an easy addition since only one pin and the relevant configuration bits have changed from the 46620 (I suspect they're the same die, just bonded out differently).<br/>
<br/> Once that's done I'll have to do some more extensive work to add the SLG46140V since the architecture is a bit different (a lot of the combinatorial logic is merged into multi-function blocks). Luckily, the 46140 has a lot in common architecturally with the GreenPak5 family, so once that's done GreenPak5 will probably be a lot easier to add support for.<br/>
<br/> My thanks go out to Clifford Wolf, whitequark, the IRC users in ##openfpga, and everyone at Silego I've worked with to help make this possible. I hope that one day this project will become mature enough that Silego will ship it as an officially supported extension to GreenPak Designer, making history by becoming the first modern programmable logic vendor to ship a fully open source synthesis and P&amp;R suite.
</p> </p>
</div></article> </div></article>

View file

@ -33,21 +33,11 @@
<p> <p>
<a href="http://fakehost/index.html" target="_blank">福娘童話集</a> &gt; <a href="http://fakehost/test/index.html" target="_blank">きょうのイソップ童話</a> &gt; <a href="http://fakehost/test/itiran/01gatu.htm" target="_blank">1月のイソップ童話</a> &gt; 欲張りなイヌ <a href="http://fakehost/index.html" target="_blank">福娘童話集</a> &gt; <a href="http://fakehost/test/index.html" target="_blank">きょうのイソップ童話</a> &gt; <a href="http://fakehost/test/itiran/01gatu.htm" target="_blank">1月のイソップ童話</a> &gt; 欲張りなイヌ
</p> </p>
<p> <DIV>
<span color="#FF0000" size="+2">元旦のイソップ童話</span><br/> <p><span color="#FF0000" size="+2">元旦のイソップ童話</span></p><p>
<br/> <img src="http://fakehost/gazou/pc_gazou/aesop/aesop052.jpg" alt="&#x3088;&#x304F;&#x3070;&#x308A;&#x306A;&#x30A4;&#x30CC;" width="480" height="360"/></p><p>
<br/> 欲張りなイヌ</p><p>
<br/> <a href="http://hukumusume.com/douwa/English/aesop/01/01_j.html" target="_blank">ひらがな</a> ←→ <a href="http://hukumusume.com/douwa/English/aesop/01/01_j&amp;E.html" target="_blank">日本語・英語</a> ←→ <a href="http://hukumusume.com/douwa/English/aesop/01/01_E.html" target="_blank">English</a></p></DIV>
<img src="http://fakehost/gazou/pc_gazou/aesop/aesop052.jpg" alt="&#x3088;&#x304F;&#x3070;&#x308A;&#x306A;&#x30A4;&#x30CC;" width="480" height="360"/><br/>
<br/>
<br/>
<br/>
欲張りなイヌ<br/>
<br/>
<br/>
<br/>
<a href="http://hukumusume.com/douwa/English/aesop/01/01_j.html" target="_blank">ひらがな</a> ←→ <a href="http://hukumusume.com/douwa/English/aesop/01/01_j&amp;E.html" target="_blank">日本語・英語</a> ←→ <a href="http://hukumusume.com/douwa/English/aesop/01/01_E.html" target="_blank">English</a>
</p>
<DIV> <DIV>
<table> <table>
<tbody> <tbody>
@ -107,13 +97,7 @@
おしまい おしまい
</p> </p>
<p> <p>
<span><img src="http://fakehost/gazou/pc_gazou/all/top_bana/back_logo_r.gif" alt="&#x524D;&#x306E;&#x30DA;&#x30FC;&#x30B8;&#x3078;&#x623B;&#x308B;" name="Image10" width="175" height="32" id="Image10"/></span><br/> <span><img src="http://fakehost/gazou/pc_gazou/all/top_bana/back_logo_r.gif" alt="&#x524D;&#x306E;&#x30DA;&#x30FC;&#x30B8;&#x3078;&#x623B;&#x308B;" name="Image10" width="175" height="32" id="Image10"/></span></p>
<br/>
<br/>
<br/>
</p>
</td> </td>
<td> <td>
<img src="file:///C:/Documents%20and%20Settings/%E7%A6%8F%E5%A8%98note/%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97/company_website15/image/spacer.gif" width="1" height="1"/> <img src="file:///C:/Documents%20and%20Settings/%E7%A6%8F%E5%A8%98note/%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97/company_website15/image/spacer.gif" width="1" height="1"/>
@ -136,112 +120,80 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
     <span size="-1"><b>1月 1日の豆知識</b></span><br/>      <span size="-1"><b>1月 1日の豆知識</b></span><p>
<br/> <span size="-2"><u><p>
<span size="-2"><u><br/> 366日への旅</p></u></span></p></td>
<br/> </tr>
366日への旅</u></span> <tr>
<td>
<img src="file:///C:/Documents%20and%20Settings/%E7%A6%8F%E5%A8%98note/%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97" width="1" height="1"/><b><span size="-1">きょうの記念日</span></b><p>
<a href="http://fakehost/366/kinenbi/pc/01gatu/1_01.htm" target="_blank"><span size="-1">元旦</span></a></p></td>
</tr>
<tr>
<td>
<img src="file:///C:/Documents%20and%20Settings/%E7%A6%8F%E5%A8%98note/%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97/company_website15/image/spacer.gif" width="1" height="1"/><b><span size="-1">きょうの誕生花</span></b><p>
<a href="http://fakehost/366/hana/pc/01gatu/1_01.htm" target="_blank"><span size="-1">松(まつ)</span></a></p></td>
</tr>
<tr>
<td>
<b><span size="-1">きょうの誕生日・出来事</span></b><p>
<a href="http://fakehost/366/birthday/pc/01gatu/1_01.htm" target="_blank"><span size="-1">1949年 Mr.マリック(マジシャン)</span></a></p></td>
</tr>
<tr>
<td>
<b><span size="-1">恋の誕生日占い</span></b><p>
<a href="http://fakehost/sakura/uranai/birthday/01/01.html" target="_blank"><span size="-1">自分の考えをしっかりと持った女の子。</span></a></p></td>
</tr>
<tr>
<td>
<b><span size="-1">なぞなぞ小学校</span></b><p>
<a href="http://fakehost/nazonazo/new/2012/04/02.html" target="_blank"><span size="-1">○(丸)を取ったらお母さんになってしまう男の人は?</span></a></p></td>
</tr>
<tr>
<td>
<b><span size="-1">あこがれの職業紹介</span></b><p>
<a href="http://fakehost/sakura/navi/work/2017/041.html" target="_blank"><span size="-1">歌手</span></a></p></td>
</tr>
<tr>
<td>
<b><span size="-1">恋の魔法とおまじない</span></b> 001<p>
<a href="http://fakehost/omajinai/new/2012/00/re01.html" target="_blank"><span size="-1">両思いになれる おまじない</span></a></p></td>
</tr>
<tr>
<td>
<span size="-1">  <b>1月 1日の童話・昔話</b><u><span size="-2"><p>
福娘童話集</p></span></u></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<img src="file:///C:/Documents%20and%20Settings/%E7%A6%8F%E5%A8%98note/%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97" width="1" height="1"/><b><span size="-1">きょうの記念日</span></b><br/> <b><span size="-1">きょうの日本昔話</span></b><p>
<br/> <a href="http://fakehost/douwa/pc/jap/01/01.htm" target="_blank"><span size="-1">ネコがネズミを追いかける訳</span></a></p></td>
<a href="http://fakehost/366/kinenbi/pc/01gatu/1_01.htm" target="_blank"><span size="-1">元旦</span></a>
</td>
</tr> </tr>
<tr> <tr>
<td> <td>
<img src="file:///C:/Documents%20and%20Settings/%E7%A6%8F%E5%A8%98note/%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97/company_website15/image/spacer.gif" width="1" height="1"/><b><span size="-1">きょうの誕生花</span></b><br/> <b><span size="-1">きょうの世界昔話<img src="file:///C:/Documents%20and%20Settings/%E7%A6%8F%E5%A8%98note/%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97/company_website15/image/spacer.gif" width="1" height="1"/></span></b><p>
<br/> <a href="http://fakehost/douwa/pc/world/01/01a.htm" target="_blank"><span size="-1">モンゴルの十二支話</span></a></p></td>
<a href="http://fakehost/366/hana/pc/01gatu/1_01.htm" target="_blank"><span size="-1">松(まつ)</span></a>
</td>
</tr> </tr>
<tr> <tr>
<td> <td>
<b><span size="-1">きょうの誕生日・出来事</span></b><br/> <img src="file:///C:/Documents%20and%20Settings/%E7%A6%8F%E5%A8%98note/%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97/company_website15/image/spacer.gif" width="1" height="1"/><b><span size="-1">きょうの日本民話</span></b><p>
<br/> <a href="http://fakehost/douwa/pc/minwa/01/01c.html" target="_blank"><span size="-1">仕事の取替えっこ</span></a></p></td>
<a href="http://fakehost/366/birthday/pc/01gatu/1_01.htm" target="_blank"><span size="-1">1949年 Mr.マリック(マジシャン)</span></a>
</td>
</tr> </tr>
<tr> <tr>
<td> <td>
<b><span size="-1">恋の誕生日占い</span></b><br/> <b><span size="-1">きょうのイソップ童話</span></b><p>
<br/> <a href="http://fakehost/douwa/pc/aesop/01/01.htm" target="_blank"><span size="-1">欲張りなイヌ</span></a></p></td>
<a href="http://fakehost/sakura/uranai/birthday/01/01.html" target="_blank"><span size="-1">自分の考えをしっかりと持った女の子。</span></a>
</td>
</tr> </tr>
<tr> <tr>
<td> <td>
<b><span size="-1">なぞなぞ小学校</span></b><br/> <b><span size="-1">きょうの江戸小話</span></b><p>
<br/> <a href="http://fakehost/douwa/pc/kobanashi/01/01.htm" target="_blank"><span size="-1">ぞうきんとお年玉</span></a></p></td>
<a href="http://fakehost/nazonazo/new/2012/04/02.html" target="_blank"><span size="-1">○(丸)を取ったらお母さんになってしまう男の人は?</span></a>
</td>
</tr> </tr>
<tr> <tr>
<td> <td>
<b><span size="-1">あこがれの職業紹介</span></b><br/> <b><span size="-1">きょうの百物語</span></b><p>
<br/> <a href="http://fakehost/douwa/pc/kaidan/01/01.htm" target="_blank"><span size="-1">百物語の幽霊</span></a></p></td>
<a href="http://fakehost/sakura/navi/work/2017/041.html" target="_blank"><span size="-1">歌手</span></a>
</td>
</tr>
<tr>
<td>
<b><span size="-1">恋の魔法とおまじない</span></b> 001<br/>
<br/>
<a href="http://fakehost/omajinai/new/2012/00/re01.html" target="_blank"><span size="-1">両思いになれる おまじない</span></a>
</td>
</tr>
<tr>
<td>
<span size="-1">  <b>1月 1日の童話・昔話</b><br/>
<br/>
<u><span size="-2"><br/>
<br/>
福娘童話集</span></u></span>
</td>
</tr>
<tr>
<td>
<b><span size="-1">きょうの日本昔話</span></b><br/>
<br/>
<a href="http://fakehost/douwa/pc/jap/01/01.htm" target="_blank"><span size="-1">ネコがネズミを追いかける訳</span></a>
</td>
</tr>
<tr>
<td>
<b><span size="-1">きょうの世界昔話<img src="file:///C:/Documents%20and%20Settings/%E7%A6%8F%E5%A8%98note/%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97/company_website15/image/spacer.gif" width="1" height="1"/></span></b><br/>
<br/>
<a href="http://fakehost/douwa/pc/world/01/01a.htm" target="_blank"><span size="-1">モンゴルの十二支話</span></a>
</td>
</tr>
<tr>
<td>
<img src="file:///C:/Documents%20and%20Settings/%E7%A6%8F%E5%A8%98note/%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97/company_website15/image/spacer.gif" width="1" height="1"/><b><span size="-1">きょうの日本民話</span></b><br/>
<br/>
<a href="http://fakehost/douwa/pc/minwa/01/01c.html" target="_blank"><span size="-1">仕事の取替えっこ</span></a>
</td>
</tr>
<tr>
<td>
<b><span size="-1">きょうのイソップ童話</span></b><br/>
<br/>
<a href="http://fakehost/douwa/pc/aesop/01/01.htm" target="_blank"><span size="-1">欲張りなイヌ</span></a>
</td>
</tr>
<tr>
<td>
<b><span size="-1">きょうの江戸小話</span></b><br/>
<br/>
<a href="http://fakehost/douwa/pc/kobanashi/01/01.htm" target="_blank"><span size="-1">ぞうきんとお年玉</span></a>
</td>
</tr>
<tr>
<td>
<b><span size="-1">きょうの百物語</span></b><br/>
<br/>
<a href="http://fakehost/douwa/pc/kaidan/01/01.htm" target="_blank"><span size="-1">百物語の幽霊</span></a>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -254,37 +206,32 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<span size="-1"><b>366日への旅</b><br/> <span size="-1"><b>366日への旅</b><p>
<br/> <a href="http://hukumusume.com/366/" target="_blank">毎日の記念日・誕生花 ・有名人の誕生日と性格判断</a></p></span>
<a href="http://hukumusume.com/366/" target="_blank">毎日の記念日・誕生花 ・有名人の誕生日と性格判断</a></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<span size="-1"><b>福娘童話集</b><br/> <span size="-1"><b>福娘童話集</b><p>
<br/> <a href="http://hukumusume.com/douwa/" target="_blank">世界と日本の童話と昔話</a></p></span>
<a href="http://hukumusume.com/douwa/" target="_blank">世界と日本の童話と昔話</a></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<span size="-1"><b>女の子応援サイト -さくら-</b><br/> <span size="-1"><b>女の子応援サイト -さくら-</b><p>
<br/> <a href="http://hukumusume.com/sakura/index.html" target="_blank">誕生日占い、お仕事紹介、おまじない、など</a></p></span>
<a href="http://hukumusume.com/sakura/index.html" target="_blank">誕生日占い、お仕事紹介、おまじない、など</a></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<span size="-1"><b>子どもの病気相談所</b><br/> <span size="-1"><b>子どもの病気相談所</b><p>
<br/> <a href="http://hukumusume.com/my_baby/sick/" target="_blank">病気検索と対応方法、症状から検索するWEB問診</a></p></span>
<a href="http://hukumusume.com/my_baby/sick/" target="_blank">病気検索と対応方法、症状から検索するWEB問診</a></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<span size="-1"><b>世界60秒巡り</b><br/> <span size="-1"><b>世界60秒巡り</b><p>
<br/> <a href="http://hukumusume.com/366/world/" target="_blank">国旗国歌や世界遺産など、世界の国々の豆知識</a></p></span>
<a href="http://hukumusume.com/366/world/" target="_blank">国旗国歌や世界遺産など、世界の国々の豆知識</a></span>
</td> </td>
</tr> </tr>
</tbody> </tbody>

View file

@ -1,4 +1,4 @@
<article><div id="readability-page-1"> <article><div id="readability-page-1">
<h3><a href="http://mcupdate.tumblr.com/post/96439224994/minecraft-18-the-bountiful-update" target="_blank">Minecraft 1.8 - The Bountiful Update</a></h3> <h3><a href="http://mcupdate.tumblr.com/post/96439224994/minecraft-18-the-bountiful-update" target="_blank">Minecraft 1.8 - The Bountiful Update</a></h3>
<p>+ Added Granite, Andesite, and Diorite stone blocks, with smooth versions<br/>+ Added Slime Block<br/>+ Added Iron Trapdoor<br/>+ Added Prismarine and Sea Lantern blocks<br/>+ Added the Ocean Monument<br/>+ Added Red Sandstone<br/>+ Added Banners<br/>+ Added Armor Stands<br/>+ Added Coarse Dirt (dirt where grass wont grow)<br/>+ Added Guardian mobs, with item drops<br/>+ Added Endermite mob<br/>+ Added Rabbits, with item drops<br/>+ Added Mutton and Cooked Mutton<br/>+ Villagers will harvest crops and plant new ones<br/>+ Mossy Cobblestone and Mossy Stone Bricks are now craftable<br/>+ Chiseled Stone Bricks are now craftable<br/>+ Doors and fences now come in all wood type variants<br/>+ Sponge block has regained its water-absorbing ability and becomes wet<br/>+ Added a spectator game mode (game mode 3)<br/>+ Added one new achievement<br/>+ Added “Customized” world type<br/>+ Added hidden “Debug Mode” world type<br/>+ Worlds can now have a world barrier<br/>+ Added @e target selector for Command Blocks<br/>+ Added /blockdata command<br/>+ Added /clone command<br/>+ Added /execute command<br/>+ Added /fill command<br/>+ Added /particle command<br/>+ Added /testforblocks command<br/>+ Added /title command<br/>+ Added /trigger command<br/>+ Added /worldborder command<br/>+ Added /stats command<br/>+ Containers can be locked in custom maps by using the “Lock” data tag<br/>+ Added logAdminCommands, showDeathMessages, reducedDebugInfo, sendCommandFeedback, and randomTickSpeed game rules<br/>+ Added three new statistics<br/>+ Player skins can now have double layers across the whole model, and left/right arms/legs can be edited independently<br/>+ Added a new player model with smaller arms, and a new player skin called Alex?<br/>+ Added options for configuring what pieces of the skin that are visible<br/>+ Blocks can now have custom visual variations in the resource packs<br/>+ Minecraft Realms now has an activity chart, so you can see who has been online<br/>+ Minecraft Realms now lets you upload your maps<br/>* Difficulty setting is saved per world, and can be locked if wanted<br/>* Enchanting has been redone, now costs lapis lazuli in addition to enchantment levels<br/>* Villager trading has been rebalanced<br/>* Anvil repairing has been rebalanced<br/>* Considerable faster client-side performance<br/>* Max render distance has been increased to 32 chunks (512 blocks)<br/>* Adventure mode now prevents you from destroying blocks, unless your items have the CanDestroy data tag<br/>* Resource packs can now also define the shape of blocks and items, and not just their textures<br/>* Scoreboards have been given a lot of new features<br/>* Tweaked the F3 debug screen<br/>* Block ID numbers (such as 1 for stone), are being replaced by ID names (such as minecraft:stone)<br/>* Server list has been improved<br/>* A few minor changes to village and temple generation<br/>* Mob heads for players now show both skin layers<br/>* Buttons can now be placed on the ceiling<br/>* Lots and lots of other changes<br/>* LOTS AND LOTS of other changes<br/>- Removed Herobrine<br/><br/></p> <p>+ Added Granite, Andesite, and Diorite stone blocks, with smooth versions<br/>+ Added Slime Block<br/>+ Added Iron Trapdoor<br/>+ Added Prismarine and Sea Lantern blocks<br/>+ Added the Ocean Monument<br/>+ Added Red Sandstone<br/>+ Added Banners<br/>+ Added Armor Stands<br/>+ Added Coarse Dirt (dirt where grass wont grow)<br/>+ Added Guardian mobs, with item drops<br/>+ Added Endermite mob<br/>+ Added Rabbits, with item drops<br/>+ Added Mutton and Cooked Mutton<br/>+ Villagers will harvest crops and plant new ones<br/>+ Mossy Cobblestone and Mossy Stone Bricks are now craftable<br/>+ Chiseled Stone Bricks are now craftable<br/>+ Doors and fences now come in all wood type variants<br/>+ Sponge block has regained its water-absorbing ability and becomes wet<br/>+ Added a spectator game mode (game mode 3)<br/>+ Added one new achievement<br/>+ Added “Customized” world type<br/>+ Added hidden “Debug Mode” world type<br/>+ Worlds can now have a world barrier<br/>+ Added @e target selector for Command Blocks<br/>+ Added /blockdata command<br/>+ Added /clone command<br/>+ Added /execute command<br/>+ Added /fill command<br/>+ Added /particle command<br/>+ Added /testforblocks command<br/>+ Added /title command<br/>+ Added /trigger command<br/>+ Added /worldborder command<br/>+ Added /stats command<br/>+ Containers can be locked in custom maps by using the “Lock” data tag<br/>+ Added logAdminCommands, showDeathMessages, reducedDebugInfo, sendCommandFeedback, and randomTickSpeed game rules<br/>+ Added three new statistics<br/>+ Player skins can now have double layers across the whole model, and left/right arms/legs can be edited independently<br/>+ Added a new player model with smaller arms, and a new player skin called Alex?<br/>+ Added options for configuring what pieces of the skin that are visible<br/>+ Blocks can now have custom visual variations in the resource packs<br/>+ Minecraft Realms now has an activity chart, so you can see who has been online<br/>+ Minecraft Realms now lets you upload your maps<br/>* Difficulty setting is saved per world, and can be locked if wanted<br/>* Enchanting has been redone, now costs lapis lazuli in addition to enchantment levels<br/>* Villager trading has been rebalanced<br/>* Anvil repairing has been rebalanced<br/>* Considerable faster client-side performance<br/>* Max render distance has been increased to 32 chunks (512 blocks)<br/>* Adventure mode now prevents you from destroying blocks, unless your items have the CanDestroy data tag<br/>* Resource packs can now also define the shape of blocks and items, and not just their textures<br/>* Scoreboards have been given a lot of new features<br/>* Tweaked the F3 debug screen<br/>* Block ID numbers (such as 1 for stone), are being replaced by ID names (such as minecraft:stone)<br/>* Server list has been improved<br/>* A few minor changes to village and temple generation<br/>* Mob heads for players now show both skin layers<br/>* Buttons can now be placed on the ceiling<br/>* Lots and lots of other changes<br/>* LOTS AND LOTS of other changes<br/>- Removed Herobrine</p>
</div></article> </div></article>

View file

@ -8,7 +8,7 @@
<p> <p>
First, let's see what you can do with this new feature! Similar to <a href="https://hacks.mozilla.org/2018/01/shrinking-webassembly-and-javascript-code-sizes-in-emscripten/" target="_blank">this post</a> let's start with a "hello world" type program that exports a single function that adds two numbers: First, let's see what you can do with this new feature! Similar to <a href="https://hacks.mozilla.org/2018/01/shrinking-webassembly-and-javascript-code-sizes-in-emscripten/" target="_blank">this post</a> let's start with a "hello world" type program that exports a single function that adds two numbers:
</p> </p>
<pre><code><span>// add.c</span><br/><span><span>#</span><span>include</span> <span>&lt;emscripten.h&gt;</span></span><br/><br/>EMSCRIPTEN_KEEPALIVE<br/><span>int</span> <span>add</span><span>(</span><span>int</span> x<span>,</span> <span>int</span> y<span>)</span> <span>{</span><br/> <span>return</span> x <span>+</span> y<span>;</span><br/><span>}</span></code></pre> <pre><code><span>// add.c</span><br/><span><span>#</span><span>include</span> <span>&lt;emscripten.h&gt;</span></span><p>EMSCRIPTEN_KEEPALIVE<br/><span>int</span> <span>add</span><span>(</span><span>int</span> x<span>,</span> <span>int</span> y<span>)</span> <span>{</span><br/> <span>return</span> x <span>+</span> y<span>;</span><br/><span>}</span></p></code></pre>
<p> <p>
We'd normally build this with something like <code>emcc -O3 add.c -o add.js</code> which would emit <code>add.js</code> and <code>add.wasm</code>. Instead, let's ask <code>emcc</code> to only emit Wasm: We'd normally build this with something like <code>emcc -O3 add.c -o add.js</code> which would emit <code>add.js</code> and <code>add.wasm</code>. Instead, let's ask <code>emcc</code> to only emit Wasm:
</p> </p>
@ -34,7 +34,7 @@
<p> <p>
One nice thing about a standalone Wasm file like this is that you can write custom JavaScript to load and run it, which can be very minimal depending on your use case. For example, we can do this in Node.js: One nice thing about a standalone Wasm file like this is that you can write custom JavaScript to load and run it, which can be very minimal depending on your use case. For example, we can do this in Node.js:
</p> </p>
<pre><code><span>// load-add.js</span><br/><span>const</span> binary <span>=</span> <span>require</span><span>(</span><span>'fs'</span><span>)</span><span>.</span><span>readFileSync</span><span>(</span><span>'add.wasm'</span><span>)</span><span>;</span><br/><br/>WebAssembly<span>.</span><span>instantiate</span><span>(</span>binary<span>)</span><span>.</span><span>then</span><span>(</span><span>(</span><span><span>{</span> instance <span>}</span></span><span>)</span> <span>=&gt;</span> <span>{</span><br/> console<span>.</span><span>log</span><span>(</span>instance<span>.</span>exports<span>.</span><span>add</span><span>(</span><span>40</span><span>,</span> <span>2</span><span>)</span><span>)</span><span>;</span><br/><span>}</span><span>)</span><span>;</span></code></pre> <pre><code><span>// load-add.js</span><br/><span>const</span> binary <span>=</span> <span>require</span><span>(</span><span>'fs'</span><span>)</span><span>.</span><span>readFileSync</span><span>(</span><span>'add.wasm'</span><span>)</span><span>;</span><p>WebAssembly<span>.</span><span>instantiate</span><span>(</span>binary<span>)</span><span>.</span><span>then</span><span>(</span><span>(</span><span><span>{</span> instance <span>}</span></span><span>)</span> <span>=&gt;</span> <span>{</span><br/> console<span>.</span><span>log</span><span>(</span>instance<span>.</span>exports<span>.</span><span>add</span><span>(</span><span>40</span><span>,</span> <span>2</span><span>)</span><span>)</span><span>;</span><br/><span>}</span><span>)</span><span>;</span></p></code></pre>
<p> <p>
Just 4 lines! Running that prints <code>42</code> as expected. Note that while this example is very simplistic, there are cases where you simply don't need much JavaScript, and may be able to do better than Emscripten's default JavaScript runtime (which supports a bunch of environments and options). A real-world example of that is in <a href="https://github.com/zeux/meshoptimizer/blob/bdc3006532dd29b03d83dc819e5fa7683815b88e/js/meshopt_decoder.js" target="_blank">zeux's meshoptimizer</a> - just 57 lines, including memory management, growth, etc.! Just 4 lines! Running that prints <code>42</code> as expected. Note that while this example is very simplistic, there are cases where you simply don't need much JavaScript, and may be able to do better than Emscripten's default JavaScript runtime (which supports a bunch of environments and options). A real-world example of that is in <a href="https://github.com/zeux/meshoptimizer/blob/bdc3006532dd29b03d83dc819e5fa7683815b88e/js/meshopt_decoder.js" target="_blank">zeux's meshoptimizer</a> - just 57 lines, including memory management, growth, etc.!
</p> </p>
@ -44,7 +44,7 @@
<p> <p>
Another nice thing about standalone Wasm files is that you can run them in Wasm runtimes like <a href="https://wasmer.io/" target="_blank">wasmer</a>, <a href="https://github.com/bytecodealliance/wasmtime" target="_blank">wasmtime</a>, or <a href="https://github.com/WAVM/WAVM" target="_blank">WAVM</a>. For example, consider this hello world: Another nice thing about standalone Wasm files is that you can run them in Wasm runtimes like <a href="https://wasmer.io/" target="_blank">wasmer</a>, <a href="https://github.com/bytecodealliance/wasmtime" target="_blank">wasmtime</a>, or <a href="https://github.com/WAVM/WAVM" target="_blank">WAVM</a>. For example, consider this hello world:
</p> </p>
<pre><code><span>// hello.cpp</span><br/><span><span>#</span><span>include</span> <span>&lt;stdio.h&gt;</span></span><br/><br/><span>int</span> <span>main</span><span>(</span><span>)</span> <span>{</span><br/> <span>printf</span><span>(</span><span>"hello, world!\n"</span><span>)</span><span>;</span><br/> <span>return</span> <span>0</span><span>;</span><br/><span>}</span></code></pre> <pre><code><span>// hello.cpp</span><br/><span><span>#</span><span>include</span> <span>&lt;stdio.h&gt;</span></span><p><span>int</span> <span>main</span><span>(</span><span>)</span> <span>{</span><br/> <span>printf</span><span>(</span><span>"hello, world!\n"</span><span>)</span><span>;</span><br/> <span>return</span> <span>0</span><span>;</span><br/><span>}</span></p></code></pre>
<p> <p>
We can build and run that in any of those runtimes: We can build and run that in any of those runtimes:
</p> </p>

View file

@ -1,51 +1,7 @@
<article><div id="readability-page-1"> <article><DIV id="readability-page-1"><p>
トレンドマイクロは3月9日、Wi-Fi利用時の通信を暗号化し保護するスマホ・タブレット向けのセキュリティアプリ「フリーWi-Fiプロテクション」iOS/Androidの発売を開始すると発表した。1年版ライセンスは2900円税込で、2年版ライセンスは5000円税込</p><p>  フリーWi-Fiプロテクションは、App Storeおよび、Google Playにて販売され、既に提供しているスマホ・タブレット向け総合セキュリティ対策アプリ「ウイルスバスター モバイル」と併用することで、不正アプリや危険なウェブサイトからの保護に加え、通信の盗み見を防ぐことができる。</p><p>  2020年の東京オリンピック・パラリンピックの開催などを見据え、フリーWi-Fi公衆無線LANの設置が促進され、フリーWi-Fiの利用者も増加している。
</p><p>  一方で、脆弱な設定のフリーWi-Fiや攻撃者が設置した偽のフリーWi-Fiへの接続などによる情報漏えい、通信の盗み見などのセキュリティリスクが危惧されているという。
</p><p>  正規事業者が提供する安全性の高いフリーWi-Fiのほかにも、通信を暗号化していない安全性の低いフリーWi-Fi、さらにはサイバー犯罪者が設置したフリーWi-Fiなどさまざまなものが混在している。また、利用者は、接続する前にひとつひとつ安全性を確認するのは難しい状況だとしている。
<div> </p><p>  トレンドマイクロがスマートフォン保持者でフリーWi-Fiの利用経験がある人に実施した調査では、回答者の約85が安全なフリーWi-Fiと危険なフリーWi-Fiは「見分けられない」と回答。さらに、約65がフリーWi-Fiの利用に不安を感じていると回答している。
<p> </p><p>  こうした環境の変化やユーザの状況を鑑み、フリーWi-Fiプロテクションの提供を開始する。同アプリをインストールすることで利用者は、万が一安全性の低いフリーWi-Fiのアクセスポイントに接続してしまった場合でも、その通信を暗号化でき、通信の盗み見やそれによる情報漏えいのリスクを低減できるようになる。
トレンドマイクロは3月9日、Wi-Fi利用時の通信を暗号化し保護するスマホ・タブレット向けのセキュリティアプリ「フリーWi-Fiプロテクション」iOS/Androidの発売を開始すると発表した。1年版ライセンスは2900円税込で、2年版ライセンスは5000円税込<br/> </p><p>  具体的には、フリーWi-Fi利用時に、スマートフォンがフリーWi-Fiプロテクションインフラに接続することにより、フリーWi-Fiのアクセスポイントを介した通信がVPNVirtual Private Networkで暗号化される。これにより利用者は、第三者から通信を傍受されることやデータの情報漏えいを防ぐことが可能。さらに、かんたん自動接続の機能により、通信を暗号化していない安全性が低いフリーWi-Fi接続時や利用者が指定したWi-Fiへ接続する際に、自動的に通信を暗号化し、利用者の通信を保護する。</p><p>  また、フリーWi-Fiプロテクションインフラと、莫大なセキュリティ情報のビッグデータを保有するクラウド型セキュリティ技術基盤「Trend Micro Smart Protection Network」SPNが連携することで、フリーWi-Fiプロテクションインフラを経由してインターネットを利用する際に、利用者がフィッシング詐欺サイトや偽サイトなどへの不正サイトへアクセスすることをブロックできるという。</p></DIV></article>
<br/>  フリーWi-Fiプロテクションは、App Storeおよび、Google Playにて販売され、既に提供しているスマホ・タブレット向け総合セキュリティ対策アプリ「ウイルスバスター モバイル」と併用することで、不正アプリや危険なウェブサイトからの保護に加え、通信の盗み見を防ぐことができる。<br/>
<br/>  2020年の東京オリンピック・パラリンピックの開催などを見据え、フリーWi-Fi公衆無線LANの設置が促進され、フリーWi-Fiの利用者も増加している。
<br/>
<br/>  一方で、脆弱な設定のフリーWi-Fiや攻撃者が設置した偽のフリーWi-Fiへの接続などによる情報漏えい、通信の盗み見などのセキュリティリスクが危惧されているという。
<br/>
<br/>  正規事業者が提供する安全性の高いフリーWi-Fiのほかにも、通信を暗号化していない安全性の低いフリーWi-Fi、さらにはサイバー犯罪者が設置したフリーWi-Fiなどさまざまなものが混在している。また、利用者は、接続する前にひとつひとつ安全性を確認するのは難しい状況だとしている。
<br/>
<br/>  トレンドマイクロがスマートフォン保持者でフリーWi-Fiの利用経験がある人に実施した調査では、回答者の約85が安全なフリーWi-Fiと危険なフリーWi-Fiは「見分けられない」と回答。さらに、約65がフリーWi-Fiの利用に不安を感じていると回答している。
<br/>
<br/>  こうした環境の変化やユーザの状況を鑑み、フリーWi-Fiプロテクションの提供を開始する。同アプリをインストールすることで利用者は、万が一安全性の低いフリーWi-Fiのアクセスポイントに接続してしまった場合でも、その通信を暗号化でき、通信の盗み見やそれによる情報漏えいのリスクを低減できるようになる。
<br/>
<br/>  具体的には、フリーWi-Fi利用時に、スマートフォンがフリーWi-Fiプロテクションインフラに接続することにより、フリーWi-Fiのアクセスポイントを介した通信がVPNVirtual Private Networkで暗号化される。これにより利用者は、第三者から通信を傍受されることやデータの情報漏えいを防ぐことが可能。さらに、かんたん自動接続の機能により、通信を暗号化していない安全性が低いフリーWi-Fi接続時や利用者が指定したWi-Fiへ接続する際に、自動的に通信を暗号化し、利用者の通信を保護する。<br/>
<br/>  また、フリーWi-Fiプロテクションインフラと、莫大なセキュリティ情報のビッグデータを保有するクラウド型セキュリティ技術基盤「Trend Micro Smart Protection Network」SPNが連携することで、フリーWi-Fiプロテクションインフラを経由してインターネットを利用する際に、利用者がフィッシング詐欺サイトや偽サイトなどへの不正サイトへアクセスすることをブロックできるという。</p>
</div>
<div>
<p>最終更新:3/9(木) 18:45</p>
<p>
<a href="http://rdsig.yahoo.co.jp/media/news/cobrand/cnetj/RV=1/RE=1490262788/RH=cmRzaWcueWFob28uY28uanA-/RB=/RU=aHR0cDovL2phcGFuLmNuZXQuY29tLw--/RS=%5EADA5fhlOeGBp9LaG3IS9duiOkz7zFc-;_ylt=A7YWOgEDJsFY.TUAwLAvl.Z7" target="_blank"><img src="https://s.yimg.jp/images/news/cobranding/cnetj.gif" alt="CNET Japan" width="170" height="40"/></a>
</p>
</div>
<div>
<ul>
<li>
<a href="http://rdsig.yahoo.co.jp/RV=1/RE=1490262788/RH=cmRzaWcueWFob28uY28uanA-/RB=/RU=aHR0cHM6Ly90d2l0dGVyLmNvbS9pbnRlbnQvdHdlZXQ_aGFzaHRhZ3M9WWFob28lRTMlODMlOEIlRTMlODMlQTUlRTMlODMlQkMlRTMlODIlQjkmb3JpZ2luYWxfcmVmZXJlcj1odHRwJTNBJTJGJTJGaGVhZGxpbmVzLnlhaG9vLmNvLmpwJTJGaGwlM0ZhJTNEMjAxNzAzMDktMzUwOTc4MzgtY25ldGotc2NpJnRleHQ9JUUzJTgzJTg4JUUzJTgzJUFDJUUzJTgzJUIzJUUzJTgzJTg5JUUzJTgzJTlFJUUzJTgyJUE0JUUzJTgyJUFGJUUzJTgzJUFEJUUzJTgwJTgxJUU1JTg1JUFDJUU4JUExJTg2JUU3JTg0JUExJUU3JUI3JTlBTEFOJUUzJTgyJTkyJUU1JUFFJTg5JUU1JTg1JUE4JUUzJTgxJUFCJUU0JUJEJUJGJUUzJTgxJTg2JUUzJTgxJTlGJUUzJTgyJTgxJUUzJTgxJUFFJUUzJTgyJUEyJUUzJTgzJTk3JUUzJTgzJUFBJUUzJTgwJThDJUUzJTgzJTk1JUUzJTgzJUFBJUUzJTgzJUJDV2ktRmklRTMlODMlOTclRTMlODMlQUQlRTMlODMlODYlRTMlODIlQUYlRTMlODIlQjclRTMlODMlQTclRTMlODMlQjMlRTMlODAlOEQlRUYlQkMlODhDTkVUJTIwSmFwYW4lRUYlQkMlODklMjAtJTIwWWFob28lMjElRTMlODMlOEIlRTMlODMlQTUlRTMlODMlQkMlRTMlODIlQjkmdHdfcD10d2VldGJ1dHRvbiZ1cmw9aHR0cCUzQSUyRiUyRmhlYWRsaW5lcy55YWhvby5jby5qcCUyRmhsJTNGYSUzRDIwMTcwMzA5LTM1MDk3ODM4LWNuZXRqLXNjaQ--/RS=%5EADA0hVu6aGxiaIKUWpENbe6eNNKa.I-;_ylt=A7YWOgEDJsFY.TUA07Avl.Z7" target="_blank">
<p><span>ツイート</span></p>
</a>
</li>
<li>
<a href="http://rdsig.yahoo.co.jp/RV=1/RE=1490262788/RH=cmRzaWcueWFob28uY28uanA-/RB=/RU=aHR0cHM6Ly93d3cuZmFjZWJvb2suY29tL3NoYXJlci9zaGFyZXIucGhwP3U9aHR0cDovL2hlYWRsaW5lcy55YWhvby5jby5qcC9obD9hPTIwMTcwMzA5LTM1MDk3ODM4LWNuZXRqLXNjaQ--/RS=%5EADAWIDPx9Ml7C55R8Gy8MiskPhYYmQ-;_ylt=A7YWOgEDJsFY.TUA1bAvl.Z7" target="_blank">
<p><span>シェアする</span></p>
</a>
</li>
</ul>
</div>
</div></article>

View file

@ -879,6 +879,10 @@ impl FullTextParser {
_ = Util::strip_node(context, "//link"); _ = Util::strip_node(context, "//link");
_ = Util::strip_node(context, "//aside"); _ = Util::strip_node(context, "//aside");
if let Some(root) = document.get_root_element() {
Util::replace_brs(&root, document);
}
Self::fix_urls(context, url, document); Self::fix_urls(context, url, document);
} }

View file

@ -921,4 +921,161 @@ impl Util {
}); });
std::fs::write(filename, html).unwrap(); std::fs::write(filename, html).unwrap();
} }
// Replaces 2 or more successive <br> elements with a single <p>.
// Whitespace between <br> elements are ignored.
// For example:
// <div>foo<br>bar<br> <br><br>abc</div>
// will become:
// <div>foo<br>bar<p>abc</p></div>
pub fn replace_brs(node: &Node, document: &Document) {
let br_nodes = Self::get_elements_by_tag_name(node, "br");
for br_node in br_nodes {
let mut next = br_node.get_next_sibling();
// Whether 2 or more <br> elements have been found and replaced with a
// <p> block.
let mut replaced = false;
// If we find a <br> chain, remove the <br>s until we hit another node
// or non-whitespace. This leaves behind the first <br> in the chain
// (which will be replaced with a <p> later).
while let Some(mut n) = next {
let is_text_whitespace = n
.get_type()
.map(|t| t == NodeType::TextNode)
.unwrap_or(false)
&& n.get_content().trim().is_empty();
let is_br_node = n.get_name().to_uppercase() == "BR";
let next_is_br_node = n
.get_next_sibling()
.map(|n| n.get_name().to_uppercase() == "BR")
.unwrap_or(false);
if !is_text_whitespace && !is_br_node {
break;
}
next = n.get_next_sibling();
if is_br_node || (is_text_whitespace && next_is_br_node) {
replaced = true;
n.unlink();
}
}
if !replaced {
continue;
}
// If we removed a <br> chain, replace the remaining <br> with a <p>. Add
// all sibling nodes as children of the <p> until we hit another <br>
// chain.
let mut parent = match br_node.get_parent() {
Some(parent) => parent,
None => continue,
};
let mut p = Node::new("p", None, document).unwrap();
_ = parent.replace_child_node(p.clone(), br_node).unwrap();
next = p.get_next_sibling();
while let Some(mut next_node) = next {
// If we've hit another <br><br>, we're done adding children to this <p>.
if next_node.get_name().to_uppercase() == "BR" {
if let Some(next_elem) = next_node.get_next_element_sibling() {
if next_elem.get_name().to_uppercase() == "BR" {
break;
}
}
}
if !Self::is_phrasing_content(&next_node) {
break;
}
// Otherwise, make this node a child of the new <p>.
let sibling = next_node.get_next_sibling();
next_node.unlink();
_ = p.add_child(&mut next_node);
next = sibling;
}
if p.get_child_elements().is_empty() && p.get_content().trim().is_empty() {
p.unlink();
continue;
}
while let Some(mut last_child) = p.get_last_child() {
let is_text_node = last_child
.get_type()
.map(|t| t == NodeType::TextNode)
.unwrap_or(false);
let is_empty = last_child.get_content().trim().is_empty();
if is_text_node && is_empty {
last_child.unlink();
} else {
break;
}
}
if let Some(mut parent) = p.get_parent() {
if parent.get_name().to_uppercase() == "P" {
_ = parent.set_name("DIV");
}
}
}
}
}
#[cfg(test)]
mod tests {
use libxml::parser::Parser;
use super::Util;
fn replace_brs(source: &str, expected: &str) {
libxml::tree::node::set_node_rc_guard(10);
let parser = Parser::default_html();
let document = parser.parse_string(source).unwrap();
let root = document.get_root_element().unwrap();
let body = root.get_first_child().unwrap();
let div = body.get_first_child().unwrap();
Util::replace_brs(&root, &document);
let result = document.node_to_string(&div);
assert_eq!(expected, result);
}
#[test]
fn replace_brs_1() {
replace_brs(
"<div>foo<br>bar<br> <br><br>abc</div>",
"<div>foo<br/>bar<p>abc</p></div>",
)
}
#[test]
fn replace_brs_2() {
let source = r#"
<div>
<p>
It might have been curiosity or it might have been the nagging sensation that chewed at his brain for the three weeks that he researched the subject of the conversation. All For One was a cryptid. Mystical in more ways than one, he was only a rumour on a network that was two-hundred years old. There were whispers of a shadowy figure who once ruled Japan, intermingled with a string of conspiracies and fragmented events.
</p>
<p>
Izuku had even braved the dark web, poking and prodding at some of the seedier elements of the world wide web. The internet had rumours, but the dark web had stories.<br/>
</p>
<p>
An implied yakuza wrote about his grandfather who lost a fire manipulation Quirk and his sanity without any reason. His grandfather had been institutionalised, crying and repeating he took it, he took it until his dying days. No one could console him.
</p>
</div>
"#;
replace_brs(source, source.trim())
}
} }