Discussion: Why Static Languages Suffer From Complexity

2022-01-20 Thread elcritch
Yah it's annoying. I actually avoid telling people upfront about style insensitivity as it carries a lot of preconceived notions. Perhaps writing more "expose" type blog posts/articles would give people more of a chance to see why Nim's great rather than just "bikeshedding". I've really wanted t

Make android app

2022-01-20 Thread GordonBGood
As this question pops up now and again, I'll list some of the most recent working links here as follows: 1. Interest for me started with this thread [as per my post there](https://forum.nim-lang.org/t/6045#37780). 2. With information gathered there, I was able to put together some working r

Discussion: Why Static Languages Suffer From Complexity

2022-01-20 Thread xigoi
Unfortunately, every time someone mentions Nim, the discussion devolves into “indentation bad, style insensitivity bad”.

profiler for mac?

2022-01-20 Thread evoalg
I already tried to install valgrind on my mac using brew but it says: valgrind: Linux is required for this software. Error: valgrind: An unsatisfied requirement failed this build. Run ... and I also tried to install someone's workaround from their git but it said

Trojan:Win32/Wacatac.B!ml

2022-01-20 Thread coffeepot
Just tried this and got the same result. This is turning into a bit of an issue. @dfprint if you go to the Windows security window, then virus and threat protection, you can allow it from there.

Update on compiling to asmjs or wasm through emscripten...

2022-01-20 Thread GordonBGood
@treeform: > What are your thoughts on > ? I like your tutorial a lot, and it obviously goes much further than the basic steps I outline above; I do note that although your repo states that "step 4 now works" use of it has not been added to

Discussion: Why Static Languages Suffer From Complexity

