Small libraries you'd like to see ported to Nim?

2024-07-18 Thread kobi
Thanks for the quick response, When I write things my aim is to be practical with high impact, so even though it can fail as you say for learning purposes, i aim for it to be functional. in other words, we want modern languages that are actively used. What languages would you suggest as input? D

Small libraries you'd like to see ported to Nim?

2024-07-18 Thread kobi
So... me and Claude, we're writing a transpiler. This is partly an experiment with AI, and partly a chance to finish an ambitious project i had a few years ago (which got to about 70-80% completion and took about 3-4 months -- it was a c# to nim transpiler using Roslyn) I will now tell you all

Claude 3.5 (Sonnet)

2024-06-26 Thread kobi
Just a note, for those not following the AI scene. Claude.ai have released a new model called Sonnet 3.5 Very very capable in terms of code writing. For example, I spoke to it about improving Nim's error messages and show me where they exist in the code, and it fetched github sources, took a loo

Raising the IC feature again

2024-06-10 Thread kobi
Hello, I would like to ask what is the current state of incremental compilation? Was it implemented while I was away ;-) Looking at github issues, it seems it is partially implemented? I asked 'Claude.ai' about further optimizations inline with nim's design philosophy (that is, not too crazy st

Why not use AI to create momentum in Nim?

2024-06-07 Thread kobi
Those numbers of course come from Hamas authorities, which is a genocidal terror organization. The worst estimates are 3 terrorists to 1 civilian, but no one really knows, and the IDF never hurts civilians for no reasons (so I assume the actual hurt are much much less). This is really off topic

Why not use AI to create momentum in Nim?

2024-05-31 Thread kobi
it's like a huge knowledge base without any ideas. when you state your intention and ideas, or tell it an example and to find similar themes, then it's working. I think it can save a lot of time, but you have to be the product manager, and do the proof-reading. it's verbose and you need to corre

Why not use AI to create momentum in Nim?

2024-05-31 Thread kobi
PS: Usually it may refuse to cooperate. for example, if you want to see prototype ideas for a military defense system that uses high speed drones to physically tackle a drone attack, (hey I'm from Israel, it's on our minds...) Then, you ask it about how to track thousands of flies simultaneously

hardware-software interaction in Nim

2023-12-05 Thread kobi
Hi guys, I have initial thoughts on connecting a small drone to a computer console-like system, programming in Nim, and sending messages to it, not via the hardware controller, but via the software. it could be several drones, maybe send them tasks to perform. From a software design perspective,

NIR

2023-11-17 Thread kobi
Just a question: intermediate language representations also exist for LLVM, and there are other vm implementations that are low level. What made you choose your own over their supposedly mature and tested AST?

Nim version 2.0.0 is here

2023-08-04 Thread kobi
Congratulations for everyone!

Twitter Clone in 60 lines of Nim

2023-07-01 Thread kobi
Looks like a joy to code in.

Wishlist: Ideal UI library for Nim

2023-06-28 Thread kobi
I'm sorry to state the obvious for everyone, in my opinion this is a huge task, and we don't really need a gui made from scratch especially for Nim. I applaud the effort of course, but we don't need it. We only need a library that is easy to get started with, non-friction, Nim way. It can simply

Wishlist: Ideal UI library for Nim

2023-06-27 Thread kobi
Nimx was nice, but lacked widgets. With most of the gui options, lack of widgets is the determining factor in abandoning it. I know it's hard work, but the user cannot be expected to write that code. There are also wrapped libs that aren't very nimish. So easy to get started, relatively nim way,

How doeas NIM differ from Mojo programming language?

2023-06-14 Thread kobi
The real difference: Nim has mojo, but Mojo doesn't have nim.

Any fuzzy or trigram substring search library, with index, so it's instant?

2023-05-24 Thread kobi
Does this help? n-grams? adjust the window size according to your content do you need something faster for your fuzzy search?

Get cursor position in terminal

