varargs[untyped] in template

2024-07-24 Thread SolitudeSF
or you could just use a macro and not this abomination

simpleargs - Dead simple CLI parsing.

2024-07-02 Thread SolitudeSF
cligen still the king

X11 - XQueryTree produces "illegal storage acess" segfault when run

2024-06-25 Thread SolitudeSF
as araq pointed out, you dont declare pointers and pass them, you allocate objects and pass pointers to them, in this case for every returned value. this is not a nim related issue, you can see this if you look at any C code that uses this. import x11/xlib, x11/x

Error: cannot open file: x11

2024-06-24 Thread SolitudeSF
there is no module named `x11`, you can look at the examples to see how to correctly import it.

Conversion-to-string-function is hard to find

2024-05-15 Thread SolitudeSF
there is no string as a function, `string(path)` is a simple type conversion, because Path is just a `distinct string`. it doesnt perform any data modification, just changes the type.

Fake Nim books an Amazon, which ones are real?

2024-05-15 Thread SolitudeSF
A new gigaeffective fraud method is invented, im literally shaking from excitement.

Single parameter version of varargs

2024-05-09 Thread SolitudeSF
just make it generic? proc toIntSeq[T](a: T): seq[int] = let a = a.toRange Run

cannot evaluate at compile time

2024-05-06 Thread SolitudeSF
index has to be known at compile-time. nim is statically typed, you cant have a value have different type based on runtime condition.

How do I emulate ruby's super() for a subclass object's constructor.

2024-05-03 Thread SolitudeSF
`type Parent = ref object of RootObj parentField: int Child = ref object of Parent childField: string # Using generics proc newParent(T = typedesc[Parent], value = 123): T = new result result.parentField = value proc newChild(value: string): Child = result = newParent(Child, 321) result.childFie

Destructors for "ref object" types?

2024-03-17 Thread SolitudeSF
if you dont care about looks proc `=destroy`(x: typeof ARef()[]) = Run

An Ode to my Goddess Nim.

2023-12-06 Thread SolitudeSF
mods, find his home address

Advent of Nim 2023

2023-12-06 Thread SolitudeSF
its not reasonable to expect the debug version to have representative performance.

Is Nim Dead?

2023-11-25 Thread SolitudeSF
wish it was

Can someone tell me how to read the AST associated with a varaible?

2023-11-22 Thread SolitudeSF
macro getBody(a: typed): untyped = echo a.getImpl.repr Run

What's stopping Nim from going mainstream? (And how to fix it?)

2023-11-20 Thread SolitudeSF
you're just proving my point

What's stopping Nim from going mainstream? (And how to fix it?)

2023-11-20 Thread SolitudeSF
thats just coping

Nim Community Survey 2023

2023-11-19 Thread SolitudeSF
no examples then? or do you think that everything that gets complained about on forum should be changed?

Nim Community Survey 2023

2023-11-18 Thread SolitudeSF
for example?

proc/func/method: syntax

2023-11-15 Thread SolitudeSF
this is got to be trolling. there is no way you dont understand that this barely perceptable syntactic change justifies rewriting every nim proc ever written.

Move ref variable ro thread

2023-11-14 Thread SolitudeSF
PersonRef()[].typeof

NIR

2023-11-02 Thread SolitudeSF
View types, view types, view types.

Effects of calls to Garbage Collector when using ARC/ORC?

2023-10-10 Thread SolitudeSF
for example it only supports opengl, and on linux only x11 is supported. and figuro is also "still in development and is not ready to be used.".

Effects of calls to Garbage Collector when using ARC/ORC?

2023-10-10 Thread SolitudeSF
> use windy instead of sdl2 thats not very partical, unless you're doing it as a "pure nim" challenge.

Which tools do you use to code in Nim?

2023-09-22 Thread SolitudeSF
kakoune, kaklsp + nimlsp, kak-tree-sitter +

The secret of Nim

2023-09-19 Thread SolitudeSF
thats how it feels to write nim

Nimble newbie issue

2023-09-10 Thread SolitudeSF
i had similiar problem when switching from 0.13 to 0.14 nimble. i ended up just doing what @janAkali proposes. it is not your misconfiguration, the support for both pkgs directories is just too hacky. deleting pkgs and reinstalling packages would be the best course of action.

Nimble newbie issue

2023-09-10 Thread SolitudeSF
in your snippet above you're not importing db_connector/db_sqlite

Nimble newbie issue

2023-09-10 Thread SolitudeSF
import db_connector/db_sqlite

how to properly json serialzie/deserialize DateTime?

2023-09-05 Thread SolitudeSF
`jnn.to(DateTime)` -> `jnn.jsonTo(DateTime)`. also, use `jsony` instead.

where is the difference between these two types of commenting in nim ?

2023-09-02 Thread SolitudeSF
`##[]##` is a doc comment

