Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 04 12:26
    @dom96 banned @acroobat
  • Mar 03 2017 15:52
    @dom96 banned @Octopoda7
  • Feb 12 2017 23:57
    @dom96 banned @zzz125
  • Dec 23 2016 19:43
    @dom96 banned @Izrab
From IRC (bridge bot)
@FromIRC
<FromDiscord> <ajusa> I found https://github.com/arnetheduck/nbindgen, thought I had seen it before. Guess I'll try it, unless someone has a better way of doing this
<FromDiscord> <sealmove> why don't we have a split() proc that takes a string as separator?
<reversem3> I'm looking at this doc https://nim-lang.org/docs/xmltree.html#kind%2CXmlNode how do you actually extract instead of having to add elements
<FromDiscord> <sealmove> In reply to @รєคɭ๓๏שє "why don't we have": oh we do
<FromDiscord> <haxscramper> In reply to @reversem3 "I'm looking at this": node.tag() https://nim-lang.org/docs/xmltree.html#tag%2CXmlNode
<FromDiscord> <haxscramper> !eval import std/[xmlparser, xmltree]; echo parseXml("<a>b</a>").tag()
<NimBot> a
<FromDiscord> <haxscramper> Or loadXml for file in your case
From IRC (bridge bot)
@FromIRC
<FromDiscord> <haxscramper> In reply to @ajusa "are there any examples": I'm not aware of any other approach for interfacing nim and rust rather than via C interop (and I suppose this is the only way it could work). You should try nbindgen as it would probably automate a lot of boilerplate actions that might be the cause for "whole bunch of errors"
<FromDiscord> <haxscramper> I.e. most likely this is all caused by some misconfiguration where some "very important rust header" is missing when importing to nim
<FromDiscord> <haxscramper> Or vice-versa
From IRC (bridge bot)
@FromIRC
<FromDiscord> <exelotl> In reply to @Clyybber "<@!90614688374624256> I don't think": yooo the helper module actually worked :⁠D
<FromDiscord> <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=2WEM
<FromDiscord> <exelotl> I emit the vtables in the same module where they're declared, but I {.importc.} the pointer to the vtable which is emitted in a helper module that gets imported last of all once the names of all the vtables are known
<FromDiscord> <haxscramper> In reply to @ajusa "Alright, yeah I just": You have to statically list with some rust runtime library in order to resolve this reference
<FromDiscord> <haxscramper> E.g. -passl:-lsomerustlib I think.
<FromDiscord> <ajusa> libdl.so and libpthread.so.? I'll try that, found those being referenced in a post online
From IRC (bridge bot)
@FromIRC
<FromDiscord> <ajusa> hey that worked! Thanks!
From IRC (bridge bot)
@FromIRC
<FromDiscord> <zidsal> is there any good example code of what an == should look like for a type that extends ref object. Would you only expect 2 ref objects to equal if they pointed to the same address in memory?
<FromDiscord> <konsumlamm> no, though that's the default behaviour now on devel
<FromDiscord> <konsumlamm> or already? idk
<FromDiscord> <konsumlamm> i mean, it really depends on your type, there is no general answer
<FromDiscord> <exelotl> In reply to @exelotl "I emit the vtables": ideally I'd emit the vtable itself in the helper module, but idk if it's possible to declare an extern function with an unknown signature in C 😅
<reversem3> To find children in xml node it says proc child(n: XmlNode; name: string): XmlNode , why do I need a name " xml.child()
<reversem3> * To find children in xml node it says proc child(n: XmlNode; name: string): XmlNode , why do I need a name " would it be just xmlFile.child() ?
From IRC (bridge bot)
@FromIRC
<FromDiscord> <haxscramper> Yes. The procedure has a documentation example that illustrates how to use it
<FromDiscord> <willyboar> gitter bridge down?
Willyboar
@Willyboar
??
From IRC (bridge bot)
@FromIRC
<FromDiscord> <willyboar> only on #offtopic
Devon Codewski
@codewski
Hello. I am planning to build a static site generator with Nim. What features do you want to see in such a project?
From IRC (bridge bot)
@FromIRC
<FromDiscord> <jtiai> In reply to @codewski "Hello. I am planning": Definition of static site generator is rather vague. Are you targetting some spesific area?
Devon Codewski
@codewski
Yes sorry for that. I am planning for a general-purpose static site/blog generator
From IRC (bridge bot)
@FromIRC
<FromDiscord> <haxscramper> It would be nice if it can be used as a library - i.e. API for manipulation of the intermediate representation
<FromDiscord> <haxscramper> That way it could be adapted to any input source without having to go through some templating format first
<FromDiscord> <jtiai> Probably providing some default templating could be useful.
Devon Codewski
@codewski
I am planned to use moustache and maybe scf for beginning
@haxscramper I think I prefer an app rather than a lib
From IRC (bridge bot)
@FromIRC
<FromDiscord> <haxscramper> I'm talking about keeping IR clean and accessible to external users, not about implementing it as a library instead of an application. But considering you want to use moustache/scf we are probably thinking about different implementation routes so
Devon Codewski
@codewski
I want something like Hugo. In the simplest form of course :)
From IRC (bridge bot)
@FromIRC
<Prestige> hugo is cool
<FromDiscord> <clyybber> In reply to @exelotl "yooo the helper module": nice to hear!
<FromDiscord> <clyybber> We could map {.nodecl, importc.} with an export to that behaviour maybe
<FromDiscord> <clyybber> so that it would get replicated automatically for each module that imports it
From IRC (bridge bot)
@FromIRC
<federico3> @codewski: I prefer Pelican
Devon Codewski
@codewski
federico3 what feature of pelican you like most?
From IRC (bridge bot)
@FromIRC
<federico3> clean design, less dependencies than others, easy to debug
Devon Codewski
@codewski
sounds fair. The only disadvantage is that does not support direct netlify deployments
but I suppose is easy to implement
From IRC (bridge bot)
@FromIRC
<FromDiscord> <exelotl> In reply to @Clyybber "We could map {.nodecl,": It would be nice but I think there are other use cases for var foo {.nodecl, importc.} though... For example↵var dispcnt {.nodecl, importc:"(volatile NU16)0x04000000".}: uint16
From IRC (bridge bot)
@FromIRC
<FromDiscord> <zidsal> so it turns out you can configure vsc to hide files and folders, no more do I need to look at all the files testament generates!