Re: Blog tools - Nim
Also consider this: [https://github.com/divy-work/bloom-nim](https://github.com/divy-work/bloom-nim)
A Nim blogging engine :)
Bloom is a pretty small blogging engine I made in Nim. It is a great project to study after reading @dom96 's Nim in Action book. [Github repo]([https://github.com/divy-work/bloom-nim.git](https://github.com/divy-work/bloom-nim.git)) PR's and Issues are welcomed :) Happy Coding
Re: nimkernel capabilities
Oh wow! I should have searched more I guess. Thanks
Re: How to get immidiate disk-usage
Dude...you just copy pasted the whole question from [https://forum.nim-lang.org/t/5861](https://forum.nim-lang.org/t/5861) Can moderators delete a thread? Then plz
Re: nimkernel capabilities
Alright, thanks. But is it recommended to use nim for stuff like that? (since I haven't seen any other kernel on internet...most of them use C or Rust)
nimkernel capabilities
So I'm new to Nim and OS development. The nimkernel seems exciting... [https://github.com/dom96/nimkernel](https://github.com/dom96/nimkernel) Though I would like to know... 1. how can I handle keyboard input? 2. how to do some networking with it?
Re: Doubt! Proc and import
Yup. But I guess I want to use the compiler api instead... I'll use it to compile the file provided prior creating a server. Then, I'll store the exported proc in a global variable. And use it. Will that work?
Re: Doubt! Proc and import
Here's the code: import asynchttpserver, asyncdispatch var givenByUser = "test.nim" var server = newAsyncHttpServer() proc cb(req: Request) {.async.} = # import user.nim # use it's main proc await req.respond(Http200, procInFile()) waitFor server.serve(Port(8080), cb) Run The code that user might provide: proc procInFile*():string = return "hello" Run
Re: Gedit syntax highlighting.
Oh well, that "shouldn't" be hard? lol
Re: Doubt! Proc and import
Oh ok! Is it fast enough? I'll be using it for a REST api
Re: Doubt! Proc and import
@kidandcat, I discovered the nim compiler api which seems perfect for my use. [https://forum.nim-lang.org/t/5994](https://forum.nim-lang.org/t/5994) Also, the example you provided just calls out the nim compiler without returning any exported proc inside it. (Because it's runtime) Is there any particular reason why I shouldn't use the nim compiler API? Any cons?
Gedit syntax highlighting.
Ubuntu's inbuilt text editor Gedit is quite good for quick coding. I use the Python 3 highlighting for Nim but it would be good if we have one for Nim too. Or, is it already there?
Re: Is this possible?
Ooh! That seems perfect...I'll test that out. Thanks.
Re: Is this possible?
Alrightyy! Thanks all for the answer.
Re: Is this possible?
@yglukhov, I am keen to understand the embedding of nim compiler. Could you give a example for the same?
Re: Is this possible?
Thanks that helped me understand it better :) What do you have to say about @juancarlospaco 's answer?
Re: Doubt! Proc and import
That isn't what I wanted @kidandcat. To better explain my question: proc importNewModule(module: string) = import module # this is just for illustration, it won't work I know. How do I do that? something() Run And the module is something like this... proc something() = echo Hi Run All I need to know is how do I import the module and use it in runtime.
Doubt! Proc and import
So here is my code: proc runNimProcFromAnotherFile(filename: string) = #[ I need to import the filename and use the proc defined inside it...]# Run How do I import the file and return the proc inside it? Thanks.
Re: Is this possible?
Alright thanks anyway for the answer :) That atleast got me halfway...
Re: Is this possible?
How can I return the value that is returned in a proc inside the timeit_temp.nim?
Re: Is this possible?
Thanks! I'll try that
Is this possible?
var module = "jester" import module Run If not, how do I implement something like this?
Re: A 'made with Nim' website?!
@JohnAD Consider adding a submission form for developers to submit their games. You could manually verify the submissions and add them. Or Open a GitHub repo with the list of games and encourage devs to add their in a yml file or something.
Re: Interlanguage communication
I figured out the same too. But is there any other–a more straightforward way to do this? Thanks
Re: Nim's float issue?
The answer is really good but please respect that everyone here is learning and some might not be from a CS background! I'm 15 and certainly not yet graduated yet I code and love Nim. I guess it would be really nice if we leave arrogance and so called "CS degrees" aside and talk Nim :)
Re: Interlanguage communication
It basically executes the command node script.js It isn't complete yet. I just wanted to know the basic idea behind communication between languages
Re: Weird Behaviour
Make sure you are not having any extra whitespace at the end of lines. If not, then check for indentations and replace them with spaces. If done correctly, your program should work fine.
Interlanguage communication
I have a Node.js program and a nim program. When a nim procedure is called, it triggers the js script with input as argument. How do I get back the output to nim?
Re: func/proc blocks
But we do have, import module1, module2 Run
Re: A 'made with Nim' website?!
Thank you :) I'll start work on it pretty much soon. Will share the link too... Btw, Nice website @JohnAD
Why doesn't jester compile to js?
I tried my jester server to compile to javascript and it won't work. I probably know the reason but can there be a feature wherein it can compile to run for Node.js with Express? I might be talking wrong, please correct me. Thanks. PS:
Re: I have a super doubt
The book 'Nim in Action' has helped me a lot in learning Nim! :) Definitely recommended!!
A 'made with Nim' website?!
Hi, I'm really interested in making a website showcasing projects made with Nim. What do you all say?