• WWW.PCGAMESN.COM
    The original Splinter Cell just got a big unofficial remaster thanks to modders
    There are a lot of Splinter Cell games, but the first may be the best of them. Though a bit rougher around the edges than sequels like Pandora Tomorrow, and lacking the fantastic soundtrack of Chaos Theory or higher fidelity of Blacklist, the 2002 original has a murky charm that makes its vision of shadowy international special operations stand out from what came after. While we continue to wait for Ubisoft's planned remake to come out, now's as good a time as any to return to the game or play it for the first time with the launch of an impressive new mod that serves as an unofficial remaster. Continue reading The original Splinter Cell just got a big unofficial remaster thanks to moddersMORE FROM PCGAMESN: Best old games, Best stealth games, Best single-player games
    0 Comments 0 Shares 0 Views
  • WWW.PCGAMESN.COM
    Command and Conquer style RTS Tempest Rising gets new maps, better multiplayer
    From the outside, Tempest Rising looks like a straightforward homage to Command and Conquer; the RTS equivalent of a boomer shooter. But Slipgate Ironworks has built a strategy game that goes beyond its influences - veteran fans of Tiberian Dawn and Red Alert can take heart from the Frank Klepacki soundtrack and clear nods to the GDI and Brotherhood of Nod, but Tempest Rising more than shines on its own terms. The campaign is fantastic. The visual style and unit mix are both great. Only the multiplayer has drawn any real criticism, owing to some restrictions on queuing and game modes. But now, theres a new Tempest Rising update which addresses even those concerns. Continue reading Command and Conquer style RTS Tempest Rising gets new maps, better multiplayerMORE FROM PCGAMESN: Tempest Rising announcement, The best RTS games, The best PC strategy games
    0 Comments 0 Shares 0 Views
  • WWW.THEKITCHN.COM
    How to Make the Perfect Beach Sandwich
    We promise it wont fall apart.READ MORE...
    0 Comments 0 Shares 0 Views
  • 0 Comments 0 Shares 0 Views
  • BLOG.JETBRAINS.COM
    What Is an AI Coding Agent?
    AI has quickly become one of the most discussed subjects globally and it now seems to be able to do just about everything for us. Students are asking it to help them with their homework, and lawyers are even using it for case research. AI agents have grown rapidly in popularity due to the widespread usage of large language models (LLMs) like OpenAIs ChatGPT. As a result, developers have also felt pressured to start using AI coding agents.In light of all this, it has become imperative for us to understand how AI coding agents work and how we can come up with workable prompts to get the most out of AI in our software development or data science projects. At JetBrains, we have our own coding agent for JetBrains IDEs we call it Junie. We invest a lot of effort in high performance of Junie explaining the reasoning and logic of the coding agent to make it clearer for all of you.LLMs and AI coding agents whats the connection?Without LLMs, AI agents as we know them would be totally different. As a rough analogy, LLMs are to AI agents what engines are to cars. Without engines, there would be no cars. However, not all machines with engines are cars.The work of an AI agent comprises several different stages:Perceiving the relevant informationAt this stage, the agent processes data in your project, including your code and any supporting files, together with your prompt, and sends that data to the LLM that it is using for processing.Reasoning with the LLMCommunication with the LLM is usually carried out according to a specific protocol. This protocol makes processing easier by specifying a format that the agent has to adhere to when sending information and prompts to the LLM.Putting the plan into actionAfter the LLM has processed the information, it will provide some suggested actions or generate some code. In the next step, the agent will take these instructions for various actions and perform them.Evaluation and feedbackIn the last stage, there are options to perform various tests and checks to evaluate the correctness of the result and make adjustments if needed.AI coding agents arent the only type of AI agent that is driven by LLMs. So what makes them special? How are they tailored specifically to the needs of coders? Lets find out!AI coding agents are designed to perform coding tasks with less user supervision. They can formulate an action plan that can potentially achieve the goal given by the user and execute them. An AI coding agent like Junie can also evaluate code and run tests to catch any errors that might crop up. Here is a simplified workflow of an AI coding agent:Set the scene for the LLMBefore the agent knows what to do, some basic information needs to be provided to the LLM in order to ensure a useful output. For example, we need to tell the model what tools are available and what format we want the action plan to be in. In terms of tools, the action plan might consist of functions that we created and that can be executed to perform a task, such as creating a file or listing a directory.Generate an action planNext, when a users prompt about the task is received, the agent asks the LLM to generate an action plan in the desired format. Optionally, we can also ask the LLM to act out a given thought process, which is the logic according to which this action plan is formulated. Once the action plan is received, it gets parsed into a format that can be followed and executed. In our example, we ask for an action plan in JSON format, and by using Pythons JSON library, we translate that action plan into a Python dictionary.Execute the action planNow that we have information about the action plan, the predefined tool functions can be executed according to the plan. The result of executing each step is noted and used in the evaluation stage.Evaluate the resultFinally, we ask the LLM to evaluate the result. In case of failure, the action plan can be updated (or a follow-up plan generated) to fix the error. Once we have an updated plan (or follow-up plan), we can attempt to execute the plan once again and evaluate the result. Keep in mind that there should be a maximum number of attempts or timeouts for this iteration, otherwise we could get stuck in an infinite loop.Converting your conversation with LLM into coding actionsAs an example of how an AI coding agent works, lets build a simplified version of an AI coding agent that works with Python code.Set up your LLM modelEarlier we reasoned that an AI coding agent without an LLM would be like a car without an engine. For this reason, its crucial that we start by securing access to an LLM model. While you can choose to use proprietary services from companies like OpenAI and Anthropic, for demonstration purposes, well use an open-source model.In this example, well use the DeepSeek-R1 model llamafile here on Hugging Face. Follow the instructions here to get the llamafile for the model.Why llamafile? What is it?llamafile is a single-file executable that runs locally on most computers, with no installation required.If youre using macOS, Linux, or BSD, make sure you grant permission for your computer to execute this new file.chmod +x DeepSeek-R1-Distill-Qwen-7B-Q6_K.llamafileNow we can launch the model as a local server by running the llamafile. Make sure you pass in the flag `-ngl 999` to offload to your available GPUs../DeepSeek-R1-Distill-Qwen-7B-Q6_K.llamafile -ngl 999Voil! The model is now available on your local server.2. Testing the LLM model server with Python codeThe llamafile server is also compatible with `openai` APIs. We can provide a prompt and get a result by using a Python script. For example:#!/usr/bin/env python3from openai import OpenAIclient = OpenAI(base_url="http://127.0.0.1:8080/v1", # "http://<Your api-server IP>:port"api_key = "sk-no-key-required")completion = client.chat.completions.create(model="DeepSeek-R1-Distill-Qwen-7B-Q6_K",messages=[{"role": "assistant", "content": "You are an AI coding agent. Your top priority is perform coding task requested by the user."},{"role": "user", "content": "create a Python function that returns the square of a number."},])content = completion.choices[0].message.contentprint(content)When you run this script, heres what you might get back from the LLM:<think>Okay, so the user asked me to create a Python function that returns the square of a number. Hmm, I need to figure out how to approach this. Let me start by recalling what a function in Python looks like. I remember that functions are defined using the def keyword, followed by the function name and parentheses for parameters.Alright, the function needs to take a number as input. Lets name it num for clarity. So the function definition would be something like def square(num):. Now, inside the function, I need to calculate the square of this number. Squaring a number means multiplying it by itself, so that would be num * num.Wait, is there another way to square a number in Python? Oh right, theres the exponentiation operator **, so I could also write num ** 2. Either way works, but using multiplication is straightforward and easy to understand for someone new.Next, I need to make sure the function returns this squared value. So after calculating, Ill use the return statement. Putting it all together, the function should look like:def square(num):return num * numI should test this function to ensure it works correctly. Let me try a few examples. If I pass 3, it should return 9. 3 squared is indeed 9, so thats good. What about a negative number, like -4? Squaring it should give 16, which the function should handle correctly since multiplying two negatives gives a positive.Also, zero is a good test case. 0 squared is 0, so the function should return 0 in that case. I think these test cases cover the basic scenarios and confirm that the function is working as intended.Are there any edge cases I should consider? Maybe very large numbers, but since Python handles big integers well, that shouldnt be a problem. What about non-integer inputs? The function will still work because multiplying floats is valid, but the user might expect an integer if they pass one. However, the function doesnt enforce input type, so its up to the user to handle that as needed.Overall, the function seems simple enough and should meet the users requirements. I think this is a solid solution.</think>To create a Python function that returns the square of a number, you can follow these steps:1. **Define the function**: Use the `def` keyword to create a function named `square` that takes one parameter, `num`.2. **Calculate the square**: Inside the function, multiply `num` by itself (`num * num`) to get the square.3. **Return the result**: Use the `return` statement to return the calculated square.Heres the code:`pythondef square(num):return num * num`**Example usage**:`pythonprint(square(3)) # Output: 9print(square(-4)) # Output: 16print(square(0)) # Output: 0`This function takes a number as input and returns its square..<endofsentence>Wow, thats a lot. And the thought process of the LLM is also there (the text within `<think>` and `</think>`). We need to be aware of that when handling the response from the LLM. We should also make sure the LLM responds with an action plan. Later on, well see how we can prompt the LLM to do this.If your curiosity has been piqued and you want to try out a coding agent, I recommend installing Junie. It is compatible with IntelliJ IDEA, PyCharm, WebStorm, GoLand, PhpStorm, RubyMine and RustRover. To learn more about Junie, head over to its official webpage: https://www.jetbrains.com/junie/.
    0 Comments 0 Shares 2 Views
  • Ktor 3.2.0 Is Now Available
    Ktor 3.2.0 is here! This is the second minor release of the year, bringing exciting new features, performance improvements, and bug fixes. This release includes two new modules for dependency injection and HTMX, support for Gradle version catalogs, automatic configuration deserialization, Unix domain socket support for CIO, and much more. Check out the full changelog here. Get started with Ktor 3.2.0Ready to explore Ktor 3.2.0? Start building your next project today with our interactive project generator at start.ktor.io. Your feedback and contributions are always welcome! Join the Community on Reddit and Slack Get Started With Ktor Typed configurationKtor now automatically deserializes configuration files into data classes, in addition to primitive types. Lets create a simple application.yaml that defines some database configuration.database: jdbcUrl: "$DB_JDBC_URL:jdbc:postgresql://localhost/ktor_database" username: "$DB_USERNAME:ktor_user" password: "$DB_PASSWORD:ktor_password"Note: In Ktor, YAML can reference environment variables with $ENV_VAR or $ENV_VAR:default_value syntax, and even ${ENV_VAR} like in HOCON.In order to deserialize structure data, we need to define it first so we define a data class that matches our application.yaml. Once weve defined it, we can use it to load our configuration in a typed manner in our modules.@Serializabledata class DatabaseConfig( val jdbcUrl: String, val username: String, val password: String,)fun Application.module() { property<DatabaseConfig>("database") }Dependency injectionThe 3.2.0 release features a brand new module! Dependency injection (DI) is a crucial feature for many teams, and it was highly requested by the community. This module is completely optional, but when enabled, it allows Ktor to offer additional functionality out of the box for DI users. Ktor DI is built on top of coroutines, just like Ktor itself, which is really powerful since it easily allows for the concurrent initialization of your application.It automatically closes AutoCloseable instances or allows to configure your own cleanup handlers. When the server receives a stop command, the HikariDataSource will close automatically, and then the custom cleanup handler for Database will be executed.fun Application.database(@Property("database") config: DatabaseConfig) { dependencies { provide("optional-name") { HikariDataSource(...) } provide { Database.connect(resolve<HikariDataSource>("optional-name")) } cleanup { database: Database -> TransactionManager.closeAndUnregister(database) } }}Ktor DI also allows for easy integration with existing DI frameworks, and Koin 4.1 has an experimental module that already integrates with Ktor 3.2.0-EAP, offering seamless interoperability between Ktor DI and Koin. More details can be found on the Koin website.Suspend modulesAlong with these new features, Ktor now also supports suspend, or asynchronous, modules. These make it possible to await dependencies that require suspension for their initialization. They also make it easy to parallelize large, complex dependency graphs.suspend fun Application.module() { val database: Database = dependencies.resolve() ...}Unix domain socket support for CIOThe CIO client and server engine now support Unix domain sockets! This support provides more efficient bidirectional communication between processes on the same system, allowing them to eliminate the networking overhead completely.To use Unix domain sockets, you need to explicitly configure your embeddedServer to use a unixConnector by specifying the path to the socket.val server = embeddedServer(CIO, configure = { unixConnector("/tmp/test-unix-socket-client.sock")}) { routing { get("/") { call.respondText("Hello, Unix socket world!") } }}To communicate with the Ktor server listening to Unix domain sockets, you also need to connect to the same Unix domain socket file.val response = HttpClient(CIO) { defaultRequest { unixSocket("/tmp/test-unix-socket-client.sock") }}.get("/")HTMXThe new HTMX module includes tight integration with kotlinx.html and the Ktor Routing DSL. This allows you to more easily define HTML attributes for HTMX and define routes thatautomatically include HTMX headers.fun Application.routing() { hx.get("/status") { /* Return HTML content */ } get("/status") { call.respondHtml { head { script { src = "https://unpkg.com/htmx.org@1.9.12" } } body { div { attributes.hx { get = "/status" trigger = "load" } } } } }}Ktor version catalogVersion catalogs have quickly become the standard for managing dependencies and their versions in Gradle. They allow us to reference dependencies in a type-safe way from our Gradle scripts and manage dependencies in a single location. Ktor now exports a version catalog, just as it does a Maven BOM. To use Ktors version catalog, you need to import it into your settings.gradle.kts:dependencyResolutionManagement { versionCatalogs { create("ktorLibs") { from("io.ktor:ktor-version-catalog:3.2.0") } }}Once imported, you can reference all Ktor modules in a type-safe way from all your build.gradle.kts configurations.dependencies { implementation(ktorLibs.server.netty) implementation(ktorLibs.server.contentNegotiation) implementation(ktorLibss.serialization.kotlinx.json)}Android R8 regressionThere is a known regression in the Ktor 3.2.0 release regarding Android R8. For more information about the issue, you can check out this issue on YouTrack. It will be fixed in the 3.2.1 release, and were also working to improve our pipelines and test suites to prevent regression in this area in the future. Thank you!We want to say thank you to everyone for your contributions and feedback!A special shout-out to reonaore, markozajc, rururux, OmniacDev, and StefMa for their first contributions to Ktor, as well as to MarcusDunn and Philip Wedemann for their active contributions.Start building your next project at start.ktor.io. Your feedback and contributions are always welcome! Get Started With Ktor | Join the Community on Reddit and Slack
    0 Comments 0 Shares 2 Views
  • YUBNUB.NEWS
    Iran Threatens Energy Market Meltdown as it Reviews Closure of Strait of Hormuz
    This post, authored by Dr Tilak K. Doshi, was republished with permission from The Daily Sceptic. With Iran and Israel in full-on war, the worlds energy nerves are fraying. Central to this anxiety
    0 Comments 0 Shares 0 Views
  • YUBNUB.NEWS
    Victor Davis Hanson Makes a Disturbing Prediction About What Happens If Iran Survives
    This post was republished with permission from VigilantFox.com. Amidst rough seas, you need a steady sailor. Historian and classicist Victor Davis Hanson just delivered a masterful breakdown of the Iran
    0 Comments 0 Shares 0 Views
  • YUBNUB.NEWS
    Regulators kill dangerous gain-of-function research schemes
    Sen. Rand PaulGain-of-function research is a dangerous game where scientists deliberately make viruses, or something else, more dangerous so that measures to counter it can be researched. Many believe
    0 Comments 0 Shares 0 Views
  • YUBNUB.NEWS
    Feds nab suspect who allegedly bought mortars to kill cops at L.A. riots
    The Department of Justice (DOJ) announced charges on Wednesday against a man who allegedly plotted to bring explosives to anti-deportation riots in Los Angeles in order to kill police officers. Texas
    0 Comments 0 Shares 0 Views