Figuro updates: Scrollpane and more

2023-11-04 Thread elcritch
Hi @mantielero, good question and points. It's useful to have others comment as I don't know what's unclear to others. Now that the widget model is mostly stable I'll probably start documenting it. It's a bit different from many GUI libraries but it still uses common patterns used in them all.

Array of type "proc" except I don't know what I'm doing

2023-11-04 Thread nimling
Thanks!

Array of type "proc" except I don't know what I'm doing

2023-11-04 Thread 4n0n4me
`proc `$`(x: proc): string = $typeof(x) & " = ..." ` Run

Array of type "proc" except I don't know what I'm doing

2023-11-04 Thread nimling
Thanks for the playground. I see what you did with defining the `a_echo` **proc**. I read back through some of Salewski's book (specifically ). It looks like I was mostly just overthinking it. Do you know (unrelated) if there's an e

How to pass an optional table as an argument to a function?

2023-11-04 Thread Isofruit
Honestly at that point for ease of use I'd personally prefer using overloads. so write 2 procs and maybe one proc calls the other or something like that.

NIR

2023-11-04 Thread Araq
Ok, ok, IC it is.

How to pass an optional table as an argument to a function?

2023-11-04 Thread cblake
Nim has optional named arguments. How about simply import std/tables proc maybeTable*[T](collection: seq[T], table=initTable[T]()): T = if table.len == 0: discard # same if users passes an empty table Run It's actually possible to do more here, like have some

How to pass an optional table as an argument to a function?

2023-11-04 Thread TKD
I need to check to see if the table exists so as to create one based on the passed-in collection if it does not. I could check if it is empty but I want to give the user the option of not having to pass in the argument

NIR

2023-11-04 Thread icedquinn
incremental compilation, since we had it in the past. quick iterations are a staple of Delphi-lineage programming :p

How to pass an optional table as an argument to a function?

2023-11-04 Thread Araq
Might be a compiler bug, please report it on github. That said, what's the point? Empty tables are a thing, why wrap it in an `Option`.

How to pass an optional table as an argument to a function?

2023-11-04 Thread TKD
Why does this `proc` definition not work and how to fix it? proc testTableOptiion*[T]( collection: seq[T], table: Option[Table[T, float]] = none( Table[T, float] )): T = ... Run This results in the error: `no generic parameters allowed for Table` or sometimes `

NIR

2023-11-04 Thread ThomasTJdev
Also on this one! At [CxPlanner](https://CxPlanner.com) we have also had some trouble with long compile times.. So definitely IC.

NIR

2023-11-04 Thread bsljth
My choice (in order of preference): 1. NIR-to-AST mapping 2. Better borrow checker to refine the "view types" implementation. 3. Not-nil checking and static array index bounds checking. 4. New C(++) back-end. 5. REPL.

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

2023-11-04 Thread SuaveSteve
Rust was once laughed at for developers who didn't want a job. Through providing sheer value, it was able to get its foot through the door. Okay, that and cargo sounds like the second coming of Christ, depending on who you ask.

Peoples Keto Gummies ZA Weight Loss

2023-11-04 Thread carollhasty
Official News:- Peoples Keto Gummies ZA:- In this way, it is possible for the body to use already stored dietary fats as a primary source of energy – pr

Array of type "proc" except I don't know what I'm doing

2023-11-04 Thread dwhall256
Came by to say I loved the title of the post. I'm learning nim, too.

NIR

2023-11-04 Thread exelotl
My project is large, every time I make a tiny change I have to wait for 1200 modules to compile to see if it worked, it's a real productivity killer. So incremental compilation gets my vote - unless tackling one of the other features would allow for a better quality IC implementation. I hope IC

https://www.facebook.com/TryPeoplesKetoGummiesZA/

2023-11-04 Thread helenshenderso
Official News:- Peoples Keto Gummies ZA:- This chemical works to keep your body energized while also increasing the human body's natural ability to burn

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

2023-11-04 Thread crfout
Marketing and financial backing. Zig has steady financial backers plus a ten million dollar boost to talk about Zig everywhere. Go has the might of Google behind it.

With what parameters does echo call fwrite? Trying to implement fwrite in Nim.

2023-11-04 Thread khaledh-nim
Here's how I implemented [fwrite](https://github.com/khaledh/axiom/blob/e8c96c564c476a1d67ae372f8dfbab2dfdc74c5d/src/lib/libc.nim#L75-L83) in my [kernel](https://github.com/khaledh/axiom): type constCstringImpl {.importc: "const char *".} = cstring constCstring = distinc

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

2023-11-04 Thread ImmortalWombat
It's a bit similar in D, but since it's been around longer it has about everything now. Like Visual D for those that like Visual Studio, code-d for those that like vsc, LSP so that you can use vim, emacs or whatever you like. We support multiple formats, but now use dwarf by default, not coff. T

Best way to architect a Nim dll/so that is used by other Nim dll/so/executables

2023-11-04 Thread treeform
As @giaco15d says, we started going some of this with Genny: . Idea is to down-cast Nim's API into a plain C API, then up-cast it to some thing that is nice to use in Nim. Use naming conventions that are familiar in the language: So callToNim turns to call_to

Learning Nim - some problems with nested template / macro / generic code

2023-11-04 Thread icebergg
Thank you. My understanding was that `typed` should be used when the code is meaningful in itself, like here. Is this behaviour expected?

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

2023-11-04 Thread freeflow
I'd agree on the points that the nim environment is quite poor. Gives the impression of a language that is not adequately supported. To interest people in nim you need to find the pain points in other languages and show how nim solves these issues (at zero cost to the programmer). I'd also argue

NIR

2023-11-04 Thread Araq
> Will mixed code with c++ interpretation slow down compilation as well? There is no "C++ interpretation" going on. And the added pipeline steps can run in parallel.

import js variables with two types

2023-11-04 Thread geotre
`import std/jsffi type StyleSpecification = ref object of JsRoot LngLat = ref object of JsRoot MapOptions*[T: StyleSpecification | cstring] {.importjs.} = ref object of JsRoot container*: cstring center*: LngLat zoom*: int style*: T let opts = MapOptions[string]( container: "foo", center: LngLat

Figuro updates: Scrollpane and more

2023-11-04 Thread mantielero
Congrats @elcritch! It is great to see continuos progress. I saw this [widgets wanted issue](https://github.com/elcritch/figuro/issues/26) and I was wondering if there is a better explanation about how to make them. Looking at [widget model](https://github.com/elcritch/figuro#widget-model) it i

import js variables with two types

2023-11-04 Thread domogled
Hi, I'm creating a wrapper over a javascript (typescrti) library where a parameter can have two values. export type MapOptions = { ... style: StyleSpecification | string; ... Run Direct implementation in Nim returns an error

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

2023-11-04 Thread bsljth
@treeform Fidget will also make front-end development (cross-platform) much much easier than ever. You create a Figma design. And generate code; and edit to for adding logic and for whichever platform you want). It's simply great. Please work on Fidget. I'm a newbie coming from JavaScript land.

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

2023-11-04 Thread bsljth
@treeform FidgetUI sir. Dart was insignificant (though it was from Google); until Flutter.

NIR

2023-11-04 Thread ggibson
1 viewtypes 2 IC 3 REPL To me, the last lang features I look forward to are view types (easier performance gains) and concepts (creates a more friendly std lib) then after that, as so many others have pointed out the tooling and good libraries will be important. To me they depend on nailing dow