00:06:26 | * | stefanos82 quit (Quit: Quitting for now...) |
00:10:28 | * | theelous3 quit (Ping timeout: 245 seconds) |
00:26:23 | * | natrys quit (Quit: natrys) |
00:31:09 | * | fvs quit (Remote host closed the connection) |
00:32:46 | FromGitter | <deech> Does the body of a `macro` execute at compile time? So, for example, given `macro m (b: untyped): untyped = ...`, can I assume that `...` must be interpretable by the VM? |
00:33:54 | FromGitter | <deech> ... excluding the body of a `quote:`. |
00:34:24 | * | lmariscal quit (Quit: Ping timeout (120 seconds)) |
00:34:52 | * | lmariscal joined #nim |
00:39:06 | FromGitter | <deech> At compile time is a little fuzzy, what I mean more precisely is where `PContext`.`inStaticContext > 0`? |
00:40:47 | * | zedeuss joined #nim |
00:40:56 | sealmove | macros are calculated by the VM in compile time, yes |
00:42:01 | FromGitter | <deech> This does not currently seem to happen explicitly. |
01:00:31 | * | leorize quit (Remote host closed the connection) |
01:01:14 | * | leorize joined #nim |
01:11:41 | * | abm quit (Quit: Leaving) |
01:13:02 | * | dgreen quit (Remote host closed the connection) |
01:50:10 | * | snuffdtek quit (Remote host closed the connection) |
01:51:49 | * | snuffdtek joined #nim |
01:52:27 | * | couven92 quit (Read error: Connection reset by peer) |
02:18:59 | * | ryukophone joined #nim |
02:27:40 | * | ryukophone quit (Ping timeout: 264 seconds) |
02:29:17 | * | ryukophone joined #nim |
02:37:13 | * | ryukophone quit (Read error: Connection reset by peer) |
02:37:25 | * | ryukophone joined #nim |
02:45:31 | * | ryukophone quit (Ping timeout: 276 seconds) |
03:13:19 | * | ryukophone joined #nim |
03:22:09 | FromGitter | <Varriount> Aditya: The fact that it's a macro means that the body will be executed at compile time |
03:22:19 | FromGitter | <Varriount> @deech |
03:31:50 | * | ryukophone quit (Read error: Connection reset by peer) |
03:38:13 | * | carkh quit (Remote host closed the connection) |
03:44:15 | * | ryukophone joined #nim |
03:49:35 | * | ryukophone quit (Ping timeout: 268 seconds) |
03:53:45 | * | ryukophone joined #nim |
04:04:49 | * | ryukophone quit (Ping timeout: 276 seconds) |
04:05:10 | * | ryukophone joined #nim |
04:09:37 | * | ryukophone quit (Ping timeout: 245 seconds) |
04:09:47 | * | ryukophone joined #nim |
04:14:20 | * | laaron joined #nim |
04:30:08 | * | alexander92 quit (Remote host closed the connection) |
04:31:22 | * | alexander92 joined #nim |
04:32:43 | * | laaron quit (Remote host closed the connection) |
04:33:00 | * | laaron joined #nim |
04:37:34 | * | nsf joined #nim |
04:38:59 | * | sealmove quit (Quit: WeeChat 2.5) |
04:43:35 | * | cyraxjoe quit (Read error: Connection reset by peer) |
04:44:44 | * | cyraxjoe joined #nim |
04:48:19 | * | ryukophone quit (Remote host closed the connection) |
04:48:34 | * | ryukophone joined #nim |
04:52:57 | * | ryukophone quit (Read error: Connection reset by peer) |
04:53:03 | * | ryukophone joined #nim |
05:12:14 | Zevv | bwah I spent hours getting this to work and the solution is just so obvious: https://forum.nim-lang.org/t/5043 |
05:14:36 | disruptek | i think i need that approach for my api codegen. |
05:15:06 | Zevv | well, now you know how to do it :) |
05:15:26 | disruptek | thanks for smacking your head on it for me. :-P |
05:15:36 | Zevv | don't static[] your typedesc or genAst your Nimnode, neiher NimNode your type or typedesc[] your macro generics |
05:15:58 | Zevv | because of "getAst takes a call, but got getAst" and "cannot instantiate T", you know |
05:16:08 | Zevv | you're welcome :) |
05:16:35 | disruptek | i'm afraid to learn what that means. |
05:17:09 | Zevv | I have no clue either |
05:17:12 | disruptek | i have to figure out how to build this in a way where the user can add a compiled type based upon runtime data. :-/ |
05:18:07 | Zevv | I never designed this to be the way it is, it evolved like this. And knowing now what I did not know then, it probably still is the right way to do it - I just happen to touch some of the more cryptic parts of the language. |
05:18:29 | Zevv | compiled type based on runtime data - elaborate? |
05:20:43 | disruptek | i'm going to supply some type translations, but i want to be able to let the user define their own. however, those definitions rely upon arbitrary data, so while i started off wanting to do this with simple generics, i couldn't figure out where the line gets drawn. |
05:21:27 | Zevv | down the rabbit hole you go |
05:21:38 | disruptek | i was trying to make generics with a static type, so probably the wrong route. i think i need to use a macro to define everything and then the user can compose their own ad hoc. |
05:22:37 | * | narimiran joined #nim |
05:24:29 | Zevv | sounds a bit like what I'm trying to do here yes |
05:25:09 | disruptek | hey, is there a way for me to compose an npeg pattern with a full string acting as an atom? |
05:25:20 | disruptek | ie. one i supply? |
05:25:24 | disruptek | dynamically. |
05:32:26 | * | solitudesf joined #nim |
05:33:51 | disruptek | the problem with watching the jai dev stream is you really have no freakin' clue what is going on in the code, you have no access to the source, and it's written in a language only one person knows. |
05:38:55 | FromGitter | <Varriount> disruptek: Regarding npeg, could you explain? |
05:39:58 | FromGitter | <Varriount> Do you mean this? https://github.com/zevv/npeg/issues/7 |
05:40:59 | * | absolutejam joined #nim |
05:41:34 | disruptek | i parse a simple pattern at one point, to perform variable substitution in path patterns/{like}/this where `{like}` represents a variable named `like`. |
05:42:09 | disruptek | then i get a path like patterns/something/this and i want to validate it against the original source pattern. |
05:42:42 | disruptek | i'm doing this with a just a few lines of handwritten nim at the moment, but i'd rather trust npeg. |
05:44:05 | disruptek | this just seems like a trivial problem that i've made more complex: https://github.com/disruptek/openapi/blob/master/paths.nim#L51 |
05:44:44 | FromGitter | <Varriount> disruptek: That sounds |
05:45:05 | FromGitter | <Varriount> Gah, stupid mobile client |
05:45:26 | FromGitter | <Varriount> disruptek: Can you give an example of the text to match? |
05:46:45 | disruptek | source pattern: "/pattern/{foo}/example" |
05:47:04 | disruptek | sample input to match: "/pattern/hello-world/example" |
05:47:36 | FromGitter | <alehander42> wow i used to do something like that |
05:47:41 | FromGitter | <alehander42> for my web lib |
05:47:48 | FromGitter | <alehander42> but i do it in a very naive way currently |
05:48:19 | disruptek | my naive code works on thousands of existing apis, so it's not as though it needs replacing. i just find it kinda ugly. and it's mostly asserts. :-P |
05:48:22 | FromGitter | <alehander42> i still think validation is not enough: you want to capture right |
05:49:06 | disruptek | i don't need to capture it, i don't think, but i already caught the variables (and the constants, because they may composition easier). so, solved problem there. |
05:49:39 | disruptek | s/may/make/ |
05:52:34 | FromGitter | <alehander42> but you capture foo="hello-world" |
05:54:47 | disruptek | no, i capture "/pattern/"->const[1], "foo"->vars[0], "/example"->const[1] and then i validate that "/pattern/hello-world/example" matches the capture. |
05:56:01 | disruptek | there's an api for the api, you see, and i'm trying to validate it (the api as input) before i run off and spew a nim api for an api that doesn't match the api api. |
05:56:49 | disruptek | anyway, it's boring. it was just an idle question i had since zevv appeared to be active at the time. 😁 |
06:12:00 | Zevv | zevv was walking the dog :) |
06:13:11 | Zevv | make that "making an early morning hike", sounds more adventurous |
06:14:30 | * | kuon joined #nim |
06:14:58 | * | kuon__ quit (Ping timeout: 248 seconds) |
06:37:57 | * | absolutejam quit (Ping timeout: 245 seconds) |
06:52:37 | FromGitter | <awr1> stack overflow recommended me a question in the sidebar: "Can't understand how static works exactly" |
06:52:54 | FromGitter | <awr1> i don't think anyone using c++ understands just what on earth static is supposed to do /s |
06:56:09 | * | absolutejam joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:05:02 | * | gmpreussner joined #nim |
07:10:36 | FromGitter | <mratsim> I only know about static inline |
07:17:29 | * | floppydh joined #nim |
07:18:10 | FromGitter | <alehander42> sounds pretty interesting disruptek |
07:18:18 | FromGitter | <alehander42> zevv what kind of dog do you have |
07:20:56 | * | salewski joined #nim |
07:22:22 | Zevv | vizsla! |
07:22:28 | salewski | I have no idea what a shallowCopy for a char in a string may be, as in system.insert(): |
07:22:37 | salewski | https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L4009 |
07:22:52 | FromGitter | <arnetheduck> what's the issue with static? it's kind of trivial, makes symbols not be exported from the translation unit / makes stuff declared inside a class not be a method (no this) |
07:28:53 | * | PMunch joined #nim |
07:32:23 | * | salewski quit (Quit: WeeChat 2.4) |
07:36:12 | * | kuon quit (Remote host closed the connection) |
07:56:45 | FromGitter | <alehander42> it's an overloaded term at the very least |
07:56:51 | FromGitter | <alehander42> which is not great |
07:59:48 | FromGitter | <alehander42> also, the global lifetime is a pretty important meaning too |
08:05:20 | FromGitter | <arnetheduck> lol, we had that discussion about nim t he other day, how var is overloaded.. sometimes it means reference, sometimes it means variable, sometimes it's magic-return-value-reference-for-a-while |
08:05:53 | FromGitter | <arnetheduck> @zah was defending it on grounds of keyword scarcity |
08:10:21 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:17:13 | FromGitter | <mratsim> var just means mutable |
08:17:25 | FromGitter | <mratsim> the pass by reference is an implementation detail |
08:17:34 | FromGitter | <alehander42> not sure if the same |
08:17:44 | FromGitter | <alehander42> but yeah, if they can be reasonably similar its ok |
08:17:53 | FromGitter | <alehander42> if they are very different no |
08:17:54 | FromGitter | <awr1> `var`'s usage as the equivalent to c++ pass-by-ref is fine |
08:18:13 | FromGitter | <mratsim> people shouldn't use var to pass by ref an immutable object |
08:18:30 | FromGitter | <mratsim> Nim already does the right thing with big objects even if you don't use var |
08:18:51 | * | hoijui joined #nim |
08:18:59 | FromGitter | <awr1> well yes |
08:19:58 | FromGitter | <awr1> which is why i suppose {.nimcall.} is not strictly defined |
08:22:01 | FromGitter | <arnetheduck> no, var in a parameter means pass-by-reference, unlike `var x = y`.. var in return means return-by-referece-until-lexical-scope-end |
08:22:51 | FromGitter | <mratsim> but the goal is mutation |
08:23:14 | FromGitter | <mratsim> both in parameter passing or as a return value |
08:23:40 | FromGitter | <mratsim> obviously to mutate you need a memory location but that's implementation detail |
08:24:12 | FromGitter | <arnetheduck> nonetheless, `var x=y` makes a copy, the other does a reference.. and `var x = f()` for `proc f(): var int` does a copy too :) |
08:25:09 | FromGitter | <awr1> how does the compiler determine what to internally pass by ref? is it like `{.byRef.}`and maybe some `sizeof` heuristic |
08:25:24 | FromGitter | <arnetheduck> sizeof essentially |
08:27:11 | FromGitter | <awr1> i'm trying to wonder why C++ never at least tried to do something similar for non-exportable functions |
08:27:25 | FromGitter | <awr1> but i guess it's because C++ is a mess plus the spec is too rigid |
08:29:38 | FromGitter | <arnetheduck> try to do what - pass by ref? c++ is pretty flexible about that, specially because it allows copy and move elision which means that it can do tricks like this |
08:30:30 | FromGitter | <awr1> wait yeah i'm dumb |
08:30:37 | FromGitter | <awr1> i forgot about move semantics |
08:31:32 | FromGitter | <arnetheduck> well, pass-by-ref is different - move has a cost that usually is higher than copying a pointer |
08:32:09 | FromGitter | <arnetheduck> in this case it's the elision semantics that make it work - it worked in pre-move c++ as well |
08:33:11 | * | krux02 joined #nim |
08:34:04 | FromGitter | <mratsim> The heuristics is, if the value type is bigger than 3 pointer sizes (so 12 bytes on 32-bit or 24 bytes on 64-bit) it's passed by pointer |
08:34:13 | FromGitter | <awr1> elision i mean |
08:34:23 | FromGitter | <mratsim> you can fix the behaviour with byref, bycopy pragmas attached to the type |
08:35:27 | FromGitter | <awr1> plus the whole return value elimination or w/e it's called |
08:35:32 | FromGitter | <mratsim> RVO |
08:35:35 | FromGitter | <awr1> yeah |
08:35:45 | FromGitter | <mratsim> if you construct in the result directly you have RVO |
08:36:36 | FromGitter | <mratsim> "result.foo = 1" gives you RVO ⏎ "result = Foo(foo: 1)" probably doesn't (unless C compiler help) |
08:39:58 | FromGitter | <awr1> i wish C/C++ compilers could do optimizations on struct layout if asked for (via a pragma or attrib or something). obviously "they can't by default" b/c that would betray the spec |
08:40:05 | FromGitter | <arnetheduck> just use `f(x): X = X(...)` - gives you RVO and none of that result sillyness |
08:40:14 | FromGitter | <awr1> although that sort of thing might require profile guidance |
08:40:42 | FromGitter | <arnetheduck> `rust` on purpose doesn't specify struct ABI by default, for that reason btw |
08:40:55 | FromGitter | <awr1> oh interesting |
08:41:11 | FromGitter | <mratsim> @arnetheduck I actually think it doesn't give you RVO, but last time I checked that was on 0.17.2 |
08:41:38 | FromGitter | <mratsim> I had a memset on the result and on the X() object |
08:41:42 | * | absolutejam quit (Ping timeout: 245 seconds) |
08:41:55 | FromGitter | <mratsim> very annoying when it involves seq |
08:42:15 | FromGitter | <arnetheduck> the memset is there regardless - as soon as nim passes by ref it adds an extra memset - it's a bug actually, there's one memset too many |
08:42:18 | FromGitter | <mratsim> which was why I had noinit all over the place |
08:43:28 | FromGitter | <arnetheduck> would probably have to check again, I noted it when doing the equivalent `nlvm` code.. in fact, the codegen there would do well to add restricts and stuff - then there's the question of who does the reset - caller or callee etc |
08:44:01 | FromGitter | <awr1> how usable is nlvm right now? |
08:45:57 | FromGitter | <mratsim> Araq said that he will add restrict at one point. He also said that it was a silly workaround ¯\_(ツ)_/¯ |
08:46:33 | FromGitter | <arnetheduck> the important thing to remember though is that `result` was made to implement RVO, but it's not actually needed, one can do both NRVO and RVO without. so the reason now is basically... @Araq likes to have an extra implicit variable in there to encorage the writing shitty code that risks partial initialization bugs, and thinks it's hard for programmers to write `var result: T` in their proc body because it will make |
08:46:33 | FromGitter | ... their already bad code a bit worse :) |
08:47:31 | FromGitter | <awr1> result is useful syntactic sugar |
08:48:37 | * | shomodj joined #nim |
08:48:55 | FromGitter | <awr1> it's one of those things that are "cute" and it's easy to live without them, but it's nice to have them anyway |
08:49:15 | FromGitter | <arnetheduck> yeah it's great. you get a reserved variable name which gives you a total of 3 ways to return a value so that you have plenty to choose from.. of those, using result and partially initializing (`result.x = a; result.y = b`) is the only one that the compiler has a hard time analyzing, ensuring that you've fully constructed your object. great. |
08:50:13 | FromGitter | <mratsim> don't edit with a IRC/discord/matrix bridge |
08:52:54 | FromGitter | <awr1> i mean i know where you're coming from but that doesn't seem like that big of a deal to me so as long as you deal with return values within the context of a single proc consistently |
08:54:50 | FromGitter | <awr1> there are a million and a half ways to shoot yourself in the foot with every language, which i suppose leaves "which 'useful features' are actually a net loss" a matter of...something you have to "feel for," i guess? |
09:02:58 | * | aexoxea joined #nim |
09:08:31 | * | rokups joined #nim |
09:08:46 | FromGitter | <arnetheduck> > how usable is nlvm right now? ⏎ ⏎ works on linux for most things, unless you use c++ / emit / don't specify correct abi.. ie can compile itself |
09:09:09 | FromGitter | <arnetheduck> right, no editing. bridges.. sigh |
09:09:12 | * | Lord_Nightmare quit (Ping timeout: 245 seconds) |
09:09:52 | * | Lord_Nightmare joined #nim |
09:14:32 | * | kamranation[m] joined #nim |
09:15:27 | * | kamranation[m] left #nim (#nim) |
09:17:11 | * | sammich quit (Read error: Connection reset by peer) |
09:17:43 | * | sammich joined #nim |
09:17:43 | * | sammich quit (Changing host) |
09:17:43 | * | sammich joined #nim |
09:31:28 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:41:52 | lqdev[m] | is it safe to create a thread as a variable right before an infinite loop, or does the thread have to be a global variable? |
09:42:39 | lqdev[m] | iirc all threads should be global, which I definitely do not like |
09:43:08 | * | Vladar joined #nim |
09:46:26 | * | theelous3 joined #nim |
09:48:29 | lqdev[m] | all I need the thread to do is call a proc in a while true loop, so that the main thread remains free to do OpenGL stuff |
09:57:17 | * | shomodj joined #nim |
10:04:34 | * | MrAxilus[m] quit (Write error: Connection reset by peer) |
10:04:35 | * | zielmicha[m]1 quit (Remote host closed the connection) |
10:04:39 | * | mattisme quit (Write error: Connection reset by peer) |
10:04:40 | * | TheManiac[m] quit (Read error: Connection reset by peer) |
10:08:00 | * | spymasterd[m] quit (Ping timeout: 252 seconds) |
10:08:03 | * | gh0st[m] quit (Ping timeout: 252 seconds) |
10:08:04 | * | Connor[m] quit (Ping timeout: 252 seconds) |
10:08:07 | * | meff[m] quit (Ping timeout: 250 seconds) |
10:08:07 | * | BaldEagleX02[m] quit (Ping timeout: 250 seconds) |
10:08:09 | * | johnjane[m] quit (Ping timeout: 248 seconds) |
10:08:21 | * | yglukhov[m] quit (Ping timeout: 252 seconds) |
10:08:21 | * | k0mpjut0r quit (Ping timeout: 252 seconds) |
10:08:27 | * | skrylar[m] quit (Ping timeout: 250 seconds) |
10:08:28 | * | planetis[m] quit (Ping timeout: 250 seconds) |
10:08:33 | * | narimiran[m] quit (Ping timeout: 265 seconds) |
10:08:37 | * | leorize[m] quit (Ping timeout: 265 seconds) |
10:08:42 | * | nergal[m]1 quit (Ping timeout: 252 seconds) |
10:08:50 | * | macsek1911[m] quit (Ping timeout: 276 seconds) |
10:08:50 | * | xomachine[m] quit (Ping timeout: 276 seconds) |
10:08:50 | * | Miguelngel[m] quit (Ping timeout: 276 seconds) |
10:08:50 | * | isaac[m] quit (Ping timeout: 276 seconds) |
10:08:50 | * | Demos[m] quit (Ping timeout: 276 seconds) |
10:09:04 | * | GitterIntegratio quit (Ping timeout: 264 seconds) |
10:09:08 | * | lqdev[m] quit (Ping timeout: 248 seconds) |
10:09:28 | * | BitPuffin quit (Ping timeout: 276 seconds) |
10:09:28 | * | Swednec8 quit (Ping timeout: 276 seconds) |
10:09:41 | FromGitter | <mratsim> shouldn't the GPU do OpenGL stuff? |
10:09:47 | * | gangstacat joined #nim |
10:14:52 | * | sealmove joined #nim |
10:14:54 | * | shomodj_ joined #nim |
10:15:53 | sealmove | Araq, dom96: I have a complication with forum account. I couldn't activate it so I deleted it and tried to re-create it, and not I get an error "Invalid ident hash". |
10:18:22 | * | shomodj quit (Ping timeout: 245 seconds) |
10:28:06 | * | dddddd joined #nim |
10:31:39 | FromGitter | <mratsim> activation is a bit flaky, I activate people's account manually when I notice |
10:37:34 | * | stefanos82 joined #nim |
10:38:07 | sealmove | ah, shouldn't have deleted account then :| |
10:40:14 | * | clyybber joined #nim |
10:47:40 | * | Connor[m] joined #nim |
10:56:14 | * | hoijui quit (Quit: Leaving) |
11:09:02 | * | BitPuffin joined #nim |
11:09:02 | * | TheManiac[m] joined #nim |
11:09:03 | * | Demos[m] joined #nim |
11:09:03 | * | k0mpjut0r joined #nim |
11:09:03 | * | isaac[m] joined #nim |
11:09:03 | * | GitterIntegratio joined #nim |
11:09:03 | * | leorize[m] joined #nim |
11:09:03 | * | mattisme joined #nim |
11:09:03 | * | gh0st[m] joined #nim |
11:09:03 | * | nergal[m] joined #nim |
11:09:04 | * | Swedneck2 joined #nim |
11:09:04 | * | MrAxilus[m] joined #nim |
11:09:10 | * | spymasterd[m] joined #nim |
11:09:10 | * | planetis[m] joined #nim |
11:09:10 | * | johnjane[m] joined #nim |
11:09:10 | * | meff[m] joined #nim |
11:09:10 | * | xomachine[m] joined #nim |
11:09:10 | * | zielmicha[m]1 joined #nim |
11:09:10 | * | yglukhov[m] joined #nim |
11:09:11 | * | narimiran[m] joined #nim |
11:09:11 | * | skrylar[m] joined #nim |
11:09:13 | * | Miguelngel[m] joined #nim |
11:09:13 | * | lqdev[m] joined #nim |
11:09:47 | * | macsek1911[m] joined #nim |
11:09:47 | * | BaldEagleX02[m] joined #nim |
11:23:21 | clyybber | Araq: I found a real issue in the current spec/design, which is easily fixable. |
11:23:52 | clyybber | Just ping me when you are here |
11:30:51 | * | lqdev[m] quit (*.net *.split) |
11:30:52 | * | skrylar[m] quit (*.net *.split) |
11:30:52 | * | planetis[m] quit (*.net *.split) |
11:30:52 | * | TheManiac[m] quit (*.net *.split) |
11:30:52 | * | GitterIntegratio quit (*.net *.split) |
11:32:20 | * | yglukhov[m] quit (*.net *.split) |
11:36:34 | * | ryukophone quit (Ping timeout: 276 seconds) |
11:37:04 | * | lqdev[m] joined #nim |
11:37:04 | * | skrylar[m] joined #nim |
11:37:04 | * | planetis[m] joined #nim |
11:37:04 | * | GitterIntegratio joined #nim |
11:37:04 | * | TheManiac[m] joined #nim |
11:38:06 | * | yglukhov[m] joined #nim |
11:43:44 | * | ryukophone joined #nim |
11:49:52 | * | ryukophone quit (Ping timeout: 264 seconds) |
11:50:19 | * | ryukophone joined #nim |
12:04:16 | * | dddddd quit (Remote host closed the connection) |
12:05:32 | * | dddddd joined #nim |
12:13:55 | * | aexoxea quit (Quit: Goodbye!) |
12:19:59 | * | fvs joined #nim |
12:25:44 | fvs | hi, I'm having a problem with parameter substitution using db_postgres. floats added to ? as in ('POINT(? ?)' comes across as 'float' as in ...('POINT('-97.398444' '33.0365... Any ideas? |
12:31:37 | fvs | here code snippet and error: https://pastebin.com/xaQ0KkFd |
12:39:47 | shashlick | https://github.com/nim-lang/Nim/pull/11814 is now green |
12:45:13 | narimiran | https://github.com/nim-lang/Nim/pull/11814 is now merged |
12:48:37 | shashlick | Thanks @narimiran |
12:54:19 | * | skelett joined #nim |
12:57:00 | krux02 | sealmove, clyybber, hey it is pointless to adress Araq right now, he is on vacation |
12:57:57 | krux02 | I will remind him that he should probably log out, or write a bot that automatically replies that he is on vacation. |
12:58:03 | disruptek | i wish our president worked as hard as araq does when he's "vacationing". the orange man spends most of his time at his golf clubs. |
12:58:35 | krux02 | I am happy that he is not my president. |
12:58:44 | PMunch | krux02, +1 |
12:58:53 | krux02 | I feel sorry for the united states |
12:59:23 | PMunch | Looking around other countries I'm sorry for quite a few of them |
12:59:37 | krux02 | yea |
12:59:51 | krux02 | Russia, Turkey, North Korea |
12:59:53 | PMunch | Norway has some nuts as well, but at least they don't seem to be getting a lot of power.. |
12:59:58 | PMunch | UK? |
13:00:01 | FromGitter | <alehander42> looks at the balkans "guys.." :D |
13:00:43 | * | sagax quit (Ping timeout: 244 seconds) |
13:00:50 | FromGitter | <alehander42> western europe was always viewed as a shining example here |
13:01:04 | krux02 | and mr Orange President really tries to be best friend with Putin and Kim, but he refuses to shake hand with Merkel. |
13:01:08 | FromGitter | <alehander42> (but this changed a bit in the last several years) |
13:01:18 | Zevv | dudes. politics, really? |
13:01:28 | krux02 | yea |
13:01:29 | Zevv | weather if fine, dogs are ok, but please |
13:01:33 | FromGitter | <alehander42> netherlands doesnt have funny politics you jelly |
13:01:46 | Zevv | ha |
13:01:54 | FromGitter | <alehander42> oh man, one of the biggest political scandals in our country was about dogs |
13:01:56 | FromGitter | <alehander42> last month |
13:02:12 | FromGitter | <alehander42> so dogs can be political! |
13:02:12 | Zevv | not my dog. not my back yard. |
13:02:16 | disruptek | i mean, it was really a comment about "our" bdfl, but... https://www.trumpgolfcount.com/ |
13:02:18 | shashlick | move to offtopic? |
13:02:50 | PMunch | Well there isn't much going on here |
13:03:04 | krux02 | why is it so expensive when he is golfing? |
13:03:10 | disruptek | anyway, i managed to break to naive validator. |
13:03:21 | krux02 | I mean half a million for playing golf once? |
13:03:23 | PMunch | krux02, secret service |
13:03:29 | disruptek | krux02: opportunity cost, without respect to the obvious. |
13:03:38 | PMunch | Costs a lot to provide security for such a large open area |
13:03:48 | * | nsf quit (Quit: WeeChat 2.4) |
13:04:06 | disruptek | it might be cheaper if fewer people wanted to assassinate him. |
13:04:13 | * | disruptek 🤷 |
13:05:18 | shashlick | any glaring nimble issue that needs fixing? |
13:06:04 | krux02 | I think you should give mr president a virtual Golf environment in his Office and a fake Phone without internet that simulates controversy whenever he tweets something. |
13:06:24 | * | sagax joined #nim |
13:06:42 | narimiran | a new channel is needed: #nim-politics |
13:07:07 | disruptek | so anyway, i'm back to trying to replace greedy regexp. ;-) |
13:07:20 | krux02 | I think these off topic channels are really pointless. |
13:07:26 | FromGitter | <alehander42> nope |
13:07:32 | FromGitter | <alehander42> it's there, it's one command away |
13:07:33 | krux02 | nobody goes there |
13:07:42 | krux02 | you need channels for specific topics. |
13:07:55 | disruptek | community cannot exist in a purely technical context. |
13:07:56 | FromGitter | <alehander42> i often talk with people in the offtopic channel |
13:08:00 | FromGitter | <alehander42> very often |
13:08:10 | krux02 | I don't |
13:08:13 | FromGitter | <alehander42> maybe thats why nobody goes there |
13:08:25 | disruptek | they are afraid to talk to you? |
13:08:35 | disruptek | they only want to talk to krux02? |
13:08:37 | Zevv | he only wants to talk dogs :) |
13:08:38 | FromGitter | <alehander42> i think specific channels are overkill: they would be even emptier |
13:09:05 | FromGitter | <alehander42> maybe slack-like threads would be better |
13:09:12 | FromGitter | <alehander42> btw gitter *are* adding those |
13:09:17 | krux02 | Most of the time I only talk when people directly ask me a question That was different before I worked for Nim. |
13:09:20 | FromGitter | <alehander42> but iirc they are still in beta |
13:09:38 | disruptek | anyone used zulip? zulipchat.com |
13:09:50 | FromGitter | <alehander42> you can create krux_secret_04 |
13:10:07 | FromGitter | <alehander42> i tried to assess it for use in my job |
13:10:13 | FromGitter | <alehander42> it seemed pretty good |
13:10:24 | krux02 | disruptek, I just looked it up, and the claim "The world’s most productive team chat" really bothers me. |
13:10:36 | FromGitter | <alehander42> but havent moved to it yet (i basically bancrupt the slack free plan as i post too many short messages) |
13:10:56 | krux02 | if you make such claims, then provide a like to the source of that information. |
13:11:00 | FromGitter | <alehander42> marketing speak is inevitable |
13:11:18 | disruptek | it's something nim could do with a little more, distasteful as it is. |
13:11:43 | disruptek | alehander42 alone doubled my irc bill when i started hanging out in #nim. |
13:13:04 | narimiran | krux02: you might be bothered, but for one krux02 there are 1000s of other people who don't feel that way. (hint: look at the vlang) |
13:13:40 | krux02 | honestly I don't get the point of vlang. |
13:14:09 | krux02 | Yea it is yet another programming language. But I don't understand what makes it structurally better than what we already have. |
13:14:12 | narimiran | vlang is currently sitting at 10k github stars. how many does "honest nim" have? |
13:15:17 | FromGitter | <alehander42> disruptek: haha |
13:15:20 | krux02 | The point is, we don't need to lie about Nim features to make Nim more popular. |
13:15:47 | narimiran | that's true and i agree that nim's features should speak for themselves |
13:15:48 | FromGitter | <zah> I think Nim's web-site can do much better job at telling what makes Nim unique though |
13:15:49 | FromGitter | <alehander42> i can send you post marks |
13:15:50 | krux02 | Nim has great, even outstanding features, that no other language that I ever took a look at provides. |
13:16:02 | krux02 | They are just not used to sell Nim. And that is really bothering me. |
13:16:53 | narimiran | here's an example: we now have HCR, right? where are the flashy examples? |
13:17:04 | shashlick | i think # of users is going up slowly |
13:17:06 | FromGitter | <zah> Even the very old web-site created by Araq was telling the story better. If I stumble on Nim's web site today with fresh, I may even pass it as "oh, just anoter ooc" |
13:17:20 | narimiran | vlang has it and it has made a simple example where a color of a rectangle changes - people are impressed by it |
13:17:26 | shashlick | but the recent article also summed up nim as not ready, it's kind of bogus |
13:17:29 | narimiran | people are not impressed by reading manual.rst |
13:18:18 | krux02 | I think we should sell Nim as the typed macro programming language. |
13:18:32 | FromGitter | <alehander42> i think the most impressive thing at this stage would be 3rd party projects: various libs/tools written in nim getting reddit/HN readers to notice it |
13:18:44 | livcd | shashlick: what article? |
13:19:01 | FromGitter | <alehander42> at least i see so many of those for go/rust and people are like "oh i should try to write something like that/research this" |
13:19:03 | krux02 | because that is what it can do very well, and that is also what sets it apart from any other programming language out there. Everything else is details. |
13:19:19 | disruptek | well, i am looking to hire a couple people this year to write nim. i am not sure how to go about that, but i think i want to try streaming daily to try to attract like-minded devs. |
13:19:24 | narimiran | livcd: https://www.infoq.com/articles/got-nim/ |
13:19:41 | disruptek | i really didn't like that article. |
13:19:58 | narimiran | krux02: according to you, out of 1000 randomly chosen programmers, how many of them are interested in that topic? |
13:20:16 | shashlick | it was such a mixed article |
13:20:26 | shashlick | usual 1.0 will save the world nonsense |
13:20:54 | krux02 | disruptek, don't try to hire people who can program Nim. Try to hire people who know C++ or are attracted to more exotic programming lanugages such as haskell or clojure. If you know programming Nim is not hard to learn at all. |
13:20:58 | disruptek | thing is, the whole promise of nim is its bare-metal metaprogramming. the power is there to blow everything else out of the water. |
13:21:22 | krux02 | Nim doesn't invent programming, it just enables styles of programming that would not be possible in other languages. |
13:21:31 | shashlick | and he quotes @dom96 from a 2.5 year old reddit thread |
13:21:47 | krux02 | Yea and certain styles of programming are just broken in Nim (combinining all features of Nim at the same time). |
13:22:42 | disruptek | clojure is my lisp of choice, so, yeah, but really i'm looking for people who are signed up on the goal of the project, and i want to advertise nim as a cool way to work. |
13:23:08 | krux02 | well, Nim isn't popular enough to work that way. |
13:23:30 | disruptek | that's what we're trying to change. ;-) |
13:23:32 | FromGitter | <zah> @disruptek, what kind of project do you have in mind? |
13:23:53 | krux02 | I heared of a company trying to hire D programmers. They just hired C++ programmers and then afterwards they found out that it was about D. |
13:24:18 | livcd | that's not a good strategy |
13:25:20 | FromGitter | <alehander42> krux02: other languages start to catch up a bit with macros: rust already have powerful macros as well e.g.: https://www.reddit.com/r/rust/comments/cguo6e/announcing_macro_that_makes_async_fn_in_traits/ (or the typed html macro) |
13:25:44 | disruptek | i'm building a product search that uses semantic data to suggest or ask the user pointed questions to help them find stuff. |
13:26:01 | FromGitter | <alehander42> i agree that most of those macro systems are not as easy to use / powerful as nim's , but its not an absolutely unique feature |
13:26:38 | krux02 | alehander42: I don't understand reddit. |
13:26:45 | disruptek | it plugs into an existing product i built a few years ago and received a patent on last year, which is already monetized. |
13:26:49 | FromGitter | <zah> nevertheless, I agree with @krux02 that the meta-programming should be our primary selling point |
13:27:02 | disruptek | exactly. |
13:27:05 | FromGitter | <zah> and eventually safety when we close the gap with Rust |
13:27:05 | krux02 | all I see is a bold claim again and then some people cheering, "WOW ... how awesome is that" |
13:27:19 | krux02 | would be an episode of dragonball Z |
13:27:46 | livcd | Even large companies are willing to bet on a super niche language if it solves their problems |
13:27:53 | FromGitter | <alehander42> krux02 i had to link the article, sorry: but still, it makes sense: other language users find out macros are very useful and say "awesome" |
13:28:01 | livcd | by large i mean old enterprise companies |
13:28:02 | disruptek | sure, you can do similar stuff in lisp, but not at anywhere near the same speed or with anything like the same ffi. |
13:28:11 | * | shomodj joined #nim |
13:28:25 | FromGitter | <alehander42> disruptek oh so thats why you are building the openapi tools |
13:28:34 | krux02 | before I started with Nim, I did try out Rust. The macros were, well, I would not call them macros. |
13:28:46 | FromGitter | <alehander42> krux02: but their macro system evolved a *lot* since then |
13:28:52 | disruptek | yeah, but openapi could be a bit of a gamechanger for nim if it's done really well. |
13:28:56 | krux02 | what can Rust macros do by now? |
13:29:16 | FromGitter | <alehander42> they have procedural macros (which run CT code) working on token streams which in some cases are more powerful, in some senses less |
13:29:39 | FromGitter | <alehander42> e.g. this means you can even design your own syntax if it can be lexed by rust |
13:29:57 | disruptek | how 2004. |
13:29:57 | FromGitter | <alehander42> but it has other limitations(and usually AST is much easier to write for) |
13:30:06 | krux02 | well, that is neat, but still, they are not typed like in Nim. |
13:31:07 | FromGitter | <alehander42> the best example is html-like typed dsl : https://github.com/bodil/typed-html |
13:31:22 | leorize | looking at nim-lang.org, there's only one example attempting to show off macros, but it doesn't show how you can make cool DSLs in Nim |
13:31:30 | FromGitter | <alehander42> well, i am not sure about `typed`, sorry, probably youre right |
13:32:06 | disruptek | that looks like the nim source code filter. 😀 |
13:32:13 | FromGitter | <zah> yes, the big difference is that Nim's macro interact fully with the type system (i.e. they participate in overloading) |
13:32:20 | * | shomodj_ quit (Ping timeout: 268 seconds) |
13:32:24 | FromGitter | <arnetheduck> I suspect if anything, nim has a future as a fast python - convenient to hack stuff together quickly, easy on the programmer, but still ok performance |
13:32:34 | krux02 | zah: that is the selling point. |
13:32:51 | leorize | but we don't sell it, at least not on the front page |
13:33:10 | FromGitter | <arnetheduck> systems programming, well, I'm not sure "very clever macros, let's hope you understand them" is a selling point there - safety tends to be however |
13:33:13 | * | HP-YC9 joined #nim |
13:33:32 | disruptek | thing is, if you code in dynamic languages for awhile, you get used to hacking that way. to be able to write the same sort of constructs and have it run at bare-metal speeds is huge. |
13:33:35 | FromGitter | <arnetheduck> same for cryptography. fancy macros? no. safe from memory corruption and overruns? yes. allocation-free? yes. |
13:33:37 | FromGitter | <alehander42> yeah, i suspect some other small languages also have similarly capable macro systems, as CT code is indeed popular for modern languages, but the mainstream ones do not afaik |
13:34:25 | FromGitter | <alehander42> i dont quite agree, macros are a selling point for rust and its main usage is system stuff |
13:34:26 | FromGitter | <arnetheduck> ctfe is nothing special these days |
13:34:52 | FromGitter | <alehander42> (talking about macro + type overloading ^) |
13:34:52 | FromGitter | <zah> @arnetheduck, meta-programming is everywhere. how about automatically lifting Merkle-proof verfiers from high-level code? |
13:35:38 | FromGitter | <arnetheduck> well, they'll be happier if the compiler formally verifies that their code is XXX-free for a large set of properties XXX |
13:36:18 | FromGitter | <zah> it's no coincidence that the languages used for proving things have a type system even more complicated than Nim's |
13:37:12 | FromGitter | <zah> I'm pretty sure I can prove more program properties in Nim than in Rust |
13:37:31 | FromGitter | <zah> albeit, still not the most important ones at the moment :) |
13:38:00 | disruptek | especially as more dfa comes online. |
13:38:30 | FromGitter | <arnetheduck> convenience for the programmer however is what entire nim smells of.. the library and the compiler are not beautifully composed from a core set of axioms and theories - they've been mashed together with a hammer and there's bits and pieces sticking out here and there - every module looks different depending on which era of nim features it comes from - it smells of pragmatic craftsmanship, not theoretical beauty |
13:39:28 | disruptek | you think this, the first stdlib impl, is turning people off from realizing the last stdlib impl? |
13:40:37 | shashlick | I think you are overestimating most programmers who just want to get things done and do glue code |
13:41:00 | livcd | most businesses want to get things done |
13:41:10 | shashlick | they want a library and call a few functions here and there |
13:41:26 | shashlick | who needs macros for that? |
13:41:29 | FromGitter | <arnetheduck> well, and that's a strength for nim - it doesn't get in the way of that |
13:41:29 | FromGitter | <zah> anyway, in Marketing, the rule of the land is "differentiate or die". Nim's differentiation is its meta-programming capabilities. Perhaps you are just not the right buyer :) That' still helpful to us, as we get a fresh perspective from time to time though |
13:41:39 | krux02 | shashlick, well yes those programmers exist. And then there those programmers who care about what they write. Those two types of people don't get along. |
13:41:49 | shashlick | so if you want mass adoption, you cannot highlight macros and performance and stuff like that |
13:41:56 | disruptek | rich, powerful, performant libs can come later. it's not like we have to carry weight in the stdlib. |
13:42:14 | krux02 | shashlick: we don't want mass adoption. |
13:42:44 | krux02 | We want adoption from people who count. |
13:43:29 | krux02 | getting a foundation of projects that people rely upon. Then we can talk about mass adoption. |
13:43:36 | shashlick | then it will be a small community cause most people who do python don't know much beyond a 2 week crash course and stack overflow |
13:44:26 | krux02 | I am ok with a small community. As long as the community is healthy, stable and focussing on the right things. |
13:44:29 | livcd | The tools (Nim) do not really matter that much only what you can do with them |
13:44:53 | FromDiscord_ | <Avatarfighter> Quick question, I was trying out the jsffi module to wrap the jquery `$(#)` function but when I tried to compile my code for the js backend I get an error that says "invalid extern name: '$(#)'. (Forgot to escape '$'?)". I'm not sure what is incorrect about my code since I only have two lines, one that imports jsffi into the file and the other that show import the `$(#)` function which i got from https://nim-lang.org/docs/jsffi.html |
13:45:01 | FromDiscord_ | <Avatarfighter> Also howdy everyone ! |
13:45:14 | krux02 | hello |
13:45:58 | * | sealmove quit (Quit: WeeChat 2.5) |
13:46:40 | FromDiscord_ | <Avatarfighter> I also have to add on to my question that I tried making the pragma a raw literal via doing `{. importcpp: r"$(#)" .}` and I also tried making it a cstring due to me running out of options |
13:48:25 | FromDiscord_ | <Avatarfighter> im a bit perplexed as to how to remedy this issue, any suggestions or ideas will bring me one step closer haha 😃 |
13:48:52 | leorize[m] | # in importcpp means the first argument |
13:49:21 | FromGitter | <alehander42> usually you can wrap JQuery |
13:49:28 | FromGitter | <alehander42> jQuery * |
13:49:29 | FromGitter | <alehander42> its an alias for $ iirc |
13:49:43 | dom96 | arnetheduck: I was discussing Nim with a few people that are trying out Rust in my office yesterday, and I realised that I have no idea why Status chose Nim. Can you shed some light? |
13:49:46 | FromGitter | <alehander42> but your question is still valid |
13:52:00 | shashlick | @krux02 sounds good to me - fact is that anyone who chooses Nim will become a better programmer but it is hard path since most folks are average |
13:52:37 | shashlick | So things that are most appealing are performance, compile time checks and small binary |
13:52:44 | FromGitter | <alehander42> krux02: if this is about 3rd party libs with mass adoption, you will have projects with good and bad quality and people will be able to to depend on the stable one-s: thats how it works in all succesful language: ⏎ ⏎ a small community probably can't create a big/feature-full enough foundation imho |
13:53:21 | krux02 | small binary really isn't important at all. |
13:53:24 | FromGitter | <arnetheduck> well, eth researchers are using python so there's syntactic convenience. there's also the opportunity to grow the language together with the project, and the simple fact that it wasn't "taken" by any other ethereum project - of the languages that are "good enough" |
13:53:41 | FromGitter | <alehander42> and @krux02 this attitude leads to stuff like the haskell ecosystem imo |
13:53:42 | shashlick | @dom96 while you are here - which nimble defect is your highest priority |
13:53:49 | FromGitter | <alehander42> which is not something you or me would use probably |
13:53:54 | FromGitter | <alehander42> so much |
13:54:27 | shashlick | @krux02 it is for any scripting language |
13:54:42 | * | hoijui joined #nim |
13:55:02 | dom96 | shashlick high pri issues (if there are any left?) |
13:55:05 | krux02 | I didn't program haskell beyond the university exercises, so what is the problem with the Haskell ecosystem? |
13:55:17 | shashlick | There are many so wanted your opinion |
13:55:24 | shashlick | I was going thru one at a time |
13:55:28 | FromGitter | <arnetheduck> there's a certain boldness to status' decision as well - it's not a decision a rational company doing a product for money would necessarily take - given that we have to write practically *every single part* from scratch |
13:55:55 | FromGitter | <alehander42> well, i've heard a lot of opinions that a lot of the libs are kinda over-engineered / under-document / a bit hard to understand |
13:55:56 | FromGitter | <arnetheduck> upside of being funded the way we are though, with an explicit goal to stimulate public good |
13:56:20 | FromGitter | <alehander42> as experts are so good at writing such code, that its often hard for them to make it easy to use for everyone |
13:56:36 | FromGitter | <alehander42> at least in a language with a type system as extensible as haskells |
13:57:54 | krux02 | I have a feeling that Haskell isn't really used outside of universities with theoretical problems to solve. The only real problem Haskell can do well is implement a compiler. |
13:58:01 | FromGitter | <alehander42> but thats very anecdotical, so i am probably wrong |
13:58:05 | dom96 | I see. That's interesting. |
13:58:16 | FromGitter | <alehander42> eh, people use it for various business-es afaik |
13:58:36 | krux02 | well maybe. |
13:58:45 | krux02 | Haskell is not tho worst language to choose. |
13:58:46 | dom96 | krux02: That's not the case, FB uses it for example for real problems. |
13:58:56 | krux02 | But I have seen the trend towards overengeneering in Scala. |
13:58:58 | FromGitter | <alehander42> exactly |
13:59:08 | FromGitter | <alehander42> afaik ocaml is often used from the FP-s |
13:59:13 | krux02 | FB? |
13:59:16 | * | fvs left #nim ("WeeChat 1.6") |
13:59:53 | FromGitter | <arnetheduck> haskell is used a lot in finance (thanks to that safety) and data processing (thanks to how functional apporach lends itself to it) |
14:00:32 | krux02 | here this is what I know from the scala overengineering word: https://github.com/scalaz/scalaz |
14:00:58 | FromGitter | <alehander42> jane street is one of the most popular ocaml users/code contributors as well iirc |
14:01:56 | krux02 | I haven't used ocaml, but I have a feeling it is a more grounded Haskell. |
14:03:01 | narimiran | ocaml and F# are brother and sister |
14:03:26 | FromGitter | <alehander42> me as well |
14:03:56 | FromGitter | <alehander42> if i write a project in not nim one day, i'll probably try to stay with ocaml |
14:04:53 | * | PMunch quit (Remote host closed the connection) |
14:06:39 | dom96 | krux02: Facebook |
14:09:18 | krux02 | yea I thought so by now |
14:10:27 | FromGitter | <alehander42> btw any opinions : https://julialang.org/blog/2019/07/multithreading |
14:11:20 | clyybber | I feel like mass-adoption and a massive community is not a good thing most of the time |
14:11:32 | clyybber | Rather a community composed of the "right" people |
14:12:46 | FromGitter | <mratsim> @alehander42 yeah I read that one, related to my multithreading research. It seems like normal work stealing |
14:12:55 | FromGitter | <alehander42> but if you have a big community, it will have more of the "right" people |
14:12:57 | FromGitter | <alehander42> than a small community |
14:13:01 | clyybber | If you attract every person, you will eventually end up with packages like isOdd, and people will use them. |
14:13:03 | FromGitter | <alehander42> and more of all kinds of people |
14:13:06 | FromGitter | <mratsim> you also have more shackles |
14:13:11 | FromGitter | <alehander42> including people that you didnt expect are "right" |
14:13:34 | FromGitter | <alehander42> clyybber, well, all popular languages have big communities, and most dont have isOdd |
14:13:47 | FromGitter | <alehander42> and still javascript is much better now |
14:13:52 | FromGitter | <alehander42> than if it had a small community |
14:14:31 | * | ryukophone quit (Ping timeout: 276 seconds) |
14:14:51 | * | ryukophone joined #nim |
14:14:53 | FromGitter | <alehander42> many many good programmers would not see a need to invest time in writing nim libs/code |
14:14:57 | FromGitter | <alehander42> if it has a small community |
14:15:54 | FromGitter | <mratsim> yes of course |
14:17:32 | FromGitter | <alehander42> every additional person is a good thing for nim imo |
14:18:33 | livcd | alehander42: but what languages that are popular do not have a massive corporate backing? |
14:19:03 | FromGitter | <alehander42> python, ruby, perl, lisp, php all got massively popular |
14:19:03 | krux02 | pleas don't compare anything with javascript. |
14:19:07 | FromGitter | <alehander42> without much backing imo |
14:19:41 | livcd | alehander42: i can only agree maybe with perl or php |
14:19:51 | clyybber | alehander42: But did that popularity really make these languages better? |
14:19:52 | krux02 | well lisp certainly had a lot of backing |
14:20:01 | FromGitter | <alehander42> krux02 this is naive: javascript has a lot of bad stuff, but also a lot of good tech as well |
14:20:18 | FromGitter | <alehander42> it s just a tool which was the only frontend target until last years |
14:20:29 | krux02 | it came from a time where programming without a shit ton of money wasn't even possible. |
14:20:49 | FromGitter | <alehander42> clybber : of course it did, because most of the good tech in those languages came from people that adopted them |
14:20:50 | livcd | alehander42: python's backing is massive, ruby's not so much but still it's pretty big |
14:21:06 | FromGitter | <mratsim> agree with Krux02, we should compare language from afteer the internet boom |
14:21:08 | FromGitter | <alehander42> but thats the point! python's backing is huge *because* it got so popular even without corporate abcking |
14:21:18 | FromGitter | <mratsim> now people are drowning with new languages information and sollicitations |
14:21:52 | FromGitter | <alehander42> ruby: if it didnt manage to get dhh/basecamp, nobody would write rails and make it massive in web |
14:22:02 | krux02 | well, there are also these languages that are just like C but with problem X solved. |
14:22:02 | * | ryukophone quit (Read error: Connection reset by peer) |
14:22:14 | livcd | alehander42: I think it was always pretty huge when Google and alikes started using it |
14:22:22 | * | ryukophone joined #nim |
14:22:27 | FromGitter | <alehander42> livcd: well, exactly |
14:23:01 | clyybber | alehander42: In what way did js become better? |
14:23:13 | krux02 | I think a lot of programming languages should be a good thing, but sadly we did not solve the cross language interface problem. |
14:23:20 | clyybber | It is now easier to write a beautifully extremely bloated website |
14:23:27 | FromGitter | <alehander42> well, the last versions are way better than the previous, and typescript is actually a fine lang itself |
14:23:51 | livcd | clyybber: like the new gmail? |
14:23:52 | krux02 | I want to live in a world where I can be happy when there is a new great rust library, because it will improve my live in Nim. But sadly that is not the case. |
14:23:52 | FromGitter | <alehander42> and people wrote a ton of useful libs in it |
14:24:06 | FromGitter | <alehander42> i am mostly talking about 3rd party libs here |
14:24:10 | FromGitter | <alehander42> in this discussion |
14:24:51 | livcd | krux02: that sounds like what GraalVM is doing |
14:25:05 | FromGitter | <alehander42> @krux02 well you should be able to reuse a rust library in principle ? if it has a c api and one wraps it? |
14:25:32 | FromGitter | <mratsim> it has |
14:25:47 | clyybber | krux02: Thats why C still being a low level standard is a good thing IMO |
14:25:51 | FromGitter | <mratsim> we are often on the fence on improving Rust/Nim interop |
14:26:06 | livcd | https://www.graalvm.org/docs/reference-manual/polyglot/ |
14:26:07 | FromGitter | <mratsim> as the crypto world is going the Rust way |
14:26:13 | krux02 | alehander42: that is exactly the point, the "if" |
14:26:20 | shashlick | windows has started hiding my executables saying they are not secure |
14:26:24 | clyybber | alehander42: Sure, but there are too many libraries in js, just look at this guy: https://github.com/KhronosGroup/Vulkan-Headers/commits/master |
14:26:29 | shashlick | any idea how to avoid this |
14:26:44 | clyybber | wrong link: https://github.com/jonschlinkert |
14:26:48 | FromGitter | <alehander42> clybber but thats the point: its better to have choice between 10 good and 10 not so good libs, than having a 1-2 ok libs |
14:26:53 | ldlework | at times a language is not worth using as it's ecosystem isn't as "rich as python's" |
14:27:03 | ldlework | turn around and a language is not worthing because it has too many choices |
14:27:04 | FromGitter | <alehander42> yep^ |
14:27:15 | ldlework | i conclude people just like to hear themselves say something |
14:27:18 | clyybber | He has hundreds of useless packages, that get included in hundreds of a bit more useful packages that get included in hundreds of even more useful packages and so on |
14:27:53 | FromGitter | <alehander42> clyybber but thats a mostly javascript problem: so it is not a problem for each popular lang |
14:27:57 | FromGitter | <alehander42> its a good problem to have |
14:28:01 | FromGitter | <mratsim> ugh: https://github.com/jonschlinkert/is-number |
14:28:06 | ldlework | when the price of adding a package approaches the limit of zero, then the justification for smaller, more universal modules goes up |
14:28:22 | FromGitter | <alehander42> thats like saying "oh we earn so much money for our product its hard to organize our new offices" |
14:28:26 | ldlework | "ugh" isn't an argument |
14:28:34 | clyybber | ugh is an argument. |
14:28:40 | clyybber | Why would one need this? |
14:28:44 | ldlework | not one that convinces anyone who doesn't already agree with you |
14:28:50 | FromGitter | <mratsim> because they don't have a type system |
14:28:54 | ldlework | if you're in the business of neurologically rewarding yourself with zero effort |
14:29:00 | ldlework | then "ugh" i guess is an argument |
14:29:08 | FromGitter | <alehander42> guys, chill |
14:29:20 | FromGitter | <alehander42> ok, all languages which are popular, but not JS dont have the is-number thing |
14:29:24 | FromGitter | <alehander42> nobody said "lets become js" |
14:29:36 | FromGitter | <alehander42> but "lets not become a fogotten language with no ecosystem/base" |
14:29:47 | clyybber | ldlework: Well, im not sure anyone sane needs to be convinced of the fact that those packages are useless |
14:29:52 | FromGitter | <alehander42> the is-number thing is not relevant to this discussion |
14:29:58 | ldlework | assuming everyone agrees with you |
14:30:04 | ldlework | ah classic source of neurological hits |
14:30:31 | krux02 | I am actually happy that the Browser is not my business. |
14:30:38 | clyybber | alehander42: Ok, but less people means less people calling for features that wouldn't fit in a language. |
14:30:45 | FromGitter | <alehander42> idlework, self affirming trash talk is also just a source of "neurological hits" mate |
14:31:00 | ldlework | self-affirming? |
14:31:01 | krux02 | yea please chill |
14:31:06 | FromGitter | <alehander42> clyybber, well thats just a matter of governance |
14:31:17 | FromGitter | <alehander42> look at go: so popular and still barely changes |
14:31:17 | krux02 | there is nothing worth to fight about. |
14:31:30 | ldlework | pointing out that your arguments are bad isn't a personal attack |
14:31:47 | krux02 | go is actually a pretty well designed language. I used it. I doesn't need to be constantly changed. |
14:31:49 | ldlework | not sure how it is "self-reaffirming" |
14:31:55 | clyybber | alehander42: Yeah, you have a point there. |
14:32:11 | krux02 | They just thought "no generics" is a good thing. |
14:32:22 | FromGitter | <alehander42> i dont like go as a language, but i agree their governance model is nice |
14:32:43 | clyybber | We could make a long-bet wether or not go will eventually get generics or not. |
14:32:59 | FromGitter | <alehander42> honestly, looking at the way the new-error-handling thing is going |
14:33:08 | krux02 | I used Go enough to say that a lot of things in go just work. They are not a mess like in other languages such as C or Nim |
14:33:08 | FromGitter | <alehander42> not sure if they'll add generics after all |
14:33:12 | clyybber | I'd argue it will, just for the sake of my argument, but I'm not so sure :p |
14:33:48 | krux02 | The only thing that is a mess in go is the code generation mess caused by the "no-generics" constraint. |
14:34:19 | clyybber | krux02: Araq sometimes answers, even if on holidays tho, right? |
14:34:22 | FromGitter | <alehander42> and of no-macros |
14:34:26 | krux02 | And I honestly think that generic code is overused in many projects. So I totally understand why people want to create a language again where generics are not an option. |
14:34:40 | ldlework | How does one overuse generics? |
14:34:43 | krux02 | clyybber, right, but don't bet on it. |
14:34:48 | ldlework | Is an implementation either generic, or not? |
14:35:02 | ldlework | When is an implementation superflously generic? |
14:35:06 | krux02 | ldlework, Well when everything is a template |
14:35:08 | ldlework | makes no sense. |
14:35:16 | clyybber | krux02: Yeah, I'm just patiently waiting for a lifesign :D Since it is his spec I found a problem with. |
14:35:17 | ldlework | templates are not a form of generics |
14:35:27 | ldlework | they're a form of meta-programming.. |
14:35:50 | krux02 | I can't explain an overused of generics/templates/meta-programming, you have to experience it. |
14:36:03 | ldlework | good thing we're speaking authoratatively on the quality of other langauge designs when we can't explain/justify our position |
14:36:05 | FromGitter | <alehander42> i still agree a stdlib should be very generic to be useful in all cases: (a stdlib is the definition of very general code) |
14:36:12 | FromGitter | <alehander42> but user code overuses it sometimes |
14:36:33 | krux02 | It really hits your productivity, because all your code you are writing is template code. It is never type checked. You can't use any tool that give you code completion, because you are in templates. |
14:36:45 | ldlework | templates have nothing to do with generics |
14:36:51 | ldlework | generics are type safe.. |
14:36:53 | ldlework | smh |
14:37:08 | clyybber | ldlework: I'm sorry, but I think krux02 knows what hes talking about :) |
14:37:08 | krux02 | And the reason why you are in templates is, because some idiot decided that "just in case you want to chage X you want it to be a template" |
14:37:29 | ldlework | clyybber: great argument |
14:38:02 | clyybber | ldlework: Ok, so I explain it to you: Generics get expanded at compiletime. Templates are expanded at compiletime. |
14:38:04 | krux02 | and no, generics are not type safe. |
14:38:07 | ldlework | "go doesn't have generics because templates are not type-safe" lol |
14:38:12 | krux02 | maybe in Scala |
14:38:38 | ldlework | in what statically-typed language is the generic system no type-safe? |
14:38:46 | ldlework | generics literally means open types |
14:38:53 | clyybber | ldlework: Exactly. |
14:38:53 | ldlework | what are you talking about |
14:39:02 | FromGitter | <alehander42> krux02: in the stdlib, you probably cant guess all the ways people need to use your code: i've seen it with os utils etc |
14:39:14 | ldlework | clyybber: Just because two features are "expanded at compiletime" doesn't mean they are the same feature. |
14:39:24 | FromGitter | <alehander42> so thats why being more generic is a good thing(no need for always templates ofc) |
14:39:29 | ldlework | Compile-time macros are "expanded at compiletime" and yet they are neither templates or generics. |
14:39:37 | ldlework | Templates are a form of meta-programming, and are not generics... |
14:39:39 | FromGitter | <alehander42> in normal code its sometimes overeng indeed |
14:39:49 | FromGitter | <alehander42> generics are a form of metaprogramming as well |
14:39:53 | ldlework | yes |
14:40:00 | ldlework | but that doesn't make templates and generics synonymous |
14:40:09 | * | ryukophone quit (Ping timeout: 250 seconds) |
14:40:18 | ldlework | it doesn't give generics, all the properties of templates, like not being type safe |
14:40:20 | krux02 | alehander42: when you are writing application code (no library code), there is no excuse to use generics/templates everywhere |
14:40:21 | * | ryukophone joined #nim |
14:40:30 | clyybber | ldlework: If you write a generic proc for a type T and that proc's body calls, let's say `+` on T, you want get an error, until you actually instantiate the generic with a type that doesn't have `+` |
14:40:32 | FromGitter | <alehander42> krux02: agree |
14:40:54 | ldlework | clyybber: yes, that's how type safety works lol |
14:41:21 | FromGitter | <alehander42> he meant you won't get an error |
14:41:32 | ldlework | yes, we all know what type safety means |
14:41:33 | clyybber | Yeah s/want/wont |
14:41:34 | FromGitter | <alehander42> dont be so quick with conclusions Idlework : ) |
14:41:40 | ldlework | what conclusion am I quick with? |
14:41:41 | FromGitter | <alehander42> mate, you didnt get it |
14:41:47 | ldlework | I knew what he meant just as you did |
14:41:50 | FromGitter | <alehander42> so, if a generic proc is not instantiated |
14:41:51 | ldlework | get what? |
14:41:54 | FromGitter | <alehander42> its not really type checked |
14:41:58 | krux02 | templates and generics are very much related. Both are instanced blocks of code. |
14:42:02 | FromGitter | <alehander42> thats not absolutely type safe |
14:42:12 | ldlework | krux02, yes but generics are type safe and templates are not. |
14:42:27 | krux02 | generics are as type safe as templates |
14:42:40 | ldlework | oh my god i'm so glad i'm not invested in this langauge/community anymore lol |
14:42:41 | krux02 | maybe a little bit more type safe |
14:42:44 | FromGitter | <alehander42> e.g. if you write a generic function in your library |
14:42:45 | ldlework | lmao :D |
14:42:50 | FromGitter | <alehander42> its body is not typechecked |
14:42:54 | FromGitter | <alehander42> if its not instantiated |
14:43:06 | clyybber | ldlework: Ok, then maybe get off this irc channel? |
14:43:18 | ldlework | that's not how the internet works |
14:43:51 | FromGitter | <alehander42> so, did you get the body-type-safety thing? |
14:43:58 | clyybber | ldlework: Well, right now you are investing time into this community? |
14:44:17 | ldlework | clyybber: lol yeah i'm super invested |
14:44:21 | krux02 | ldlework, I am warning you, if you continue your destructive attitude, you might get a ban. |
14:44:36 | ldlework | destructive? |
14:44:43 | FromGitter | <alehander42> getting one technical thing wrong, doesnt answer about it, starts trolling about investment |
14:44:46 | FromGitter | <alehander42> ok |
14:45:02 | ldlework | yeah, i'm wrong about generics here |
14:45:08 | disruptek | i mean, ldlework is right; templates aren't generics. :-) |
14:45:15 | ldlework | disruptek: CALM DOWN |
14:45:15 | disruptek | what's the big deal. |
14:45:28 | ldlework | disruptek: you don't get to be offensive, ok? |
14:45:30 | krux02 | C++'s templates are Nim's generics |
14:45:35 | ldlework | wrong |
14:46:01 | FromGitter | <alehander42> the deal is that he ridicules people like clybber, when they are techically right about a detail (the actual type safety) and he is not |
14:46:26 | disruptek | "generics are as safe as templates, maybe a little bit more type safe" -- hard to argue with this, too. |
14:46:38 | * | laaron quit (Remote host closed the connection) |
14:46:42 | ldlework | "as safe as templates" |
14:46:50 | ldlework | when the discussion was that generics are safer than templates. |
14:46:58 | disruptek | i think he's ridiculing a non-argument, which is fair, imo. |
14:47:09 | disruptek | you don't think generics are safer? |
14:47:11 | ldlework | generics are type safe, your implementation might have problems with closures or whatever |
14:47:16 | FromGitter | <alehander42> no |
14:47:26 | FromGitter | <alehander42> we literally had this discussion 5 minutes ago |
14:47:27 | FromGitter | <alehander42> :D |
14:47:33 | krux02 | ldlework, stop it |
14:47:36 | ldlework | disruptek: no i meant that their reply shows they were even missing the point |
14:47:37 | clyybber | ldlework: What do you call typesafe? That you don't get a runtime error? Thats not typesafety :D |
14:47:40 | ldlework | krux02: stop what? |
14:47:46 | krux02 | arguing |
14:47:53 | ldlework | clyybber: that the compiler knows the types statically |
14:47:57 | disruptek | what's wrong with arguing? |
14:48:01 | disruptek | we all might learn something. |
14:48:03 | ldlework | krux02: dude, people who disagree with you are not immoral agents |
14:48:25 | FromGitter | <alehander42> disruptek, the problem is the manner of arguing |
14:48:40 | ldlework | look inwards. |
14:48:47 | krux02 | I have no problem with people disagreeing with me, but we had this discussion about "right people" |
14:48:48 | disruptek | i think ldlework would respond best to data-driven arguments. |
14:49:11 | ldlework | you all have done a good deal of personally attacking me, when i haven't personally attacked anyone |
14:49:16 | ldlework | i have said "that argument is bad" |
14:49:43 | ldlework | you are hammering on me. people don't agree with you all the time. the feelings that come from disagreement don't mean the person is misbehaving. |
14:49:48 | FromGitter | <alehander42> well, i see it the opposite way: i feel you personally attacked many people and after that you got some attacks back |
14:49:52 | clyybber | ldlework: Ok. I think what krux02 was getting at that you cannot guarantee a generic is typesafe for a specific type unless you instantiate it. At which point if you get an error, the generic is often already used elsewhere. |
14:49:55 | ldlework | point to some community TOS violation and you wont see that. |
14:49:55 | FromGitter | <alehander42> after they tried to explain calmly |
14:50:07 | FromGitter | <alehander42> but as you see: its all very subjective, you felt one thing, me another |
14:50:18 | ldlework | alehander and yet you take a position of authority |
14:50:23 | ldlework | and want to moderate the space |
14:50:35 | ldlework | how about *you* chill out and realize not everyone who disagrees with you is misbehaving |
14:50:45 | ldlework | show me some TOS violation and you wont see that mistake again |
14:50:49 | solitudesf | hes just invested in the language/community |
14:50:53 | ldlework | you're allow to be told your arguments are not just wrong, but bad |
14:50:54 | disruptek | generics can be a little safer, because they provide more hint to the compiler than loosely-typed templates, which are basically C-style macros, right? |
14:50:55 | krux02 | ldlework, I am the moderator here. |
14:51:00 | ldlework | krux02: so? |
14:51:17 | FromGitter | <alehander42> yeah, i just complain about everyone |
14:51:18 | FromGitter | <alehander42> :D |
14:51:38 | krux02 | ldlework: so you are provoking me again? |
14:51:45 | ldlework | how am I doing that? |
14:51:53 | ldlework | you just highlighted me, I don't remember doing that to you. |
14:52:01 | clyybber | disruptek: You *can* make generics safer, through constraints. But if you just do proc someproc[T](v: T) its not really safer. |
14:52:27 | disruptek | clyybber: right, but that's the whole point of the argument: generics can be a little safer than templates. |
14:52:30 | ldlework | constraints don't make generics *safer* |
14:52:31 | disruptek | what am i missing here? |
14:52:42 | ldlework | they simply restrict the potential types which fit |
14:52:55 | FromGitter | <alehander42> i am sorry idlework, probably youre right that i provoked stuff |
14:52:57 | ldlework | if you dont' use a contraint it doesn't mean you can willy nilly use anytime that doesn't fit the use of the generic |
14:52:59 | krux02 | pleas stop this discussion about generics. We are far beyond the technical details here. |
14:53:09 | krux02 | Andthing said will just make it worse. |
14:53:15 | clyybber | disruptek: Nothing, krux02 didn't argue that generics are somehow less safe than templates, he's just saying that they are overused |
14:53:22 | FromGitter | <alehander42> peace |
14:53:23 | ldlework | krux02: the unfounded moderation is what makes things worse |
14:53:24 | FromGitter | <alehander42> i will try to get to work a bit |
14:53:45 | krux02 | alexander92, good point |
14:53:58 | clyybber | ldlework: But in the end we agree that unconstrained generics are about as typesafe as a template right? |
14:54:07 | ldlework | no....? |
14:54:16 | disruptek | no? |
14:54:19 | clyybber | But in what way are they more safe? |
14:54:31 | krux02 | clyybber, ldlework, disruptek: stop it right now |
14:54:38 | ldlework | what -what- |
14:54:41 | ldlework | stop* |
14:55:16 | ldlework | clyybber: an unconstrained function can be implemented anyway |
14:55:22 | ldlework | but you can't pass any type to that function |
14:55:32 | ldlework | only types which fit the generic function's shape will work |
14:55:36 | ldlework | this is the whole point |
14:55:44 | ldlework | generics are not about limiting what you can do in the implementation |
14:55:49 | ldlework | that's what generic constraints are for |
14:56:00 | ldlework | generics are for limiting what types you can use with the function |
14:56:06 | ldlework | which generics without constraints will do *perfectly* |
14:56:06 | * | ryukophone quit (Read error: Connection reset by peer) |
14:56:18 | ldlework | this is completely different than templates... |
14:57:10 | disruptek | how so? |
14:57:26 | ldlework | how so what? |
14:57:59 | disruptek | without regard to generic constraints, it's not clear to me whether you're saying generics are equally unsafe to templates. |
14:58:19 | ldlework | i'm saying generics are perfectly compile-time safe, in the respect that generics are intended to be |
14:58:27 | ldlework | in all languages |
14:58:41 | ldlework | because that's the very intrinsic point/nature of generics is open-ended types |
14:58:43 | krux02 | ldlework, disruptek: go to #nim-templates-vs-generics and continue your discussions there |
14:59:10 | * | absolutejam1 quit (Quit: WeeChat 2.5) |
14:59:14 | ehmry | yes please |
14:59:22 | clyybber | ldlework: So in essence we all agree on the same points, just framed differently. |
14:59:37 | ldlework | i have only taken one position the entire time |
14:59:47 | ldlework | if you find yourself partially agreeing with me now, I cannot account for that, sorry |
15:00:13 | krux02 | clyybber, ldlework: /join #nim-templates-vs-generics |
15:00:33 | clyybber | krux02: Just one final sentence :P ? |
15:00:39 | krux02 | no |
15:00:45 | krux02 | do it in that channel |
15:00:46 | krux02 | I am there |
15:00:57 | clyybber | Oh, I thought it was more of a joke haha |
15:01:19 | clyybber | Nah, its fine. In essence we agree, its just terminology that caused the discussion. |
15:01:56 | leorize | doesn't freenode have a `##` channel type that's basically off topic channel? |
15:02:02 | ldlework | almost like you should try to communicate with your interlocutors instead of just shutting them down by trying to dress their disagreement up as malevolent misbehavior |
15:02:04 | disruptek | i joined that channel and then i got a virus. |
15:02:10 | clyybber | We do have #nim-offtopic |
15:02:23 | FromGitter | <mratsim> we have nim-offtopic but a better channel would be nim-heated-debates |
15:02:42 | disruptek | ## channels are for projects which don't fall under the freenode charter. |
15:02:57 | clyybber | ldlework: He didn't shut us down, he instructed us to go to a different channel, which is an understandable request I guess. |
15:03:14 | ldlework | i was talking about you and alehander in the way you treated me disagreeing with you |
15:03:36 | clyybber | ldlework: Sorry, I didn't want to come of as toxic. |
15:03:37 | ldlework | moderators power-tripping is standard course for IRC |
15:03:43 | * | jxy quit (Quit: leaving) |
15:03:57 | FromGitter | <alehander42> i didnt want to shut you down, but to make you use less personal remarks |
15:03:58 | FromGitter | <alehander42> which you did |
15:04:01 | FromGitter | <alehander42> so i am glad |
15:04:12 | FromGitter | <alehander42> dont twist my words |
15:04:42 | ldlework | you can point out any personal attack I made at any time |
15:04:44 | ldlework | but you can't |
15:04:51 | ldlework | but I can point out personal remarks you made about me |
15:05:12 | ldlework | "your argument is bad" is not a personal attack. if you're going to champion inter-personal dispute, you should probably get this right. |
15:05:15 | Zevv | /leave #nim |
15:05:19 | * | Zevv left #nim (#nim) |
15:05:33 | clyybber | Oh no, now Zevv is gone :( |
15:05:45 | ehmry | can't someone just kick them? |
15:06:10 | FromDiscord_ | <Avatarfighter> ^ |
15:06:16 | solitudesf | brother, if `im glad im not invested in this community lemao xdd` is not being a smug asshole to you, the you have some selfawareness problems. |
15:06:17 | leorize | or we can stop talking about the topic and let it die |
15:06:48 | ldlework | being a smug asshole when everyone is being dismissive and mischaracterizing you seems totally fine and still not a personal attack |
15:07:01 | solitudesf | yeah, you attacked everybody |
15:07:07 | ldlework | literally no |
15:07:11 | FromDiscord_ | <Avatarfighter> well on that note, anyone up to help me debug something ? |
15:07:17 | clyybber | Sure |
15:07:32 | * | narimiran quit (Ping timeout: 245 seconds) |
15:08:04 | FromGitter | <alehander42> "> i conclude people just like to hear themselves say something ⏎ ⏎ > if you're in the business of neurologically rewarding yourself with zero effort ⏎ > assuming everyone agrees with you ah classic source of neurological hits" [https://gitter.im/nim-lang/Nim?at=5d3874540335e5553a0166ae] |
15:08:21 | FromGitter | <alehander42> again, one can argue its just a talking style, i overreacted |
15:08:34 | FromGitter | <alehander42> but i also didnt force you, just make a remark, which is totally fine |
15:08:34 | leorize | uhmmm, this is going too off-topic now everyone... |
15:08:43 | FromDiscord_ | <Avatarfighter> this is probably a bad question, but if i want to import straight js into my program would using straight `importcpp` then supplying js code work? |
15:08:59 | leorize | {.emit.} is the better route IMO |
15:09:01 | FromGitter | <alehander42> but sorry again, i shouldn't have tried to analyze this idlework + others |
15:09:44 | leorize | @Avatarfighter: so if it's a JS function, you can import via importcpp |
15:09:46 | * | alexande1 joined #nim |
15:10:18 | FromDiscord_ | <Avatarfighter> leorize: ah ok, I'm just having some very slight issues since the |
15:10:25 | FromDiscord_ | <Avatarfighter> JS funct is async and my nim code is not |
15:10:25 | leorize | but if it's not I'd recommend making a function with `{.emit.}` |
15:10:48 | leorize | not sure if asyncdispatch works with JS async |
15:11:02 | * | ryukophone joined #nim |
15:11:32 | FromGitter | <alehander42> you can await those functions |
15:11:38 | FromGitter | <alehander42> but you have to also add a return type |
15:11:42 | * | sknebel quit (Ping timeout: 245 seconds) |
15:11:42 | FromGitter | <alehander42> which is Future[stuff] |
15:12:05 | FromGitter | <alehander42> and add `{.async.}` |
15:12:24 | FromGitter | <alehander42> actually maybe no async if importcpp |
15:12:33 | FromDiscord_ | <Avatarfighter> alehander42: I got that far my current issue is that I have no idea what "function sleep(ms){return new Promise( resolve => setTimeout(resolve, ms));}" would return other than a promise |
15:12:33 | FromGitter | <alehander42> i have `var fsReadFile* {.importcpp: "helpers.fsReadFile(#)".}: proc(f: cstring): Future[cstring]` in my code |
15:13:09 | FromGitter | <alehander42> yes i do this all the time |
15:13:15 | FromGitter | <alehander42> i even have it in nim |
15:13:28 | FromGitter | <alehander42> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d38759854d123414cd848a0] |
15:13:57 | FromDiscord_ | <Avatarfighter> that's exciting! thanks for the link, I'll try to reserve asking questions to more interesting ones sorry about this one haha |
15:14:15 | FromGitter | <alehander42> newPromise comes from the jsffi |
15:14:28 | FromGitter | <alehander42> no from asyncjs from stdlib |
15:14:45 | FromGitter | <alehander42> and the other is ⏎ var windowSetTimeout* {.importcpp: "setTimeout(#, #)".}: proc (f: (proc: void), i: int): int |
15:15:05 | FromGitter | <alehander42> oh no, its a good question, i think i spent a lot of time until getting to here |
15:15:54 | * | jxy joined #nim |
15:16:03 | FromDiscord_ | <Avatarfighter> I stumbled upon karax about 2 hours ago and i've been converting my homemade password/totp manager to it so I'm still getting the hang of this |
15:16:30 | clyybber | Better to ask than to spend hours searching for the in hindsight obvious/simple solution |
15:16:53 | FromGitter | <alehander42> afaik async also works with promises, so its like their Future |
15:17:00 | FromGitter | <alehander42> async in js |
15:17:17 | FromGitter | <alehander42> but i often use this pattern |
15:17:24 | FromDiscord_ | <Avatarfighter> clyybber: I guess so, I just feel that my questions aren't as interesting as some of the other folks who truly ask indepth and challenging questions |
15:17:30 | FromGitter | <alehander42> to turn callback-based code to awaitable |
15:17:40 | FromDiscord_ | <Avatarfighter> alehander42: you're a lifesaver \:) thank you!! |
15:17:43 | FromGitter | <alehander42> its a question that can go deep |
15:18:12 | FromGitter | <alehander42> feel free to ask about karax/the js backend, i use it often |
15:18:17 | FromGitter | <alehander42> and others |
15:18:25 | leorize | @Avatarfighter: no worries, this channel is for all sort of questions |
15:19:00 | FromDiscord_ | <Avatarfighter> I'm loving karax right now, no questions there its so simple and smooth this is honestly one of the best modules I've found other than my own of course \:P |
15:21:57 | leorize | you have to escape the `:` on discord? |
15:22:35 | clyybber | I think so, its for emojis there |
15:22:40 | FromDiscord_ | <Avatarfighter> yeah, to make the ascii face look like a face haha |
15:22:51 | FromDiscord_ | <Avatarfighter> example 😛 vs \;P |
15:23:01 | FromDiscord_ | <Avatarfighter> https://dsh.re/ca9b60 |
15:23:15 | FromGitter | <alehander42> AvatarFighter what are your modules :P |
15:23:32 | FromGitter | <alehander42> ooh |
15:23:53 | disruptek | but emoji are characters that need not be escaped. |
15:24:00 | clyybber | my emoji font is apparently 3 times bigger than my usual font: https://imgur.com/a/wB9cALu |
15:24:20 | FromDiscord_ | <Avatarfighter> currently my pride and enjoy is binio, AMF3 based packed binary messages, https://github.com/Riderfighter/binio/blob/master/src/binio.nim |
15:24:32 | FromDiscord_ | <Avatarfighter> note that i am not the man in my github picture |
15:24:46 | FromGitter | <alehander42> oh nice |
15:25:06 | FromDiscord_ | <Avatarfighter> I've been working on a simple chat server/client using this lib as an example for it so I'll hopefully have that pushed to the repo soon |
15:25:19 | FromGitter | <alehander42> ah i see you are an avatar fighter |
15:25:30 | FromGitter | <alehander42> you fight against avatars |
15:25:39 | FromDiscord_ | <Avatarfighter> haha yes destroy all the avatars! |
15:26:21 | FromDiscord_ | <Avatarfighter> I really enjoyed the movie avatar and I made it a part of my everyday life haha |
15:27:03 | leorize | disruptek: on discord they auto convert ascii emoji -> unicode one I think |
15:27:11 | clyybber | Yeah |
15:27:44 | FromDiscord_ | <Avatarfighter> yep that is why i was trying to escape it, wasn't sure if the bot was sending "😃" or the ascii emoji |
15:27:54 | FromDiscord_ | <Avatarfighter> \😃 |
15:27:56 | * | HP-YC9 quit (Remote host closed the connection) |
15:27:57 | disruptek | i guess what i'm saying is, why isn't this a function of the client and not the platform? |
15:27:57 | FromDiscord_ | <Avatarfighter> frick |
15:28:04 | * | HP-YC9 joined #nim |
15:28:11 | FromGitter | <alehander42> which reminds me await in do (): is not catched as a mistake in js backend |
15:28:15 | FromGitter | <alehander42> have to fix it |
15:28:45 | FromDiscord_ | <Avatarfighter> Guys i'm not going to lie I'm in love with nim, its honestly so nice coming from python |
15:29:06 | clyybber | Nice to hear :D |
15:29:26 | FromDiscord_ | <Avatarfighter> I'm just converting my projects from Python to Nim in the hopes of learning the language more rapidly, the next thing i'm converting is https://github.com/Riderfighter/PyRelay |
15:29:34 | FromGitter | <alehander42> praise God, moved to a helper now it works |
15:29:40 | FromGitter | <alehander42> probably |
15:30:08 | FromGitter | <alehander42> what do you find |
15:30:21 | FromGitter | <alehander42> best in nim |
15:31:37 | FromDiscord_ | <Avatarfighter> Well, the best thing I love about nim is the community, its not everyday you can interact with a core dev and other talented programmers just to talk about the language itself! |
15:32:36 | FromDiscord_ | <Avatarfighter> the next thing i love are types, I love Go structs and types are right up my alley |
15:32:39 | clyybber | alehander42: Haha, I guess this is an argument for a small and nice community |
15:33:04 | FromDiscord_ | <Avatarfighter> and lets not get me started on importc, importccp, importobjc thats n u t s |
15:33:24 | * | clyybber n u t s |
15:34:07 | FromGitter | <alehander42> clyybber well, i think i talked to Guido Van Rossum once in gitter, he hanged in the (mypy) typing channel a lot |
15:34:17 | FromDiscord_ | <Avatarfighter> im really curious to see if I can work on an IOS tweak with nim since in theory it would compile to objc |
15:34:47 | FromDiscord_ | <Avatarfighter> and you could importobjc tweak code/system headers and such |
15:35:34 | FromGitter | <alehander42> oh yeah, he basically cited a PEP to me: that's why we need more NEP-s :P |
15:35:46 | * | ryukophone quit (Ping timeout: 272 seconds) |
15:35:54 | * | ryukophone joined #nim |
15:35:54 | FromDiscord_ | <Avatarfighter> haha |
15:35:58 | FromDiscord_ | <Avatarfighter> love that |
15:36:50 | FromDiscord_ | <Avatarfighter> one thing I'm never sure about since i've started Python is i'm unsure what is the correct way of coding in nim, the "PEP-8" of nim is basically what I need in my life lol |
15:36:54 | FromGitter | <alehander42> hm, i think importc/cpp should work for objc |
15:37:04 | FromGitter | <alehander42> the cpp thing is not really "c++" |
15:37:15 | FromGitter | <alehander42> but more "import with pattern" |
15:37:40 | FromDiscord_ | <Avatarfighter> importcpp = "import CPatternPlease" |
15:38:21 | clyybber | Avatarfighter: There is NEP-1: https://nim-lang.org/docs/nep1.html. But I like that I *don't* have to follow it. |
15:38:32 | clyybber | Also you can do --styleChecks:on |
15:38:44 | clyybber | at least in #devel |
15:39:08 | clyybber | And nimpretty |
15:39:10 | FromGitter | <kaushalmodi> it's `--styleChecks:hint` or `--styleChecks:error` |
15:39:40 | FromGitter | <kaushalmodi> `--styleChecks:off` is the default |
15:40:21 | leorize | it's --styleCheck |
15:40:23 | * | Zevv joined #nim |
15:40:29 | Zevv | is it safe again? |
15:40:43 | leorize | yes :P |
15:42:22 | Zevv | good |
15:43:34 | clyybber | Zevv: All is fine :) |
15:43:37 | clyybber | bbl |
15:43:38 | FromGitter | <kaushalmodi> I was thrilled to make a little Nim CLI app work as `echo foo | app` or `app foo` |
15:43:41 | * | clyybber quit (Quit: WeeChat 2.5) |
15:44:50 | FromDiscord_ | <Avatarfighter> i found out about `nim secret` today that was a nice surprise ! |
15:45:18 | leorize | beware, it's nim secret for a reason |
15:45:27 | FromDiscord_ | <Avatarfighter> you right |
15:45:32 | FromDiscord_ | <Avatarfighter> 😅 |
15:46:14 | alexande1 | a better hcr-based repl might eventually happend |
15:46:16 | FromDiscord_ | <treeform> wow yeah `nim secret` |
15:46:22 | alexande1 | but nimrtl bugs |
15:46:35 | FromDiscord_ | <Avatarfighter> @treeform did you know about it? |
15:46:40 | FromDiscord_ | <treeform> no |
15:46:55 | FromDiscord_ | <Avatarfighter> cool right? Only downside is that you can't import modules other than stdlib |
15:46:58 | FromDiscord_ | <treeform> echo is broken 😦 |
15:46:59 | FromDiscord_ | <Avatarfighter> I think |
15:47:39 | FromDiscord_ | <treeform> displaying strings is broken, maybe due the last 0 byte? |
15:48:25 | FromDiscord_ | <Avatarfighter> alrighty no need to critique the DIY console that hard smh |
15:48:27 | FromDiscord_ | <Avatarfighter> 😛 |
15:51:02 | FromDiscord_ | <Avatarfighter> My pw manager is looking pretty fly after the karax rewrite :D |
15:51:02 | FromDiscord_ | <Avatarfighter> |
15:51:02 | FromDiscord_ | <Avatarfighter> https://dsh.re/e407ae |
15:52:58 | * | alexande1 quit (Ping timeout: 245 seconds) |
15:53:59 | leorize | when can native ui development be that simple? |
15:55:42 | FromDiscord_ | <Avatarfighter> idk but i'm loving it |
15:56:21 | FromDiscord_ | <Avatarfighter> I just need to figure out a way of fixing my margins in css, the middle margin is bigger than everything else and its really annoying for me haha |
15:59:33 | leorize | you need more divs |
16:00:26 | FromDiscord_ | <Avatarfighter> 😓 |
16:01:37 | leorize | that's how most of the problem are solved :P |
16:01:58 | leorize | add div until your page displays correctly |
16:03:04 | FromDiscord_ | <Avatarfighter> I'll do that thanks 😃 |
16:03:18 | FromDiscord_ | <Avatarfighter> *200* divs later... |
16:05:11 | FromGitter | <awr1> @mratsim w/r/t the GPU doing openGL stuff: openGL is silly, you are forced to do everything on the same thread (unless you want to do multiple windows and are a masochist) |
16:06:26 | * | kungtotte quit (Ping timeout: 248 seconds) |
16:07:30 | FromGitter | <awr1> vulkan made things much less silly with VkSwapchainKHR and VkFramebuffer et al |
16:08:45 | * | kungtotte joined #nim |
16:10:02 | FromGitter | <mratsim> I see |
16:17:10 | FromGitter | <brentp> a `set[uint16]` is backed by array[8192, uint8] ? |
16:19:50 | leorize | https://github.com/nim-lang/Nim/blob/devel/compiler/bitsets.nim |
16:27:40 | * | hoijui quit (Ping timeout: 264 seconds) |
16:32:03 | * | dgreen joined #nim |
16:34:11 | FromGitter | <brentp> seems slow. set[uint16] subtraction is slow for sparse :( |
16:34:51 | * | nsf joined #nim |
16:43:56 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:44:07 | * | ryukophone quit (Ping timeout: 268 seconds) |
16:45:27 | * | floppydh quit (Quit: WeeChat 2.5) |
16:48:14 | * | Trustable joined #nim |
17:02:56 | * | leorize quit (Ping timeout: 260 seconds) |
17:03:18 | * | ng0 joined #nim |
17:09:26 | * | sknebel_ joined #nim |
17:10:20 | * | hoijui joined #nim |
17:11:39 | * | hoijui quit (Remote host closed the connection) |
17:14:39 | * | sknebel_ is now known as sknebel |
17:17:25 | * | leorize joined #nim |
17:22:45 | * | solitudesf quit (Read error: Connection reset by peer) |
17:22:46 | * | solitudesf- joined #nim |
17:25:20 | * | shomodj joined #nim |
17:31:17 | FromGitter | <mratsim> Avoid set operations for large range, especially in a loop |
17:35:02 | * | solitudesf- quit (Quit: Leaving) |
17:35:20 | * | solitudesf joined #nim |
17:40:56 | dgreen | mratsim: what would you say are the things that need the most work in arraymancer? I'd like to make myself useful if possible |
17:42:16 | FromGitter | <zah> try to replicate some start of the art result and see what you |
17:42:23 | FromGitter | <zah> ... you |
17:42:29 | FromGitter | <zah> you'll miss along the way |
17:42:36 | FromGitter | <zah> sorry, typing with my legs |
17:44:14 | dgreen | Not a bad idea zah, that's how I ended up writing up SGD with Momentum |
17:44:37 | dgreen | And also how I'm probably gonna end up writing adadelta as well |
18:04:28 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:10:03 | * | absolutejam joined #nim |
18:10:40 | disruptek | zah: pics of this "leg typing" or it didn't happen. |
18:10:49 | disruptek | shashlick: couple questions for you when you got a minute. |
18:12:12 | disruptek | ok, first, i think i get how shampoo works, but how about conditioner? you rub it on your head and then just rinse it right off. what am i missing? |
18:14:26 | * | solitudesf quit (Ping timeout: 248 seconds) |
18:16:44 | leorize | wat? |
18:16:44 | * | solitudesf joined #nim |
18:16:48 | shashlick | I'm here |
18:17:17 | disruptek | i'm new to this whole "hygeine" thing. |
18:17:19 | shashlick | Just eyes glazed over that ridiculous discussion few hours ago |
18:17:27 | disruptek | yeah? |
18:18:04 | disruptek | shashlick: whaddya do for a living? |
18:18:26 | shashlick | Humility is a rare commodity |
18:18:44 | disruptek | you're a commodities trader? |
18:19:08 | * | solitudesf quit (Remote host closed the connection) |
18:19:32 | shashlick | Nah just a sw guy in a large company |
18:19:36 | * | solitudesf joined #nim |
18:19:38 | disruptek | if i wanna see good examples of nim ast composition and rendering, you think nimterop is the best place to look? |
18:20:17 | shashlick | No not at all - I'm lazy and just use parseStmt |
18:20:44 | disruptek | well, i'm pretty lazy. |
18:20:46 | shashlick | You want to talk to @PMunch or @krux02 |
18:21:03 | disruptek | krux02 is on vacation from stupid questions. ;-) |
18:21:11 | shashlick | And one other person who made some cool ast matchers and what not |
18:21:33 | leorize | try Zevv's npeg? |
18:21:44 | shashlick | ^^ this guy too |
18:21:46 | krux02 | well if you write to me directly I wake up |
18:21:52 | disruptek | ack! |
18:22:12 | disruptek | i mean, if i have what sounds like an intelligent question, i will ask. 😉 |
18:22:45 | disruptek | npeg doesn't actually render nim, right? i need to print it on the page. |
18:23:20 | leorize | render is basically: echo NimNode.repr |
18:23:45 | disruptek | oh, i thought repr rendered ast tree in human-readable form. |
18:23:45 | krux02 | leorize, not basically. That is what it is. |
18:23:55 | krux02 | repr uses the compiler internal renderer. |
18:24:02 | leorize | yea, wrong terms |
18:24:11 | leorize | disruptek: that's treeRepr |
18:24:26 | disruptek | aha, thanks. |
18:24:28 | krux02 | repr prints an an in human-readable form. |
18:24:35 | leorize | I always use repr by accident when writing macros |
18:25:02 | krux02 | but it is not stable. parseExpr(repr(node)) != node |
18:25:11 | disruptek | oh, treeRepr is right there in the tutorial. duh. |
18:25:44 | disruptek | yeah, stability isn't important to me. |
18:25:46 | krux02 | if you print repr, you loose symbol identity |
18:26:20 | krux02 | In my opinion you should only use it for error messages and for debugging macros. |
18:26:35 | krux02 | tree repr and lisp repre are more precise but also more verbose. |
18:26:36 | disruptek | once i output it, i believe my program is finished. |
18:26:47 | Zevv | oi, my lines are yellow, someone said 'npeg'? |
18:26:59 | krux02 | Zevv yes |
18:27:19 | disruptek | i'm trawling for examples of ast wizardry. |
18:28:07 | krux02 | hmm today I stubled upon https://nimble.directory/ didn't know it existed. |
18:28:19 | Zevv | hm no wizardry here, learned the stuff while building it. |
18:28:35 | leorize | the ast is surprisingly simple once you got into it |
18:28:58 | Zevv | there are probably some interesting corners about npeg, but I guess things like async macros in the stdlib are worth looking at? |
18:29:15 | krux02 | disruptek, what kind of wizardry are you looking for? |
18:29:50 | disruptek | any best-practices examples beyond the single one in the tutorial. |
18:30:10 | krux02 | well those don't exist as far as I know. |
18:30:26 | krux02 | but I have some experience with them, so I can tell you right now about some best practices |
18:30:35 | disruptek | i think i'll do okay just winging it, but it's always useful to get a sense for what you don't know before you run off assuming you've groked it all. |
18:30:41 | krux02 | but it all depends on what you want to know |
18:30:58 | Araq | don't check for 'nnkIdent', it's almost always a bug |
18:31:25 | leorize | damn, now I've to rewrite my macros |
18:31:33 | disruptek | okay, that's something. 😉 |
18:31:59 | disruptek | i'll go hack at and then i can ask a more useful question. |
18:31:59 | FromGitter | <brentp> wrote my own set subtraction that uses bitops. removes the bottleneck I was seeing: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d38a41fb2db751dabc13e71] |
18:32:05 | krux02 | If I may recommend my own package ast-pattern-matching |
18:32:31 | disruptek | yeah, i was just looking at that yesterday. |
18:32:56 | leorize | gara could also be interesting to look at |
18:33:24 | krux02 | it is not just useful to write macros, the way I implemented it is a good example of macro usage as well. |
18:33:58 | * | absolutejam quit (Ping timeout: 244 seconds) |
18:34:51 | disruptek | yeah, it looked like a domain-specific graph equality routine to me. |
18:35:02 | shashlick | Also check out renderer.nim in the compiler |
18:35:09 | shashlick | That's what c2nim uses |
18:35:26 | leorize | what should I change? https://github.com/alaviss/kmod/blob/923879e15b087e09e21d23a4f42673ea6cf66260/src/kmod.nim#L118-L147 |
18:35:51 | krux02 | disruptek, well it is more a tree equality, graph equality is a bit more complex. |
18:36:03 | disruptek | right. |
18:36:49 | krux02 | To be precise, "The Graph Equality Problem" was a lecture at my university that you could attend to do one semester graph equality. |
18:36:51 | disruptek | maybe it can replace some of the similar sameTree impls in the compiler. |
18:37:36 | krux02 | disruptek, the problem with sameTree that I had was, what level of same-tree-ness do you want? |
18:37:45 | krux02 | does symbol equal identifier? |
18:38:06 | disruptek | i thought that's what your macro enables -- you mix-in whatever constraints you wish in your sameness test. |
18:38:22 | krux02 | yes |
18:39:04 | disruptek | i'm just thinking that having one source of logic underneath those different calls could make debugging easier. |
18:40:39 | krux02 | what do you mean? |
18:40:42 | disruptek | shashlick: renderer.nim is awesome, thanks. |
18:41:20 | krux02 | I tried to be as consistent as possible in ast pattern matching. |
18:41:30 | krux02 | no surprises |
18:41:33 | Araq | leorize: instead of n.ident use $n (I know, I know) |
18:42:03 | disruptek | i mean maybe the various sameTrees should all issue calls to your matcher instead, so performance and accuracy can be concentrated there. it might be academic, but how many sameTree()s do you want to debug? |
18:42:18 | disruptek | i am all about writing the simplest, smallest amount of code that i can. |
18:44:57 | * | nif quit (Quit: ...) |
18:45:06 | * | nif joined #nim |
18:46:43 | krux02 | disruptek, that is why I wrote the ast matcher. |
18:46:56 | krux02 | because I had a lot of ast to match against. |
18:47:13 | AlexMax | w16 |
18:47:36 | krux02 | AlexMax, is that a code for something? |
18:50:05 | * | absolutejam joined #nim |
18:50:24 | disruptek | it's code for `am i in the right window? ... nope` |
18:51:06 | krux02 | lol |
18:56:48 | FromDiscord_ | <Avatarfighter> what’s up party people! |
18:57:18 | disruptek | crickey, every time avatarfight speaks, i hear the sound of swords leaving scabbards. |
18:57:28 | disruptek | scared the hell outta me. |
18:58:13 | * | rokups quit (Quit: Connection closed for inactivity) |
18:59:34 | FromDiscord_ | <Avatarfighter> lmao that would be sick if it happened in real life 😦 |
19:00:00 | disruptek | that's the sound i hear when i try to talk to my ex-wife. |
19:02:20 | FromDiscord_ | <Avatarfighter> oof |
19:25:11 | * | solitudesf- joined #nim |
19:26:17 | * | solitudesf quit (Ping timeout: 245 seconds) |
19:28:12 | * | shomodj joined #nim |
19:29:51 | * | shomodj quit (Client Quit) |
19:30:08 | FromGitter | <Obround> Is there someway you can convert a sequence to an open-array and echo it on the same line? Something like this: ⏎ ⏎ ```var my_seq = @[5, 6, 7] ⏎ echo seqToArray(my_seq)``` [https://gitter.im/nim-lang/Nim?at=5d38b1c0b2db751dabc1a955] |
19:30:24 | * | NimBot joined #nim |
19:31:13 | * | nif quit (Quit: ...) |
19:31:22 | * | nif joined #nim |
19:54:10 | * | absolutejam quit (Ping timeout: 248 seconds) |
19:55:51 | * | absolutejam joined #nim |
20:02:08 | * | nsf quit (Quit: WeeChat 2.4) |
20:04:06 | shashlick | You can already echo a seq, why convert? |
20:07:31 | FromGitter | <kaushalmodi> @Obround openArray is a special type for proc args only I believe |
20:08:34 | FromGitter | <kaushalmodi> From the manual: ⏎ ⏎ > Often fixed size arrays turn out to be too inflexible; procedures should be able to deal with arrays of different sizes. The openarray type allows this; it can only be used for parameters. |
20:09:39 | * | narimiran joined #nim |
20:14:30 | FromGitter | <mratsim> Sorry was away @dgreen, more examples would be nice like @zah said, it also depends on your preferences, like for NLP there are tokenizers to implement, for vision instanceNorm2d would be nice to be able to do style transfer |
20:15:32 | FromGitter | <mratsim> Deconvolution to be able to implement U-net for medical segmentation |
20:16:28 | FromGitter | <mratsim> Also grunt work like wrapping Nvidia cudnn RNNs (don't do that actually it's soul draining) |
20:17:34 | FromGitter | <mratsim> Otherwise, helping @vindaar or @brentp on their visualization library would probably be even more beneficial to the Nim ecosystem as a whole |
20:18:17 | dgreen | Alright so basically anything and everything depending how much of my soul I'm willing to sell? |
20:18:22 | dgreen | Do you have a link to that library on you? |
20:18:47 | FromGitter | <mratsim> For data viz I have an experiment to use Vega here for example: https://github.com/numforge/monocle |
20:18:57 | FromGitter | <brentp> 👍 or implement truncatedSVD/randmoizedPCA for arraymancer. ;) |
20:19:09 | FromGitter | <mratsim> https://github.com/brentp/nim-plotly |
20:19:35 | FromGitter | <mratsim> https://github.com/Vindaar/ggplotnim |
20:19:54 | FromGitter | <mratsim> Truncated SVD + TF IDF yeah for nlp |
20:20:53 | FromGitter | <mratsim> An XGBoost wrapper as well if you want something from scratch |
20:22:07 | * | HP-YC9 quit (Remote host closed the connection) |
20:22:07 | FromGitter | <mratsim> Have a look at this Meta issue: https://github.com/nim-lang/needed-libraries/issues/77 |
20:22:07 | dgreen | Oh awesome I didn't know about these libraries. Starred those for future reference |
20:22:15 | * | HP-YC9 joined #nim |
20:22:37 | FromGitter | <mratsim> My Vega experiment you can start it from scratch no need to contribute to my repo |
20:23:17 | FromGitter | <mratsim> I mainly wanted to see if webview could be enough for dataviz as we don't have yet a stable jupyter kernel |
20:24:00 | FromGitter | <mratsim> Maybe ask @bluenote10 on his plan for nimdata and kadro (dataframes library) |
20:24:25 | FromGitter | <mratsim> https://github.com/bluenote10/NimData |
20:24:55 | FromGitter | <brentp> a jupyter kernel would be very useful ! |
20:25:38 | dgreen | A jupyter kernel would be wicked actually. |
20:25:47 | dgreen | All of these are fascinating thanks mratsim I'm taking a look through them |
20:36:55 | * | shomodj joined #nim |
20:42:04 | dgreen | I think I'll just look for what needs to be done wherever and see what I can do. I'll make myself available for any of the above authors if they have anything specific in mind :) |
20:42:58 | FromGitter | <mratsim> for the jupyter kernel you might be able to ask @zah for the hot code reloading part |
20:43:22 | FromGitter | <mratsim> see: https://github.com/nim-lang/Nim/issues/8927 |
20:44:41 | * | HP-YC9 quit (Remote host closed the connection) |
20:44:46 | FromGitter | <mratsim> and the changes that @awr1 has pending as well: https://github.com/nim-lang/Nim/pull/11742 |
20:44:50 | * | HP-YC9 joined #nim |
20:45:16 | FromGitter | <mratsim> I think it might be a complex piece of work though so be prepared to support it for a while :p |
20:45:43 | * | rockcavera quit (Remote host closed the connection) |
20:46:02 | FromGitter | <mratsim> you can see @stisa implementation before hot code reloading was available: https://github.com/stisa/jupyternim |
20:46:25 | federico3 | https://github.com/ionelmc/pytest-benchmark this is quite nice |
20:50:13 | dgreen | a jupyter kernel seems to be largely in flux wrt hot code reloading, might be too bleeding edge for me to contribute to :P (and also potentially over my head) |
20:50:36 | Zevv | How do I get the integer representation of an enum passed to a macro, which ends up as an nnkIdent? |
20:50:42 | Zevv | intVal() does not like that |
20:51:37 | * | Trustable quit (Remote host closed the connection) |
20:52:00 | dom96 | dgreen, don't be afraid to dive into things like this, challenge yourself :) |
20:52:49 | disruptek | if only everything we had to jump into was as entertaining. |
20:53:21 | * | disruptek is trying to get wayland screen recording to also capture audio. 🙄 |
20:54:20 | dgreen | That's fair, you never learn if you never try |
20:54:34 | * | absolutejam1 joined #nim |
20:54:51 | FromGitter | <mratsim> that's how I started Arraymancer to be honest |
20:55:20 | FromGitter | <mratsim> I was greenhorn in Nim and a nknew how to do a scalar neural network, I wanted to generalize it to vectors and matrices |
20:55:30 | FromGitter | <mratsim> I just knew* |
20:57:06 | * | absolutejam quit (Ping timeout: 248 seconds) |
20:59:49 | dgreen | And now look at you! |
21:00:33 | dom96 | and I just wanted to write an IRC bot in Nim :) |
21:02:51 | * | clyybber joined #nim |
21:07:37 | FromGitter | <mratsim> the scalar NN, I started it in Nim by just ranslating this javascript code: http://karpathy.github.io/neuralnets/ |
21:07:56 | clyybber | Araq: Hey, are you there? |
21:08:51 | Zevv | hm is there a way to runtime check if a certain field of an object variant is accessible before actually accessing it? |
21:09:42 | FromGitter | <mratsim> compile-time only |
21:09:48 | FromGitter | <mratsim> it's broken in generic methods |
21:10:04 | Zevv | bwah |
21:10:04 | FromGitter | <mratsim> because generics are only checked when instantiated |
21:10:10 | FromGitter | <mratsim> and methods are runtime only :p |
21:10:13 | Zevv | yeah fair enough |
21:10:17 | * | ertp07 joined #nim |
21:10:23 | disruptek | uh, check to see which discriminator you have? |
21:11:06 | FromGitter | <mratsim> actually I think the compiler introduces the runtime check against discriminator as well |
21:11:14 | Zevv | I need an extra if with six cases to see if I should store something in my object |
21:11:25 | Zevv | I get a runtime exception if I'm not allowed to |
21:11:25 | disruptek | yes. :-) |
21:11:28 | Zevv | but I can't try: i |
21:14:45 | Zevv | either I'm getting deeper into nim and hitting dark corners, or more things in Nim are broken then a year ago |
21:15:14 | * | narimiran quit (Ping timeout: 248 seconds) |
21:15:22 | disruptek | variant objects are a little tighter than they should be at the moment. |
21:15:30 | disruptek | i think jasper has plans to fix that. |
21:15:44 | Zevv | workaround has been made :) |
21:15:45 | dom96 | clyybber, he's on holidays. Also, don't ask to ask, just ask your question, someone else might be able to answer |
21:16:06 | lqdev[m] | for some reason I'm not getting a proper backtrace in gdb under windows, no matter if I compile with --debugger:native or not |
21:16:06 | dom96 | bah, is it just me or are concepts still incredibly broken? |
21:17:07 | * | rockcavera joined #nim |
21:18:13 | lqdev[m] | I'm getting a segfault, supposedly at glfwPollEvents, but I'm unable to debug it since backtrace doesn't work in gdb |
21:18:35 | Zevv | not at all, or not at your crash? |
21:18:42 | Zevv | can you breakpoint and then bt? |
21:19:38 | lqdev[m] | not at my crash, there's a sigsegv and when I type `backtrace` it only has some garbage (and suggests the stack is corrupt) |
21:19:46 | clyybber | dom96: I know, thats why I asked, since he is occasionally online. Also its about the newruntime spec, and he has the say in that, so its no use asking anyone else (maybe cooldome). But generally I agree with you. |
21:20:28 | dom96 | clyybber, he might also answer you later after reading the IRC logs |
21:20:54 | Zevv | lqdev[m]: yeah, but if you do a breakpoint first, does it work then? |
21:21:09 | Zevv | so do a 'clean' backtrace somewhere, on main for example |
21:21:18 | Zevv | if that works, your debug info is ok and it is really stack corruption |
21:21:40 | Zevv | stack corrupt, can't unwind |
21:21:58 | lqdev[m] | give me a sec, I'm having some windows troubles atm (I'm running on an HDD and compiling is slow as hell) |
21:22:51 | Zevv | I've had windows problems over the last 20 years |
21:26:03 | disruptek | it stopped bothering me so much once i refused to run it or support it. |
21:26:12 | lqdev[m] | the backtrace works here |
21:26:25 | lqdev[m] | I set a breakpoint at the problematic line |
21:26:53 | Zevv | someone borkes your stack and you're gone |
21:27:10 | Zevv | valgrind :/ |
21:27:24 | lqdev[m] | shit |
21:27:26 | FromGitter | <awr1> the PR w/r/t nimrtl/nimhcr https://github.com/nim-lang/Nim/pull/11742 is probably okay, i think the appveyor thing is unrelated |
21:27:39 | lqdev[m] | then how am I supposed to fix this windows-only issue if I can't even get a backtrace? |
21:27:58 | Zevv | is it broken after an FFI call? |
21:28:18 | lqdev[m] | yes |
21:28:55 | Zevv | just void glfwPollEvents(void) ? |
21:29:20 | lqdev[m] | yes |
21:29:37 | Zevv | but that will call all kind of callbacks if there are events, right? |
21:29:49 | * | Vladar quit (Remote host closed the connection) |
21:30:06 | Zevv | are these eventhandlers cdecl? |
21:30:24 | Zevv | and not using closures, and all that? |
21:30:50 | Zevv | if you're going nim -> C -> nim without telling nim, stuff will break |
21:32:04 | lqdev[m] | pretty certain they're not closures, but let me double-check |
21:32:12 | Zevv | they are cdecl? |
21:35:59 | Zevv | reasking, can't find the answer: I pass an enum to a macro, how can I get the integer value? Documentation says intVal "Returns an integer value from any integer literal or enum field symbol", but that doesn't work for me. It's an nnkIdent |
21:36:20 | FromGitter | <mratsim> the enum needs to be static |
21:36:31 | Zevv | oh, can they be non-static?! |
21:37:01 | FromGitter | <mratsim> and you use ord() on the value |
21:37:22 | Zevv | What is a static enum and how do I make that? |
21:37:23 | FromGitter | <awr1> @disruptek typically shampoo first to wash and clean the hair (which removes certain oils from your hair), then conditioner (which tries restores those oils). sometimes i co-wash (some shampoos are overly aggressive in the amount of oils that they strip and so sometimes you can get away with just using conditioner, starting with a bit on the scalp and then working the rest of your hair) |
21:37:44 | FromGitter | <mratsim> macro foo(x: static MyEnum): untyped = |
21:38:00 | disruptek | why don't i just skip the shampoo and keep the oils in the first place? seems more efficient. |
21:38:08 | Zevv | ah sorry, my answer was not clear: the enum is used in a code block that i'm transforming |
21:38:17 | Zevv | my *question* was not clear |
21:38:46 | Zevv | so I'm not passing the enum explicitly, it is just part of the AST |
21:38:54 | Zevv | it's only an identifier to the macro |
21:40:10 | lqdev[m] | Zevv: they were closures, seems like I accidentally set them to that when I was looking for a way to pass variables to a cdecl proc. (it turned out I was blind and GLFWWindow simply had a userdata pointer I didn't see the first time around and forgot to change those procs back to cdecl) |
21:40:36 | Zevv | \o/ |
21:41:15 | * | gangstacat quit (Quit: Ĝis!) |
21:43:28 | * | solitudesf- quit (Ping timeout: 246 seconds) |
21:44:14 | Zevv | http://ix.io/1Pnr for anyone who is bored. I want by black bear to be passed as 1.int |
21:45:47 | * | absolutejam2 joined #nim |
21:47:46 | * | absolutejam1 quit (Ping timeout: 248 seconds) |
21:48:06 | FromGitter | <awr1> can you not emit a cast? |
21:48:17 | FromGitter | <awr1> or do you need it at compile time ro something |
21:48:38 | Zevv | yeah, basically |
21:48:40 | disruptek | i thought you have to `n` because it's a literal. |
21:49:08 | Zevv | `n`? |
21:49:19 | FromGitter | <awr1> also @disruptek you need shampoo to clean the hair |
21:49:28 | disruptek | echo "ident: ", `n` |
21:49:59 | FromGitter | <awr1> unless you want your hair to be greasy. also if it's `nnkIdent`i think (correct me if i'm wrong) `untyped` may not be appropiate |
21:50:06 | disruptek | i threw out my shampoo in disgust. now i'm using REAL POO. |
21:50:43 | Zevv | disruptek: `n` is still a nimnode, right? |
21:51:26 | disruptek | n is. maybe if your code did something more useful, we could talk about ways that it fails. |
21:51:40 | Zevv | ok, I'll make it a bit bigger |
21:51:49 | disruptek | but, enums and bools have to be quoted, afaik. |
21:52:39 | disruptek | okay, my streamer streams my voice now. what a pita. |
21:53:20 | FromGitter | <awr1> yea when you dump ast gen you get |
21:53:31 | FromGitter | <awr1> `nnkStmtListExpr.newTree(newSymNode("bPolar"))` |
21:54:30 | disruptek | if you want to echo the enum, that's the value i'd expect. |
21:55:01 | Zevv | http://ix.io/1Pnt |
21:55:05 | Zevv | like that - one step higher |
21:55:52 | disruptek | oh, you want it to add int(1) in any event? |
21:55:59 | Zevv | right |
21:56:08 | Zevv | unless I pass pBlack, then it should be 2 :) |
21:56:31 | disruptek | you're blowin' my mind right now. |
21:56:36 | disruptek | 🤯 |
21:57:55 | Zevv | sounds trivial, right |
21:58:11 | disruptek | sounds like it *should* be. ;-) |
21:58:24 | Zevv | manual suggests it should be |
21:59:25 | disruptek | i guess you could compare it and count up as if you were parsing an enum value from a string. |
21:59:33 | disruptek | seems nuts. |
22:00:01 | Zevv | hmyeah. ok, I'll figure out some workaround |
22:00:21 | Zevv | thanks for blowing your mind |
22:03:24 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:04:16 | * | clyybber quit (Quit: WeeChat 2.5) |
22:06:06 | * | stefanos82 quit (Quit: Quitting for now...) |
22:14:43 | * | ertp07 quit (Ping timeout: 250 seconds) |
22:23:37 | * | HP-YC9 quit (Remote host closed the connection) |
22:23:45 | * | HP-YC9 joined #nim |
22:25:50 | disruptek | maybe you can compose the ast to cast it but you cannot actually cast it in the macro. |
22:26:37 | disruptek | it is the same problem with booleans, as i mentioned. |
22:41:25 | Zevv | varriount: NPeg has basic AST captures now. I've been fighting to get the whole parser and all related types genericized to support custom data types to be passed, but it's not worth the hassle. I now predefined a basic AST node which can be used to parse a tree, if the user wants different objects they can do a postprocess over that tree. |
22:41:30 | Zevv | https://github.com/zevv/npeg#ast-abstract-syntax-tree-captures |
22:41:58 | * | abm joined #nim |
22:43:09 | disruptek | wow, that's neat. :-) |
22:46:30 | disruptek | wrt your earlier issue, bools have a `boolVal`, so i guess they don't have the same issue. |
22:56:31 | * | Kaivo quit (Quit: WeeChat 2.5) |
22:56:54 | * | shomodj joined #nim |
23:03:01 | * | Kaivo joined #nim |
23:08:18 | * | absolutejam2 quit (Ping timeout: 268 seconds) |
23:13:24 | * | absolutejam2 joined #nim |
23:13:41 | * | krux02_ joined #nim |
23:13:55 | * | HP-YC9 quit (Remote host closed the connection) |
23:14:05 | * | HP-YC9 joined #nim |
23:16:51 | * | krux02 quit (Ping timeout: 264 seconds) |
23:17:57 | * | absolutejam2 quit (Ping timeout: 245 seconds) |
23:22:37 | * | theelous3 quit (Remote host closed the connection) |
23:23:01 | * | theelous3 joined #nim |
23:35:12 | * | theelous3 quit (Ping timeout: 258 seconds) |
23:37:31 | * | abm quit (Quit: Leaving) |
23:43:49 | * | theelous3 joined #nim |
23:48:46 | * | theelous3 quit (Ping timeout: 246 seconds) |
23:58:10 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
23:59:09 | * | ertp07 joined #nim |