A few (perhaps naive) questions

2023-08-31 Thread SolitudeSF
Damn, i guess rust/go are done and finished because they dont allow you to do that either.

Nim Side-Effects

2023-08-17 Thread SolitudeSF
feel free to add `{.gigafunc.}` pragma that rejects `var` parameters.

Nim version 2.0.0 is here

2023-08-10 Thread SolitudeSF
> Primeagen just as i blocked all of this guys channels, to stop youtube from recommending me his low effort garbage, he finds his way on the forum, fascinating.

Type class that is "anything but X"

2023-08-10 Thread SolitudeSF
type NotXYZ = not X and not Y and not Z

Some of Nim's convention needs to change in order for it to succeed

2023-07-23 Thread SolitudeSF
would it be a huge success if it didnt have access to java's entire ecosystem?

Some of Nim's convention needs to change in order for it to succeed

2023-07-23 Thread SolitudeSF
switch your last point to style insensitivity and you have a hackernews worthy circlejerk.

Table lookup problem

2023-07-11 Thread SolitudeSF
works on devel

Nim Sucession Plan

2023-06-30 Thread SolitudeSF
its a crazy concept, but there are more than 1 group of people in this world

Why is a Nim enthusiast/programmer called a "Nimmer"?

2023-06-28 Thread SolitudeSF
called by who? show me these people.

Undeclared field - Unrecognized proc

2023-06-28 Thread SolitudeSF
> it seems the proc hookCallback is not Unrecognized once I decalre it inside > my Keylogger object. type Keylogger = ref object C2URL: string shell_id: string Run but you dont?

Wishlist: Ideal UI library for Nim

2023-06-26 Thread SolitudeSF
> Ever used a console based music and video player? I haven't and have no > desire to try one. amazing logic.

How doeas NIM differ from Mojo programming language?

2023-06-13 Thread SolitudeSF
nim devs dont have a fire emoji fetish, so that seems like a win.

Can Nim be considered an independent language?

2023-06-10 Thread SolitudeSF
what does that even mean?

DLL Terms

2023-06-06 Thread SolitudeSF
araq try not to deflect criticism by throwing pointless jabs at unix challenge (impossible)

Are any of you as excited about the Zed editer

2023-05-11 Thread SolitudeSF
> First and foremost, the Zed Editor brings a refreshing and intuitive user > interface that makes coding a joyous experience. With its sleek and > minimalistic design, the focus is squarely on your code, without any > unnecessary distractions. It's like a breath of fresh air, allowing you to >

How can I return a tuple of arrays from a proc. Having difficulty with proc signature

2023-05-03 Thread SolitudeSF
what is there to guess?

How to decouple code?

2023-03-12 Thread SolitudeSF
`experimantal: strictFuncs` supposed to prevent that, but it doesnt detect mutation through a call.

Wanted libraries wishlist?

2023-02-11 Thread SolitudeSF
https://github.com/nim-lang/needed-libraries/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc

command line parametr with whitespace

2023-02-04 Thread SolitudeSF
wonder, what is the point of having in stdlib stuff that is completely broken.

Official Fediverse (e.g. Mastodon) account?

2023-01-08 Thread SolitudeSF
cringiest shit i've ever heard from you

A seasoned programmer's take on Nim's docs

2023-01-03 Thread SolitudeSF
will you finally say/suggest/do anything concrete? your posts borderline on ai generated filler.

A seasoned programmer's take on Nim's docs

