performing Network I/O in Red using bindings - rebol

I read that there were bindings to perform GET and POST in the Red programming language. Could someone kindly show me a simple example that does something like "wget http://www.google.com"?

There is a cURL binding for Red which is described in more detail in this question.
How do I use the Red cURL binding?
It will not give you the nice print read http://red-lang.org syntax, but I understand that adding this protocol to Red is on the road mapfor the future.

Related

How to change the sunlight level (with commands / datapacks) in Minecraft

I'm working on a server whereas a fun thing for late December I want to make the whole world darker. The Minecraft sun usually has a light level of 15. Is there any way to lower the sun's light level to something like 8 so mobs can spawn on any block not under sunlight?
Any solution like datapacks, commands, or server plugins would work, but I wouldn't be able to use any mods (it could be super simple if I could use mods, but others would have to download it).
Thanks.
So I found this plugin online, which basically allows you to change light levels for things at will, and might solve your problem. If it doesn't, I also found this forum post, which may also help(but it is a bit more complex). It suggests decompiling Bukkit.jar(or whatever server software you use, Spigot, Paper, etc.), then editing the code for which mobs can spawn in.
I'd suggest looking into ProtocolLib plugin to send packets to players. I don't know which packet lighting would be in but if you use a tool called "pakkit" (https://github.com/Heath123/pakkit) you can watch Minecraft packets and that might help you see what causes light changes (example: place a torch in front of you and see what packet is sent). Then if you know what packets are sent you can modify packets as they are sent to include custom lighting data.

Is there a way of using the <prosody> tag in SSML to adjust individual words without a pause (without using a post-processor)

When using the prosody tag in SSML with Google Cloud TTS, I cannot adjust the attributes of individual words without creating an unwanted pause.
The code below creates a lag between 'New' and 'Video'. It has been suggested that a postprocessor can remove these pauses, but I'd like to know if there's a way of doing it directly within the code itself?
<speak>
Hello, and welcome to this<prosody pitch="+3st">New</prosody>Video Tutorial.
</speak>
After testing, it appears there isn't a way of doing this using Google Cloud TTS. You can manually edit the sound file after generating it, but thay defeats the object of the exercise.
I don't have the cleanest answer, as what you are asking is not very supported. Prosody's pitch contour let's you change the tone of voice at different parts of the sentence.
Example of Prosody contour
<speak><prosody contour="(0%, +20Hz) (20%, +30%) (100%, +20%)"> Hello friends! </prosody></speak>
I am still playing around with this, but it seems like a tedious way of getting what you want done.
Using contour
contour takes a string of tuples "(%position in sentence, pitch adjustment) (..., ...)
I hope this helped and best of luck on your work!

Looking for examples showing usage of UDP source element in a C++ gstreamer application

I've been reading the documentation but it's a little tough to see how to set up a pipeline in C++ using the UDP source element.
If anyone knows of an example, or could post a snippet showing how to do it, I'd be very grateful.
Is it enough to do
source = gst_element_make_from_uri(GST_URI_SRC, "udp://#:15004", "source");
and then use the result as the first element in a pipeline?
User otopolsky answered this adequately for my purposes in the comment above, saying:
here are rtp examples, I think they work very similar (RTP is UDP based protocol with packet counting ability), why dont you just use udpsrc? – otopolsky Jan 28 at 8:21

Does sample code exist for Squeak Smalltalk?

can anybody give some hints on squeaksource or things like that, they can provide mcz sample code focuse on simple add, reduce, multiplication, division calculation?
http://www.world.st/ is an awesome access point for all things Smalltalk. It has links to many free books, including Stephan's excellent suggestion. There are also links to many Smalltalk mailing lists, like the Squeak beginners list, where you can get many basic (and not so basic) questions answered.
It's hard to answer very general questions (like yours). If you are more specific, you'll get better answers. Especially if you try something on your own first and then explain what you did and where you got stuck.
UPDATE:
It seems you're asking if you can see what's going on behind the scenes when code is executed. In the Browser, you can choose to see the bytecodes that it's compiled into.
In your (1+2) * 3 example, if you save this in a method, and click the "source" button in the Browser ("view" in OmniBrowser), and choose "byteCodes", you will see:
17 <76> pushConstant: 1
18 <77> pushConstant: 2
19 <B0> send: +
20 <20> pushConstant: 3
21 <B8> send: *
22 <87> pop
23 <78> returnSelf
Did you already read Squeak by Example?
While its not really sample code, my video tutorial series, Squeak from the very start, may give you insights: http://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=viewall

Print complete control flow through gdb including values of variables

The idea is that given a specific input to the program, somehow I want to automatically step-in through the complete program and dump its control flow along with all the data being used like classes and their variables. Is their a straightforward way to do this? Or can this be done by some scripting over gdb or does it require modification in gdb?
Ok the reason for this question is because of an idea regarding a debugging tool. What it does is this. Given two different inputs to a program, one causing an incorrect output and the other a correct one, it will tell what part of the control flow differ for them.
So What I think will be needed is a complete dump of these 2 control flows going into a diff engine. And if the two inputs are following similar control flows then their diff would (in many cases) give a good idea about why the bug exist.
This can be made into a very engaging tool with many features build on top of this.
Tell us a little more about the environment. dtrace, for example, will do a marvelous job of this in Solaris or Leopard. gprof is another possibility.
A bumpo version of this could be done with yes(1), or expect(1).
If you want to get fancy, GDB can be scripted with Python in some versions.
What you are describing sounds a bit like gdb's "tracepoint debugging".
See gdb's internal help "help tracepoint". You can also see a whitepaper
here: http://sourceware.org/gdb/talks/esc-west-1999/
Unfortunately, this functionality is not currently implemented for
native debugging, but I believe that CodeSourcery is doing some work
on it.
Check this out, unlike Coverity, Fenris is free and widly used..
How to print the next N executed lines automatically in GDB?