2023-05-18 Thread kobi
You can repaint the whole screen, and keep track of the text just in memory, a state object. (I think this is the solution you're looking for, but it's not very efficient on its own)

Malebogia

2023-05-17 Thread kobi
thank you for responding to my suggestion. I do not know if the AI bluffs its way sometimes. I think it's at least good for quickly gaining understanding of what a code does. (explanation + documentation) This is what I got when I asked: (pasted malebolgia.nim) please explain what the following

Malebogia

2023-05-15 Thread kobi
Ask chatgpt about oversights in the code and other issues or suggestions. Ask how to fix as well. I think it's a new valuable resource. I don't presume to understand the code without hours of studying, as I have little knowledge of the subject matter, but these AIs can do it within seconds. Just

What GPT-4 knows and thinks about Nim

2023-04-16 Thread kobi
one last note, some people have gone much further. If you're interested, you can read here: I think the potential is skyrocketing, and the implications of how it might change society are worrying to say the least. I am unsure what to think abo

What GPT-4 knows and thinks about Nim

2023-04-16 Thread kobi
me: If we want this to be a gui program, what options do we have in Nim? Nim has several options for creating GUI programs. Here are some of the most popular ones: > NimQT - a binding for the Qt GUI framework. > > Nimx - a widget toolkit for creating GUIs. > > GTK+ bindings for Nim - a binding

What GPT-4 knows and thinks about Nim

2023-04-16 Thread kobi
Here is a sample output (this is with chatgpt), note that you can write specific details about the app or lib in question. In any case, it helps to get a roadmap of tasks going. me: A winzip clone Sure, here's what I intend to do: Purpose: The purpose of th

What GPT-4 knows and thinks about Nim

2023-04-16 Thread kobi
Well, to get back to examining working with GPT4 as a software developer, I recently tried, with gpt3.5 the following prompt. Can you try this in GPT4? I don't have ready access yet. Hello, I would like to understand and gauge how much AI's are accelerating work in society. For tha

why use nim over c#?

2023-03-14 Thread kobi
I would have to disagree, OOP is very useful. designing with interfaces and classes or structs, encapsulates your data in one object, which is very useful for avoiding complexity down the road. The myriad design pattern, yes, they are confusing and sometimes lead to more confusion. But you can c

why use nim over c#?

2023-03-13 Thread kobi
With C# you have a ceiling of high-level code - a ceiling of abstraction, on the other side you have a floor you can't break - you cannot go too low-level either. In C# you will have to use reflection or annotations or something horrible as that, to go further, and it is really really really slo

OpenGPT seems to sort-of work with Nim also.

2022-12-26 Thread kobi
Perhaps it could be used to figure out bugs... provided the relevant source code.

Choosing Nim out of a crowded market for systems programming languages

2022-11-29 Thread kobi
I want to say that I have tried many languages, and came to understand that Nim is "future-proof", it can go down all the way, and go up all the way. So, very abstract because of macros, and very low level, because it compiles to c. performance was always good enough. memory use, had to be optim

Macros Masking Common Errors

2022-10-08 Thread kobi
The problem is true, macros do mask errors, or at least where the errors initiated from. What to do about it is unknown, but to dig the head into the sand is not the solution

How to declare a varible in a case statement for use afterwrads

2022-10-08 Thread kobi
defecting, hehe. The loyalty value used to bother me too. It is silly, actually. The language is a tool. Just like when a problem needs a screwdriver instead of a hammer, don't feel guilty for being disloyal to the hammer. btw, what is wrong with using a top level `var`? (declaring a var before

High-to-low range in slice

2022-09-22 Thread kobi
I assume the reasoning is to prevent something akin to integer underflow, as right now, it simply won't work. so being more explicit to prevent unintentional bugs... but maybe I'm wrong.. the reasoning could be aversion of ascii art games :-)

NimConf 2022 - registrations

2022-09-18 Thread kobi
I am interested also, in seeing the fuzzers at work, the new drchaos, and drnim. Also state of IC and how to use it, if possible.

NimConf 2022 - registrations

