Hi,
Python has a weekly email list (www.pythonweekly.com). Do you think that Nim should have something similar? I really don't want to take away time from the developers, but maybe this could attract more attention. So here is my proposal. If you would like me to do this, then on each Thursday I'll do some search on google for new content within a week, check the last week's forum topics, pick some example code, maybe check the github repositories, then send an email preview to any of the developers for checking/extending the content. Then the final email could be sent out evey Friday. Would you like that?
Please find below an example email.
Projects:
Forum:
Core development:
Example code for this week:
An OpenGL example code, it will show a cube in 3d:
nimble install sdl2
nimble install opengl
wget "https://raw.githubusercontent.com/nim-lang/sdl2/master/examples/sdl_opengl_example.nim"
sudo pacman -S sdl2 # for arch
sudo apt-get install libsdl2-dev # for debian, maybe the dev is an overkill
nim c -r sdl_opengl_example.nim
Now let's debug the code, there is a function at line 24 with a newWidth parameter, let's print that:
nim c --debugger:native sdl_opengl_example
gdb ./sdl_opengl_example
break sdl_opengl_example.nim:25 # setup a breakpoint
run # starts the program
bt # prints the call stack
print newwidth # prints 640
c # to continue
Agree with what Andrea said.. I also like D's "This week in D" - http://arsdnet.net/this-week-in-d/aug-09.html.
Setting up one should not be difficult using github's jekyll pages. I can help with questions if you have on how set one up...
I'm happy to help in the content. However, please help with the format. The blog like page is visible later, easy to fix bugs, but I personally like emails (I can see it on my phone/watch, read it immediately). Maybe we could have both (e.g., an email with the link).
Please also help to find a format (for example a PR), such that anything I'm collecting/writing is checked by someone. I definitely don't want to offend anybody or push my view.
Great stuff!
Some remarks:
I'm ok with "Nim News", and I'm eager to collect cool stuffs every week. But I need help with the format (i.e., where to put). Shall I put it on a github page for start?
Thanks again, Peter
This week's content.
Projects:
Forum:
Example code for this week:
nimble install emerald
Then the following code prints some html code:
import emerald
proc templ(numItems: int) {.html_templ.} =
html(lang="en"):
const myTitle = "Title"
head:
title: myTitle
body:
if numItems > 0:
ul:
var content = "x"
for i in 1 .. numItems:
li: content
content = content & "x"
var
ss = newStringStream()
myTempl = newTempl()
myTempl.numItems = 3
myTempl.render(ss)
ss.flush()
echo ss.data
This week's content:
Projects:
Forum:
Core development:
Untyped pointers codegen changed. addr expression fixed, Fixed reversed to work for empty seq's, extending metatype matching in sigmatch.nim, fixed UTF-16 to UTF-8 conversion in widestrs.nim, unittest improvements, Improve performance of readLine by using fgets, tuple unpacking works in a non-var/let context, math.nim works with NimScript, When reading files check if the eof flag is set before throwing, Don't access GCed field in finalizer, implemented nimPinToCpu threadpool feature, Coroutines,
Example code for this week:
nimble install jester
Then the following code shows the current time at http://127.0.0.1:5000/ :
import jester, asyncdispatch, htmlgen, times
routes:
get "/":
let reload = "<meta http-equiv='refresh' content='1'/>"
resp reload & h1("Hello world") & h2($getTime())
runForever()
Yeah, I'd say you should go for something like Jekyll, Ghost, or medium. I don't have time to maintain Ipsum Genera. I am planning on refactoring it a bit anyway to make themes easier to make. But when that will happen I do not know.
In regards to the my blogs design... That's also on my todo list to change :)
@mora thank you for taking the time to write this but I think it would go a long way if you did create a blog specifically for it, and just posted the links to it here and to HN/Reddit.
Any news? It should be a matter of minutes to publish this on Github using Jekyll with Github pages. One just has to register a suitable user (nim-weekly?) and write the existing posts in Markdown.
If mora is ok with this, I can do this. The only thing would be sharing the actual credentials
@andrea: Please do it. Thank you.
I've quickly checked medium (even created an account). However, github comes with many nice features (pull requests, write access for multiple users, etc.), let's use that.
Sorry for the delay, I was busy, this week's content is still under construction.
Thanks, Peter
I have a sort of a preview here. The repository is here and I am adding you (petermora) as a collaborator. I have taken a simple, free theme and customized just a few variables. There is still something to sort out, but at least it is a skeleton.
To work with it locally, you will probably need ruby, gem and bundler, as well as nodejs. Then from the repository folder you can run bundle install to get the dependencies and bundle exec jekyll serve. In local development, put http://localhost:4000 as your site URL inside _config.yml. Instructions to customize the theme are here.
A few things that need customization are: title, authors, tagline, images. But I think you can just add content inside the _posts directory and I - together with anyone who wants to collaborate - can improve the status in the next few days
It should be easy to do simple modifications blind and test them directly on the site, especially now that it is not widespread yet