2022-01-20 Thread inv2004
I think my solution would be to use intermediate proc to satisfy the static type for printf: import system/io import strutils proc unwrapVarArgs(a: varargs[string, `$`]): seq[string] = for x in a: result.add $x proc printf(p: static string, a: sta

Discussion: Why Static Languages Suffer From Complexity

2022-01-20 Thread inv2004
I agree that the kind of task for macros, but I think that author wanted to demonstrate language's guaranties without macros. And I think that Nim supports it, except the very small thing that the heterogeneous list needs static varargs - but it is specific case of the printf

Discussion: Why Static Languages Suffer From Complexity

2022-01-20 Thread coffeepot
> not template or macros. because via macros and templates it is possible to > check it even in rust. What a peculiar perspective. Why is he 'banning' macros and templates if these make it possible in Rust? Is this code golf? Rust's macros, as @Araq states, are just worse. There's a reason they

Discussion: Why Static Languages Suffer From Complexity

2022-01-20 Thread mratsim
> It was an interesting article. Cool to see Idris and Zig mentioned, even > though the author suggests that Zig suffers from the colored function issue > in async when I'm pretty sure that one of its selling points is that it > doesn't. Zig allows end-user to switch all async function to be on

Discussion: Why Static Languages Suffer From Complexity

2022-01-20 Thread Araq
Doing it without macros is not a reasonable request, I added macros to Nim for a reason, they enable the otherwise impossible. So what if Rusts years later also has added macros and did it worse than Nim. So study the topics you blog about. Study Nim's macro system. And Haxe's. And Scala's. And

Discussion: Why Static Languages Suffer From Complexity

2022-01-20 Thread inv2004
I had a small discussion with author of the initial article. He said that he would be interesting in `static proc` solution, not templates. because via macros and templates it is possible to check it even in rust. I was trying to implement it, but I suppose that blocker is the issue:

Discussion: Why Static Languages Suffer From Complexity

2022-01-20 Thread bpr
Ha, serendipity, I mentioned just this example (type safe printf) a few days ago here, in the context of macro docs. It was an interesting article. Cool to see Idris and Zig mentioned, even though the author suggests that Zig suffers from the colored function issue in async when I'm pretty sure

Discussion: Why Static Languages Suffer From Complexity

2022-01-20 Thread coffeepot
If you look at the hacker news thread on this article, Nim is mentioned a few times: > Static languages enforce compile-time checks; this is good. But they suffer > from feature biformity I'd argue that their point is somewhat muddied in that it o

Trojan:Win32/Wacatac.B!ml

2022-01-20 Thread dfprint
Trojan:Script/Wacatac.B!ml Hello, I downloaded on Windows 10 Pro and I am not even able to open the zip file. Windows Security, Virus & Threat Protection classifies the download as Severe and imm

Unescape string

2022-01-20 Thread Araq
What do you mean by "easy solution"? If you write a "parser", that's part of its job, to handle escape sequences. It's by no means the hardest part of writing a parser.

Discussion: Why Static Languages Suffer From Complexity

2022-01-20 Thread Araq
The article is interesting but nothing new to me... Yes static type systems make our languages more complex. There are no good solutions known to me how to avoid the complexity. It's also not clear if it can be simplified to a degree that matters; when you're an expert in any field (particle phy

libmysqlclient.so Not Found

2022-01-20 Thread dbaron4
Thanks! My G**gle search had me try other things that didn't work.

Atomics: attempting to call undeclared routine: 'testAndSet'

2022-01-20 Thread Nycto
> Also please use threading/atomics instead. Thanks for the pointer, @planetis

Unescape string

2022-01-20 Thread enthus1ast
I can imagine that the best way would be to use the string parsing features of the nim compiler itself. So you could get the same features. But I cannot help to do it

Atomics: attempting to call undeclared routine: 'testAndSet'

2022-01-20 Thread planetis
Atomics with sizeof(T) more than 8bytes use an implicit [spinlock](https://github.com/nim-lang/Nim/blob/devel/lib/pure/concurrency/atomics.nim#L307). Also please use [threading/atomics](https://github.com/nim-lang/threading) instead.

Atomics: attempting to call undeclared routine: 'testAndSet'

2022-01-20 Thread Nycto
Yup, didn’t mean to trivialize the idea of lock free anything. My endgame here is a reduced feature set: * keys and values will always be ints * Open address hashing * get and set should be lock free * I’m going to try making ‘delete’ lock free using tombstoning * I need resizing, but I

Discussion: Why Static Languages Suffer From Complexity

2022-01-20 Thread Hlaaftana
Wow we are bad at marketing.

Make android app

2022-01-20 Thread Alexverh
Be sure to choose a good app discussion guide and follow it. this is good for starters

profiler for mac?

2022-01-20 Thread cblake
> on all kinds of platforms Well, [not on M1 macs with no plans to change](https://community.intel.com/t5/Analyzers/Vtune-can-t-open-result-on-Apple-m1-Macos-11-2-3/td-p/1276413). { unsurprisingly :-) }

profiler for mac?

2022-01-20 Thread arnetheduck
works great on all kinds of platforms

Discussion: Why Static Languages Suffer From Complexity

2022-01-20 Thread inv2004
Is it applicable to Nim? I mean the last part implements print/echo

Atomics: attempting to call undeclared routine: 'testAndSet'

2022-01-20 Thread cblake
What mratsim says is all true, but @Nycto expressed a "messing around with"/learning context. As already observed, this is not possible with variable size string keys. So, one is already on a road of making assumptions toward other ends (simplicity, scalability, etc.). So, it bears noting that

profiler for mac?

2022-01-20 Thread dom96
Have you seen ?

Atomics: attempting to call undeclared routine: 'testAndSet'

2022-01-20 Thread mratsim
If you want to do lock-free data structures, you need to write everything manually with at least: * `ptr UncheckedArray[T]` \+ len for storing the data * `Atomic[bool]` at least 1 to indicate if the data is in used. You might want to separate into 1 for readers and 1 for a single writer, so

Suppressing non-exported fields in nim doc

2022-01-20 Thread cantanima
I have a question about CI tests. The pull request has been updated several times: once due to a bug on my part, the others due to the discovery of places where I have to update various tests &c. One issue seems to have existed already when I first checked out the code; I just didn't notice it

profiler for mac?

2022-01-20 Thread mratsim
To flesh out on @evoalg idea, here is a simple tol that gives report on number of function called and time spent. You only need to add `{.meter.}` pragma to each of the proc of interest This gives a report like this (well

nimscript - import configuration file

2022-01-20 Thread alexgustafson
Nice, thanks for both examples. the include "settings.nims" is exactly what I need. good bye YAML, hello nim!

Setting finalizer on object hierarchy won't compile with --gc:arc

2022-01-20 Thread filcuc
There're several options. Yes as you say we could add a v1/v2 compile time switch to use the "old" v1 finalizers way and then add a v2 version with destructors. That said i think we just need to wait for an answer from someone like @araq. If i'm not wrong (and recall correctly) finalizers should