2023-01-02 Thread SolitudeSF
doc complainers dont understand that until someone who wants to "improve" them comes and actually does the thing the docs will stay as they are. certainly you wouldnt expect araq to improve the docs for new users. you need someone who understands what the hell new users want in every concrete si

Splat operator implementation with macros

2022-12-29 Thread SolitudeSF
nsfw macro activity

Strange error: single character string constants

2022-12-27 Thread SolitudeSF
`@[]` doesnt have definite type and there are too many indirection for compiler to infer it.

Advent of Nim 2022

2022-12-04 Thread SolitudeSF
> but nobody writes their api to accept openArray[char] damn shame

Choosing Nim out of a crowded market for systems programming languages

2022-11-26 Thread SolitudeSF
> Have error messages/traces readability improved, or do you still need to look > at the generated C code, and mentally map it back to the original Nim code, > to understand what the compiler is trying to tell you? they improved, but you're overdramatising.

Sugar.Collect macro inside a Sequence causing error

2022-08-17 Thread SolitudeSF
`toTable` makes `Table`, but `newOrderedTable` makes `OrderedTableRef`.

Mastering Nim: A complete guide to the programming language

2022-06-23 Thread SolitudeSF
> Is there an e-book version planned ? > No, for three reasons: > I hope to sell more copies this way. that sounds like the opposite you're trying to do

'import os' not used. Wrong Error Message

2022-06-08 Thread SolitudeSF
its not really used. if you remove the os import, you still have a valid program. you are just checking if symbol is available, you are not requiring it. mark import as `{.used.}`.

Is there any typescript-like library for a Nim programming language?

2022-06-04 Thread SolitudeSF
maybe

"nimble init" creates Unittest-Example-Files that do not work

2022-06-02 Thread SolitudeSF
> it is clearly proclaimed better to use "testament" its not. dont trust what you read, even in official docs.

Nim conspicuously contradicts its efficient, simplicity philosophy

2022-06-02 Thread SolitudeSF
use another language

Adding Nim to System default base

2022-05-29 Thread SolitudeSF
just look what nim pkgbuild from arch does. or any other distro. just moving binaries isn't really enough.

Small improvement discussion: Use `let` to lock variable previously declared as `var`

2022-05-29 Thread SolitudeSF
no, it doesnt, its only broken as procedure parameter, everywhere else you can "redeclare" it.

How is default argument before code line one?

2022-05-29 Thread SolitudeSF
what? also, your particular case can be fixed by making explicit overload without `foo` parameter. template h( foo: string, bar : untyped ) = echo foo bar template h(bar: untyped) = h "", bar Run

Small improvement discussion: Use `let` to lock variable previously declared as `var`

2022-05-28 Thread SolitudeSF
question of how ugly you're willing to go import macros macro letInit(name: untyped{ident}, init: typed, body: untyped): untyped = let initType = init.getType decl = if initType.kind == nnkBracketExpr and initType[0].strVal == "typeDesc":

Small improvement discussion: Use `let` to lock variable previously declared as `var`

2022-05-27 Thread SolitudeSF
this can be solved with a simple template.

Small improvement discussion: Use `let` to lock variable previously declared as `var`

2022-05-27 Thread SolitudeSF
the block solution looks much better, you can clearly see the scope where data is mutated. or just move that to a separate function.

Identifier names space in Nim

2022-05-25 Thread SolitudeSF
is this a question?

Nim v2: what would you change?

2022-05-11 Thread SolitudeSF
> I agree that refactoring is important, but as you might imagine I'm not > particularly excited spending my free time doing that. oh, im sure others are.

Why I left the Nim community

2022-05-07 Thread SolitudeSF
> as you engage in that shit all the time yourself lol

Why I left the Nim community

2022-05-06 Thread SolitudeSF
if you shilled for nimskull, your thread could have meaningful purpose. now its just attention seeking. you arent helping anyone, you arent changing anything.

Nim v2: what would you change?

2022-05-05 Thread SolitudeSF
i prefer the one that doesnt break fundamental assumptions about how nim functions for a bit of builtin sugar.

Nim v2: what would you change?