2022-09-18 Thread kobi
cool. more examples: xml and json files, serializing or changing a value, xpath style perhaps. downloading a file over the internet, sending an email, connecting to nntp, receiving a feed. creating a small gui app. connecting to sqlite, and storing state or records in it. stuff like that, simple

re or nre. What should i use? What will be supported in future?

2022-09-17 Thread kobi
it matches the whole value, so should be something like "^.*dd.*$"

important_packages

2022-09-17 Thread kobi
Probably best to check important packages only before a release, and not on devel branches or continuous integration.

Slow compilation time in a big project. What branch contains Incremental Compilation?

2022-09-09 Thread kobi
it needs the compiler build (run with ./koch) to include that option, but it was a long time, i don't know if it can still work, since many changes have gone to the compiler, maybe IC needs to be aware of them to work...

NimConf 2022 - registrations

2022-09-05 Thread kobi
Maybe it's too big of an idea to do, but here is my suggestion: Show how easy it is to code in Nim, all kinds of usual, everyday tasks that a dev is likely to need. It may also expose where we fail.

nimiSlides 🛷 Create beautiful slideshows in Nim 👑

2022-09-01 Thread kobi
wow, really awesome!!

Show Nim: CSS Grid layout engine!

2022-08-31 Thread kobi
Always happy to hear your progress, man. You're really providing practical options for the community. For example, for a gui app I wrote I had to switch to another language, and that's a bummer. What I'm trying to say is that there's a real need, especially for those who create tools and simple

Recursively replace pair of bytes with one byte, within given byte array

2022-08-28 Thread kobi
I am not sure I understand exactly the request, but this seems like a string searching algorithm, then replacing all the found positions. look into boyer-moore and similar. I think Nim has one in the stdlib (Sunday algorithm?). once you get a seq of all the index positions, and you know the leng

Ideas for useful/cute little GUI programs?

