by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 03 2017 15:52
    @dom96 banned @Octopoda7
  • Feb 12 2017 23:57
    @dom96 banned @zzz125
  • Dec 23 2016 19:43
    @dom96 banned @Izrab
Mamy Ratsimbazafy
@mratsim
I’m pretty sure there was a RFC about that in the past 3 weeks (by timothee :?) but so much is happening I don’t remember
From IRC (bridge bot)
@FromIRC
<copygirl> Especially when chaining multiple operators it makes the flow much more readable.
Mamy Ratsimbazafy
@mratsim
otherwise just use parenthesis
From IRC (bridge bot)
@FromIRC
<copygirl> How?
Mamy Ratsimbazafy
@mratsim
foo = (\n … \n )
From IRC (bridge bot)
@FromIRC
<copygirl> Mhh I guess that doesn't work with templates or so.
Mamy Ratsimbazafy
@mratsim
probably this one: nim-lang/Nim#8258
From IRC (bridge bot)
@FromIRC
<TheLemonMan> is there a nicer way to serialize an object to a json string without having to build many intermediate JsonNodes?
Mamy Ratsimbazafy
@mratsim
%*?
or check Araq’s packedJSON
From IRC (bridge bot)
@FromIRC
<TheLemonMan> nice
Mamy Ratsimbazafy
@mratsim
The JsonNode are stack object so it’s much less costly than in the stdlib to create them, though they contain a seq
From IRC (bridge bot)
@FromIRC
<TheLemonMan> oh, it's not os nice because it has its own benchmark harness :⁠P
Mamy Ratsimbazafy
@mratsim
btw @Araq, why use a ref seq instead of a shallow object? https://github.com/Araq/packedjson/blob/master/packedjson.nim#L109
From IRC (bridge bot)
@FromIRC
<Araq> because 'shallow' will be replaced with move semantics?
Bung
@bung87
Error: (k)..(k) not disjoint from (k)..(k) what does it mean? the spawn proc needs take arg k ?
I write a DSL lib trying to do
        parallel:
            for k in 0..ch.high:
                ch[k] = spawn expect plusOne(k) >= 3
Mamy Ratsimbazafy
@mratsim
@Araq, not convinced, changing from shallow to move doesn’t require to change type, while changing from ref seq to move will require to change type and edit all those dereference you are doing in the code.
From IRC (bridge bot)
@FromIRC
<Araq> @mratsim: a move ensures linearity but I have mutiple owners
<Araq> and the derefs are just a "replace in file" operation when it comes to it. it's foolish to write code for what-ifs that never happen or take 3 minutes to resolve
From IRC (bridge bot)
@FromIRC
<FromDiscord> <Shield> is there a built in function to get the next valid value for an enum when they have disjoint values?
<Araq> system.succ
From IRC (bridge bot)
@FromIRC
<FromDiscord> <Shield> it seems that it works like inc, it doesn't jump to the next valid enum
<TheLemonMan> yeah, at runtime there's no knowdlege about your enum holes
From IRC (bridge bot)
@FromIRC
<FromDiscord> <Shield> ah
<Araq> enums with holes are a stupid feature and need to die, for C interop a 'distinct cint' would have been better
<TheLemonMan> 1.0 is not out yet, you're still in time :⁠)
From IRC (bridge bot)
@FromIRC
<FromDiscord> <Shield> how else can you ensure backward compatibility if you load enum values from a file? appending new values at the end of the list doesn't sound that clean
<TheLemonMan> the real question is why do you load the enums from a file?
<Araq> Shield: You can also serialize them as strings
From IRC (bridge bot)
@FromIRC
<FromDiscord> <Shield> I've forgot about that handy feature, thanks
Rubi
@codenoid
good noon all
Alexander Ivanov
@alehander92
good noon
hahah @Araq basically thought of zero-functional in 2015 https://forum.nim-lang.org/t/1333#8368
i hoped at least that was an original idea
but that point is good, I thought last week about a nim linq lib based on his forloop macro comments
and that it can be actually implemented as a "fronted" for zero-functional
or to somehow reuse its internals

basically it will just convert stuff like

for n in values.q
  where test
  select other

to

values.q --> filter(rewritten test) --> map(rewritten other)
Alexander Ivanov
@alehander92
of course that would be the only "runtime values" provider
Kaushal Modi
@kaushalmodi
@xmonader About the 2nd level dispatch, the cligen dev is very responsive. Open an issue on his repo.
From IRC (bridge bot)
@FromIRC
<shashlick> @kaushalmodi: does emacs hang for you in nim mode
<shashlick> I'm trying spacemacs with nim layer and it hangs as soon as I type
<shashlick> Feels like some nimsuggest issues
Kaushal Modi
@kaushalmodi
I'd disable nimsuggest first.
Secondly krux02 has added PR for improving nim-mode performance
From IRC (bridge bot)
@FromIRC
<shashlick> How do you disable it
<shashlick> So no auto complete works for you?
Kaushal Modi
@kaushalmodi
Set the nimsuggest var to nil
Not at my computer right now.