2022-04-30 Thread SolitudeSF
and adopting `init/new(typedesc)`

Intersection types in nim?

2022-04-29 Thread SolitudeSF
closest thing is object variants

runnableExample considered harmful / good feature to deprecate before 1.0?

2022-04-07 Thread SolitudeSF
> But those echo docs are hard to maintain; at some point you will end up with > mismatching code and echo examples. no. how would it get mismatched?

how to debug macros used with concept?

2022-03-22 Thread SolitudeSF
why should it? `check` macro isnt getting invoked.

Case (switch) statement and modulo

2022-03-19 Thread SolitudeSF
how is that select/case different from if/elif?

Declaration/definition array of array 2 elements in which's the 2nd is array

2022-02-25 Thread SolitudeSF

Declaration/definition array of array 2 elements in which's the 2nd is array

2022-02-25 Thread SolitudeSF
arrays contain elements of the same type, you're thinking of tuple `(string, array[2, string])`

import from url

2022-02-19 Thread SolitudeSF
> would you like to see them in Nim? i just answered the question

NimForum 2.2.0 - Fixes a big CVE!

2022-02-19 Thread SolitudeSF
why cant we delete our messages still?

import from url

2022-02-19 Thread SolitudeSF
> Did I hurt your feelings? If yes, I'm very sorry for them. what?

import from url

2022-02-18 Thread SolitudeSF

Nim devroom at FOSDEM this weekend

2022-02-17 Thread SolitudeSF
week later, still not all videos are uploaded. were some talks cancelled or something?

Discovery rules for the 'items' iterator

2022-02-13 Thread SolitudeSF
`export sets.items` in `groups.nim` workarounds that

Compressing resulting JS

2022-02-12 Thread SolitudeSF
bad take

dnd - bi-directional drag and drop source/target

2022-02-12 Thread SolitudeSF
great program. but please, dont depend on `#HEAD`, gintro is regularely tagged, or at least depend on certain commit. also, installing other files from `nimble install` is a bad move, just add nimble task for doing that.

NImScript task and using a shebang line

2022-02-10 Thread SolitudeSF
nimcr defaults to -d:release

NImScript task and using a shebang line

2022-02-10 Thread SolitudeSF
`nim r` doesnt recompile either.

Hacker News discussion abou the recently discussed Rust vs Nim performance comparison

2022-02-08 Thread SolitudeSF
cool, some benchmarks compare multithreaded programs vs singlethreaded. and some of the implementation look like written by someone who clearly spent 1 afternoon learning nim and considered himself to be qualified to make such comparisons.

Nim devroom at FOSDEM this weekend

2022-02-07 Thread SolitudeSF
only 4?

Passing iterators as arguments

2022-02-05 Thread SolitudeSF
its a hack

NimForum 2.2.0 - Fixes a big CVE!

2022-01-31 Thread SolitudeSF
> Wow. I think turning to these kinds of ad hominem attacks really does your > arguments a disservice. What a way to derail a nice discussion about the > merits of NimForum vs. Discourse, like really, there is no need for this. If > you have a problem with me then a better way to discuss it is i

Discussion: Why Static Languages Suffer From Complexity

2022-01-21 Thread SolitudeSF
im sure that could be easily scripted in any decent editor if anyone would actually be bothered to implement that. in kakoune, for example, `Alt+] i` will jump to the end of indetation block.

generic Object variant - need to specify type?

2022-01-18 Thread SolitudeSF
object contructors dont infer the type of generic field, doesnt matter if its variant.

Why don't build Nim libraries ecosystem on Rust ecosystem?

2022-01-13 Thread SolitudeSF
because wrapperless, nim-native library would have more idiomatic api/design

Can I haz splat operator

2022-01-11 Thread SolitudeSF
i would advise using standalone version since fusion version isn't maintained and fusion itself is code graveyard.

Nimdenter

2022-01-07 Thread SolitudeSF
at least you have the balls to post it here

a thought about faster iteration

2022-01-05 Thread SolitudeSF
> a nice hack no such thing > first gather all imports what if some imports come from constant strings declared in other modules? or even generated from macros?

  1   2   >