2022-08-21 Thread kobi
Cool question. what about simple programs from the nineties, like winamp or winzip? Other inspirations for tiny gui apps: bigger apps: a gui for the YoutubeExplode library an mp3 player that can change the audio speed (see libsonic

`mixin` ignores `when` branching

2022-08-05 Thread kobi
I am not sure, as I haven't tried this, but I think: you are importing tokens.nim in the first line of main.nim file. so, you have access to that proc. maybe you meant to include it? see that your concept of a mixin is the same concept in nim

Fidgets!

2022-07-29 Thread kobi
Great, I'm happy you're continuing this endeavor, I feel many in the community want a proper way to write gui apps in Nim.

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

2022-05-27 Thread kobi
In my opinion, this is just being spoiled. It doesn't really matter and doesn't affect getting work done. The block syntax looked best and is part of the language.

Fidgetty: themes ... ?

2022-05-16 Thread kobi
oh and forgot to add that if you want more properties you can simply add them to that object. it's one point of learning for the user. maybe can be split at a later point

Fidgetty: themes ... ?

2022-05-16 Thread kobi
wow, this is a cool direction. But please note that inventing a theming system is a big task. I am sorry to repeat myself but I think it would be wise, to copy the properties of widgets from other systems. I think Flutter is probably the most advanced/flexible here(Kivy is also nice, css and f

Interesting proposal for Error handling and Null through unified option Type.

2022-05-16 Thread kobi
zig-lang and vlang have special handling and function markers for exceptions or errors, they are wrapped in an option type and there is some language support to make it concise. I think it's a nice innovation. The main idea is that exceptions are not some subtle invisible thing that bubbles up u

Best practices for porting huge C projects to Nim

2022-05-13 Thread kobi
Thank you for your perspective. Here's a thought: What if you don't port from c/c++ but instead port from a high level language (or someone already ported the c project to that language). The problem of a different memory model then doesn't exist. Though you are left with assuring semantics is c

Best practices for porting huge C projects to Nim

2022-05-09 Thread kobi
Some good advice up there. The API and unit tests, make versions of these that work. if you can create a binding, why not. if you need to really port it, I am sorry for the ugly suggestion but it's practical - regexp can do a lot, (but u have to constrain it well, to not search-replace by accide

Hello Javascript!

2022-05-08 Thread kobi
I haven't tried it, but maybe you'll get a smaller output with this library.

Fidgets!

2022-05-08 Thread kobi
I would say a complete set of widgets is what's most missing for a Nim gui toolkit. the list of widgets is pretty standard. you can look at winforms, wxwidgets, or fox-toolkit, gtk, qt etc. For layout, I would argue that it's worth checking out what flutter did.

Nim v2: what would you change?

2022-05-04 Thread kobi
Wow, so many people answered and gave their perspective. I think it's valuable to collect all those, but note that some of the suggestions are already available or possible. Probably some users are newer or have less experience (myself included). After collecting those to one list, see which of

Nim v2: what would you change?

2022-05-01 Thread kobi
* I personally like the options module, and suggest making it part of prelude, and then make types not nil by default. * the flow sensitive typing is a good feature, i hope it passes the experimental stage. * I ran into issues with methods, they work but not always, there are some corner c

Fidgets: widgets using Fidget

2022-04-05 Thread kobi
generally it depends. if it's an immediate mode gui, then you pass those state variables every time you draw, and the internal system checks if drawing is needed. otherwise, the traditional mode is triggering an event, that has user code to change the instance variables, and then calls for a red

Newbie questions about Nim, Python, XCB

2022-03-31 Thread kobi
For gui apps, what worked for me was building all the functionality in Nim, and compiling to a library, with nimpy providing python export pragma. On the python side, as long as the (.so) library is in your path, it should be able to find it, and simply use it right away. For using python in Nim

Ruby's parallel-like functionality in Nim

2022-03-25 Thread kobi
Not exactly the same, but perhaps this is useful to you: experimental parallel: and set the max threads: it takes care of synchroni

my TUI designer.

2022-03-25 Thread kobi
cool project. looks practical

How to get process owner by pid?

2022-03-10 Thread kobi
I don't have windows here, but have you tried passing the variables by ref? echo i.GetOwner(ref user, ref domain) Run or ref Run

Can Nim be made more "purely functional""...

2022-02-17 Thread kobi
Sorry, but I feel this is a theoretical complaint born from the mind, a perception of what is better, instead of a practical actual issue. There are packages that provide fast functional programming, and changing the Nim front end means changing the language and style that many here enjoy. Funct

Nim FAQ

2022-02-16 Thread kobi
FWIW, reliable vscode support worked for me only by adding the (junknet) nimlsp extension.

Experiment with creating a "ImKivy" GUI api

2022-02-14 Thread kobi
That sounds amazing. I really liked kivy (it was very simple, flexible and had great documentation), but being tied to python was hard to get it building apk's for android. Finally I settled on flutter. which had really good support in IDEs, and 'flutter doctor' would set up your environment qui

Questions about creating dll with Nim

2022-02-14 Thread kobi
mIRC? wow, you bring me back to the nineties!

Is there support for a network stream?

2022-02-08 Thread kobi
Thanks alot!!

Is there support for a network stream?

2022-02-07 Thread kobi
Hi! Is there support in Nim for a network stream, or continuously recv'ing from a socket? When I tried connecting to https in the more low level way, I couldn't get it to work. Here is a bare-bones example: (It receives empty lines...) Am I missing someth

Flutter and Nim

2022-02-05 Thread kobi
hmm... I have a thought for an experiment.

Flutter and Nim

2022-02-05 Thread kobi
Thank you. What are the benefits over the native dart way? better abstraction abilities?

Flutter and Nim

2022-02-04 Thread kobi
That is cool, I am also interested in this, and flutter is really nice for gui work. @jasonfi, can you share what you have with us? (ui converted to json, etc?) Sounds interesting, would like to try working with this.

Unescape string

2022-01-19 Thread kobi
btw, how do I unescape all html entities to utf8 in a large text?

Introducing taskpools, a small lightweight ARC/ORC threadpool

2022-01-13 Thread kobi
That sounds very cool. Is it ready for usage? What would be the api and does it have documentation?

simple event system

2022-01-08 Thread kobi
A good event system would be great to have, though in the past I found it hard to debug. Recently I've been looking into Dart (for Flutter actually), and perhaps what you need is state management. A nice approach to decouple code I saw there was the BloC pattern. here is an example to see how it

One Language to Rule the Mole

2022-01-08 Thread kobi
That phrase, one language to rule them all, was obviously just a joke, but for a mascot a mole peeking from its soil mound with a crown on its head could be really cute. and yes, the Go's gopher is really ugly. I thought it may be based on some nerd programmer's face.

Made in Nim 2021 - your favorites?

2022-01-05 Thread kobi
I have been using Nim to create command line programs, as well as library functionality exposed with nimpy. Some of those programs participate in the lofty goal of helping to stop and raise awareness about Human rights issues in China, especially the persecution of Falun Gong. So Nim is already

a thought about faster iteration

2022-01-05 Thread kobi
I realize those things that sound simple are usually much more complex. But isn't it possible there are some easy gains, low hanging fruits by tweaking the order of code validation?

a thought about error messages

2022-01-05 Thread kobi
Some languages, such as C#, assign an ID to the error messages the compiler produces. then the user can search for that ID and figure out exactly what it means. it has the added benefit, that in the case Nim reports an error message but that error is wrong for that use case, you can find that sp

a thought about faster iteration

2022-01-05 Thread kobi
I have noticed (basically seeing all the dots when nim compiles) that the compiler currently enters (compiles) all imports before checking the current file for even syntax mistakes. In addition, why enter the first import, if the second one possibly doesn't exist. I think a few such heuristics c

is computer online?

2022-01-05 Thread kobi
How to properly check in Nim, if my computer is online, before attempting to access the network. Is there a recommended way, or should I just attempt a connection and catch the exception if it fails?

2 questions on json mudule

2022-01-04 Thread kobi
For your example: import strUtils import json var a = %*[1, "hello", nil] echo a echo "\n" for i in a.items(): echo i, " ", i.kind echo "\n" for i in a.items(): case i.kind of JInt: echo (i.getInt() +

can we write nim instead of c++?

2021-12-28 Thread kobi
You are in the Nim forum, you know (inside?) that you definitely want Nim instead of C++. If you have looked into C++ for your backend, what are your findings, which libraries would you depend on? the Nim eco system is quite small, see if there are matching libraries in Nim see:

Why does 'string' and 'len' use 'int' rather than 'uint' for length?

2021-12-24 Thread kobi
confusing bugs can happen with underflowing. when uint is less than 0, it becomes the highest uint

Pythons None in Nim

2021-12-19 Thread kobi
I think it maps to either nil or Option none type. works better with option. also, u can type: some val (without parentheses) or val.some I personally think the options module should be in the Nim's prelude, receiving the blessing :-)

What approach can I use to fix a number of parameters in some functions?

2021-12-19 Thread kobi
You can have setGrp, setWp, on System object. they can be saved in that type, and then you use the more flexible parameters... if I understood your usecase. I think that's the best way. other options are a singleton or an external json etc. just some ideas. i think the first solution is the most

Nim 1.6.2 released

2021-12-18 Thread kobi
Merry Christmas everyone!!

Nim's version of the Trojan Source vulnerability

2021-12-09 Thread kobi
so, I was reading today that the dart language solves this issue in this way: The compiler issues a warning about any such invisible characters in a literal string.

Show Nim: Forematics is a Metamath verifier written in Nim.

2021-12-09 Thread kobi
Just out of curiousity, if you don't mind sharing... have you written this project, just out of interest, or does it serve as a step in a more practical goal?

MetaCall now has initial support for Nim

2021-12-06 Thread kobi
[viferga](https://github.com/viferga) writes: I wrote a base project which is already working: [f449792](https://github.com/metacall/core/commit/f449792d0e09f4536b50d964102812163036a0ba) For making it work you have either to compile metacall manually or pass the CFLAGS and LDFLAGS pointing to t

async with delegates, how to pass parameters?

2021-12-05 Thread kobi
Hi everyone! I am trying to figure out how to do async, with delegates. I want to use `withTimeout` from `asyncdispatch` module, and for that I need a future. Now I have a proc that takes an argument, for example, proc downloadPage(url:string){.async.} = echo url Ru

async with delegates, how to pass parameters?

2021-12-05 Thread kobi
some sample code: import asyncdispatch proc downloadPage(url:string){.async.} = echo url let url = "someUrl" let f:Future[void] = proc(){.async.} = waitFor downloadPage(url) Run

Question: How to limit concurrent async futures?

2021-11-29 Thread kobi
OK, I will attempt that.

Question: How to limit concurrent async futures?

2021-11-29 Thread kobi
I can track the active connections, seeing how many have finished, then have a while active >= limit: sleep 10 I wonder if there is a more structured approach, or perhaps a template already exists for that.

Question: How to limit concurrent async futures?

2021-11-29 Thread kobi
Hi, How would you go about limiting the amount of concurrent async futures, for example, to download a website I don't want to open 100s of connections at the same time. What's the best design for that? I guess, similar to a thread pool.

The Cylons have a Plan

2021-11-21 Thread kobi
ah, yes, you are correct. I misunderstood this.

The Cylons have a Plan

2021-11-21 Thread kobi
Oh, and thank you for making an open plan and being transparent. It was needed. I'm glad IC is well positioned. Another thing, wrt Json, and also pattern matching, I see performant elegant and ergonomic libraries already exist. and with your ideas of moving stdlib to external packages -- maybe j

The Cylons have a Plan

2021-11-21 Thread kobi
That was a great show btw, [the reimagined one](https://www.imdb.com/title/tt0407362/) I mean.

The Cylons have a Plan

2021-11-21 Thread kobi
> one "declarative" (type T must have these operations of these signatures). I > don't know how to bring the declarative one on feature-parity with the old > one and I also didn't spend too much time on the problem, there is usually > something more important to work on. A simple solution would

Evolving the moderation of the Nim communities

2021-11-19 Thread kobi
whow, that quickly spiralled out of control I don't think anyone here has bad intentions by introducing some moderation. it's not about some status, or caste system, nor about discussions of anarchy vs police needs. No need to make this an ideological objection or anything. You can simply as

metaCall

2021-11-18 Thread kobi
I see. do you have an idea what it'd take to get Nim as one of their languages?

metaCall

2021-11-17 Thread kobi
Hi guys, in the last few days I came across a project called MetaCall It aims to allow different programming languages to interoperate. I am not sure of the technical details, but this is similar to efforts such as nimpy, nimjl and genny. Implementing a Nim

Yet another macro DSL

2021-11-14 Thread kobi
nice, but perhaps it's possible to have default arguments as Empty, and just call a nice api where you don't have to specify those? (in other words, don't rely on argument order etc, but show a high level api)

compiling to macOS

2021-11-14 Thread kobi
Thanks! I'll give it a try

How to hide FFI details from implementations of a (C FFI) interface?

2021-11-14 Thread kobi
I believe you just have to convert the types to their equivalents. proc doSomething(num: int) = callBindingCode(num.cint) Run if there are casting, buffers, ptrs etc involved in the C code, you can try to hide them in a nice api. the body of your proc will do t

compiling to macOS

2021-11-14 Thread kobi
Hi! I've been living under a rock for a few years, and wonder how developers are working today when they want to compile to OSes they don't have physical access to. Specifically, I would like to compile for OSX and iOS without actually owning mac hardware. Online services? virtualbox magic? Th

Survey Question: flow research

2021-11-03 Thread kobi
As Nim is approaching maturity in the public eye, I claim that as a language, it has been mature for a long time. However, in terms of documentation and standard lib, it hasn't been. For the end user of the language, when you try to solve a real world problem, in this regard it is still immatur

  1   2   >