00:00:08 | * | marmotini_ quit (Ping timeout: 260 seconds) |
00:00:12 | FromGitter | <Varriount> You couldn't actually deliver an alias for a reference type |
00:00:29 | * | Hideki_ quit (Ping timeout: 258 seconds) |
00:01:09 | FromGitter | <Varriount> ,*define |
00:01:30 | FromDiscord | <Fern & Simula (They/Them)> huh, interesting |
00:01:31 | FromDiscord | <Fern & Simula (They/Them)> thanks! |
00:13:09 | FromDiscord | <Fern & Simula (They/Them)> i want to create a type that is just a seq with one proc overloaded, how would i declare the type? the following doesn't work https://play.nim-lang.org/#ix=26DO |
00:23:08 | leorize | seq[T] is not an object |
00:23:24 | leorize | and you mis indented the proc :P |
00:24:16 | leorize | anyhow, here is how it's done: https://play.nim-lang.org/#ix=26DR |
00:24:44 | FromDiscord | <mratsim> Mmmh that's some ugly error with destructors on C++ backend: "error: member ‘tyObject_PledgeImpl__Vo57D64UViVBWyaz9c9bgMJQ tyObject_PledgePtrcolonObjectType___sjPlN9bxV5PM5kjCGHooqsw::<anonymous union>::<anonymous struct>::impl’ with constructor not allowed in anonymous aggregate" |
00:25:30 | FromDiscord | <Fern & Simula (They/Them)> leorize: ahhh, thank you very much! |
00:31:04 | * | hpyc9 is now known as Irving |
00:31:08 | * | Irving is now known as hpyc9 |
00:37:12 | FromDiscord | <Fern & Simula (They/Them)> hmmm, is there a way to have the Ring type automatically use seq procs? like this: https://play.nim-lang.org/#ix=26DV |
00:38:15 | FromDiscord | <Fern & Simula (They/Them)> removed `distinct` and it works, nvm |
00:40:58 | leorize | until you use it in an another module :P |
00:44:33 | leorize | fern & simula: here you go: https://play.nim-lang.org/#ix=26DZ |
00:44:54 | leorize | use converters to transparently convert Ring into seq |
01:02:34 | FromDiscord | <Fern & Simula (They/Them)> oh wow, forgot about converters, thats handy |
01:04:50 | disruptek | yeah, they're great for fostering confusion and contempt on your team. |
01:37:31 | FromGitter | <deech> Can a converter be called explicitly? Scala has an issue where implicit things (sort of converters) have to have name even though all you care about is the type sig + implementation. |
01:37:38 | disruptek | sure. |
01:38:27 | FromGitter | <deech> So it's just a proc? |
01:38:34 | disruptek | i guess. |
01:39:13 | * | lritter_ joined #nim |
01:39:14 | * | sealmove quit (Quit: WeeChat 2.6) |
01:42:02 | * | lritter quit (Ping timeout: 240 seconds) |
01:46:37 | FromGitter | <deech> Oh man this is so weird if two converters are in the same scope it seems to just go in the order it was declared to find one the other isn't even typechecked. https://play.nim-lang.org/#ix=26Ed |
01:47:08 | disruptek | just think of the hilarious hijinks when you start exporting them. |
01:47:11 | FromGitter | <deech> Flip line 4 and 5 and suddenly you get a type error. |
01:52:01 | FromGitter | <deech> Ok I am sufficiently scared of converters now |
01:52:14 | disruptek | a healthy fear, i'm sure. |
01:54:38 | FromGitter | <deech> I wonder if something like this can be detected by a 3rd party linter, if > 1 converter that does the same thing is in scope warn the user. |
01:59:10 | FromDiscord | <Fern & Simula (They/Them)> anyone have any ideas about how i can flatten this loop into a single constant-time operation? https://play.nim-lang.org/#ix=26Ef |
01:59:20 | FromDiscord | <Fern & Simula (They/Them)> i feel like it should be obvious but it isn't |
01:59:56 | disruptek | do you know many stories about sea lions? |
02:00:43 | FromDiscord | <treeform> there was a youtube thing about them... |
02:03:33 | FromDiscord | <treeform> @Fern & Simula (They/Them) : `i = i mod r.len - r.len` |
02:04:15 | FromDiscord | <Fern & Simula (They/Them)> `Error: unhandled exception: index -2 not in 0 .. 2 [IndexError]` |
02:06:39 | FromDiscord | <treeform> I guess if i can be negative it does not work |
02:06:48 | FromDiscord | <Fern & Simula (They/Them)> i is never negative |
02:06:50 | FromDiscord | <treeform> try `if i > 0: i = i mod r.len - r.len` |
02:07:04 | FromDiscord | <Fern & Simula (They/Them)> that error happened when i = 1 |
02:07:19 | FromDiscord | <treeform> what is r.len then? |
02:07:33 | FromDiscord | <Fern & Simula (They/Them)> anything, but in this case it's 3 |
02:07:46 | FromDiscord | <Fern & Simula (They/Them)> sorry, anything greater than 0 |
02:07:52 | FromDiscord | <treeform> https://play.nim-lang.org/#ix=26Ej |
02:08:16 | FromDiscord | <treeform> yeah my thing only breaks on 0 |
02:08:19 | FromDiscord | <Fern & Simula (They/Them)> i don't want it in a while loop though, that's the problem |
02:08:23 | FromDiscord | <treeform> use `if i > 0: i = i mod r.len - r.len` |
02:08:33 | FromDiscord | <Fern & Simula (They/Them)> i is already greater than 0 |
02:08:40 | FromDiscord | <treeform> then it works |
02:08:49 | FromDiscord | <Fern & Simula (They/Them)> no, it doesn't |
02:09:14 | FromDiscord | <treeform> exact same output with i=1 and len=3 |
02:09:15 | FromDiscord | <treeform> https://play.nim-lang.org/#ix=26Ek |
02:09:22 | * | pbb quit (Ping timeout: 260 seconds) |
02:09:37 | FromDiscord | <Fern & Simula (They/Them)> i already have a while loop |
02:09:50 | FromDiscord | <Fern & Simula (They/Them)> i'm attempting to transform the proc into a constant-time function |
02:09:51 | FromDiscord | <treeform> top one is yours, bottom up is mine |
02:09:54 | FromDiscord | <treeform> top one has while loop |
02:10:09 | FromDiscord | <Fern & Simula (They/Them)> https://play.nim-lang.org/#ix=26Eo |
02:10:59 | FromDiscord | <Fern & Simula (They/Them)> whoops wrong code |
02:11:48 | FromDiscord | <Fern & Simula (They/Them)> same error though: https://play.nim-lang.org/#ix=26Ep |
02:12:15 | * | pbb joined #nim |
02:12:25 | FromDiscord | <treeform> where is the while loop one? |
02:12:32 | FromDiscord | <treeform> while had the abs on the index no? |
02:13:02 | FromDiscord | <Fern & Simula (They/Them)> https://play.nim-lang.org/#ix=26Eq it did |
02:15:51 | * | dddddd quit (Remote host closed the connection) |
02:16:55 | FromDiscord | <treeform> you right it breaks when i = r.len |
02:17:11 | FromDiscord | <treeform> https://play.nim-lang.org/#ix=26Es |
02:17:30 | disruptek | so... sea lion stories? |
02:18:34 | FromDiscord | <treeform> disruptek: https://www.youtube.com/watch?v=7s6VfSOuZpQ |
02:18:41 | * | pbb quit (Quit: No Ping reply in 180 seconds.) |
02:18:51 | FromDiscord | <Fern & Simula (They/Them)> hey, that works perfectly! thank you treeform |
02:19:55 | * | pbb joined #nim |
02:20:39 | disruptek | okay, who here knows what a sea lion is? |
02:21:00 | FromDiscord | <Fern & Simula (They/Them)> it's a jetbrains product |
02:21:01 | * | marmotini_ joined #nim |
02:21:09 | FromDiscord | <Fern & Simula (They/Them)> :^) |
02:25:48 | * | marmotini_ quit (Ping timeout: 268 seconds) |
02:30:48 | * | endragor joined #nim |
02:37:36 | * | endragor quit (Remote host closed the connection) |
02:37:45 | * | endragor joined #nim |
02:37:46 | FromDiscord | <treeform> @Fern & Simula (They/Them) you can also do `(r.len - (int(i) mod r.len)) mod r.len` |
02:37:53 | FromDiscord | <treeform> https://play.nim-lang.org/#ix=26Eu |
02:38:00 | FromDiscord | <treeform> which makes it a 1 liner |
02:38:08 | FromDiscord | <Fern & Simula (They/Them)> oh i hate that so much, it's perfect! |
02:38:36 | FromDiscord | <treeform> you can also use the prev one to cut it down a bit |
02:38:42 | FromDiscord | <treeform> prev [] |
02:39:14 | FromDiscord | <treeform> https://play.nim-lang.org/#ix=26Ev |
02:39:32 | FromDiscord | <Fern & Simula (They/Them)> awesome, thank you so much :) |
02:51:57 | * | lritter_ quit (Quit: Leaving) |
03:14:46 | * | pbb_ joined #nim |
03:14:54 | * | pbb quit (Ping timeout: 252 seconds) |
03:20:01 | * | pbb_ quit (Ping timeout: 252 seconds) |
03:22:25 | * | pbb joined #nim |
03:53:54 | disruptek | ~tables is hash table dictionary mappings; see https://nim-lang.org/docs/tables.html |
03:53:55 | disbot | tables: 11hash table dictionary mappings; see https://nim-lang.org/docs/tables.html |
03:58:28 | * | muffindrake quit (Ping timeout: 248 seconds) |
04:00:40 | * | muffindrake joined #nim |
04:32:11 | * | chemist69_ joined #nim |
04:34:50 | * | chemist69 quit (Ping timeout: 240 seconds) |
04:41:26 | * | nsf joined #nim |
05:07:25 | * | marmotini_ joined #nim |
05:10:48 | madprops | Go programmers love to talk about 'goroutines'. Is there something like that in nim? |
05:10:59 | disruptek | !repo treeform/greenlet |
05:11:00 | disbot | https://github.com/treeform/greenlet -- 9greenlet: 11Greenlet - Coroutines library for nim similar to python's greenlet. 15 15⭐ 0🍴 |
05:11:11 | madprops | huh |
05:14:47 | * | pbb quit (Ping timeout: 252 seconds) |
05:16:56 | * | pbb joined #nim |
05:28:15 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
05:28:39 | * | pbb joined #nim |
05:32:25 | * | narimiran joined #nim |
05:41:55 | * | pbb quit (Ping timeout: 252 seconds) |
05:42:02 | * | pbb joined #nim |
05:46:48 | * | pbb quit (Excess Flood) |
05:46:55 | * | pbb joined #nim |
05:49:01 | * | pbb quit (Client Quit) |
05:52:10 | * | pbb joined #nim |
05:55:31 | * | pbb quit (Client Quit) |
05:58:26 | * | endragor quit (Remote host closed the connection) |
06:00:15 | * | pbb joined #nim |
06:09:03 | * | NimBot joined #nim |
06:14:57 | * | ltriant quit (Quit: leaving) |
06:44:02 | * | endragor joined #nim |
06:48:26 | * | endragor quit (Ping timeout: 240 seconds) |
07:16:08 | * | solitudesf joined #nim |
07:17:28 | * | ptdel quit (Read error: Connection reset by peer) |
07:19:40 | * | ptdel joined #nim |
07:21:21 | * | ptdel quit (Client Quit) |
07:29:32 | * | muffindrake quit (Quit: muffindrake) |
07:30:44 | * | muffindrake joined #nim |
07:39:29 | * | endragor joined #nim |
07:40:42 | * | muffindrake quit (Quit: muffindrake) |
07:41:31 | * | neceve joined #nim |
07:42:16 | * | muffindrake joined #nim |
07:43:43 | * | muffindrake quit (Client Quit) |
07:48:28 | * | muffindrake joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:00:07 | * | PMunch joined #nim |
08:04:53 | * | gmpreussner joined #nim |
08:26:22 | * | marmotini_ quit (Remote host closed the connection) |
08:26:57 | * | marmotini_ joined #nim |
08:30:47 | * | marmotini_ quit (Read error: Connection reset by peer) |
08:31:00 | * | marmotini_ joined #nim |
08:34:39 | * | Vladar joined #nim |
08:39:17 | * | floppydh joined #nim |
08:40:06 | * | dddddd joined #nim |
09:48:44 | PMunch | Strange things I miss from Nim: discard |
09:53:46 | narimiran | leorize: are you here? |
09:54:14 | Araq | PMunch, I missed 'set' in C# fwiw |
09:58:44 | FromDiscord | <Rika> ugh |
09:58:53 | PMunch | Like the set typE? |
09:59:10 | FromDiscord | <Rika> disregard me, i just encountered the reassign stdout issue on windows |
10:01:25 | * | luis_ joined #nim |
10:02:45 | * | marmotini_ quit (Ping timeout: 268 seconds) |
10:04:32 | Araq | PMunch, yeah like if x in {a, b, c} and knowing it produces excellent code |
10:05:17 | PMunch | Yeah, there are many things I'm missing so far |
10:18:20 | PMunch | I also miss UCS and case/underscore insensitivity.. |
10:18:59 | PMunch | And array literals, and the (subjectively) better syntax, and metaprogramming, and the list goes on and on.. |
10:19:13 | PMunch | And "echo".. |
10:20:50 | PMunch | And implicit return |
10:21:34 | PMunch | And named optional parameters.. |
10:24:21 | Araq | named parameters are avaiable in C# |
10:24:43 | PMunch | Are they? |
10:25:03 | Araq | yeah, foo(arg: value) is the syntax, colons instead of equals |
10:25:37 | PMunch | Aah |
10:25:53 | PMunch | Okay, scratch that one thing then |
10:31:27 | * | abm joined #nim |
10:32:39 | * | narimiran quit (Read error: Connection reset by peer) |
10:33:01 | * | narimiran joined #nim |
10:40:39 | * | neceve quit (Ping timeout: 258 seconds) |
10:43:42 | lqdev[m] | don't forget slices, `x in 1..100` is 1000x better than `x >= 1 && <= 100` |
10:43:52 | * | chemist69_ quit (Ping timeout: 260 seconds) |
10:44:24 | * | chemist69 joined #nim |
10:49:36 | * | luis_ quit (Quit: luis_) |
10:50:45 | * | neceve joined #nim |
10:52:18 | * | marmotini_ joined #nim |
10:52:31 | * | pbb quit (Quit: No Ping reply in 210 seconds.) |
10:53:57 | * | pbb joined #nim |
10:56:35 | * | marmotin_ joined #nim |
10:56:42 | * | marmotini_ quit (Ping timeout: 260 seconds) |
11:06:00 | * | neceve quit (Ping timeout: 265 seconds) |
11:06:02 | * | marmotin_ quit (Ping timeout: 260 seconds) |
11:06:27 | * | neceve joined #nim |
11:09:13 | * | freddy92 quit (Quit: Client disconnecting) |
11:13:22 | * | tribly quit (Quit: WeeChat 2.7) |
11:13:45 | * | marmotini_ joined #nim |
11:14:00 | * | tribly joined #nim |
11:19:04 | FromDiscord | <Clyybber> madprops: There are also the goroutines in nim |
11:19:10 | FromDiscord | <Clyybber> literally the same |
11:19:36 | FromDiscord | <Clyybber> !repo goroutines |
11:19:36 | disbot | https://github.com/stefantalpalaru/golib-nim -- 9golib-nim: 11Nim language bindings for golib - a library that (ab)uses gccgo to bring Go's channels and goroutines to the rest of the world 15 69⭐ 3🍴 |
11:20:18 | Zevv | what's this 'missed things' discussion? |
11:31:35 | * | pbb quit (Read error: Connection reset by peer) |
11:32:06 | * | pbb joined #nim |
11:34:36 | * | marmotini_ quit (Remote host closed the connection) |
11:35:13 | * | marmotini_ joined #nim |
11:36:56 | * | nsf quit (Quit: WeeChat 2.7) |
11:39:45 | * | marmotini_ quit (Ping timeout: 268 seconds) |
11:42:40 | * | marmotini_ joined #nim |
12:08:44 | * | abm quit (Ping timeout: 268 seconds) |
12:24:58 | PMunch | lqdev[m], yeah I was ranting about the lack of "for line in myString.lines" yesterday |
12:25:41 | lqdev[m] | PMunch: it's useful in if statements, too |
12:26:00 | PMunch | Oh yeah, that's true |
12:26:38 | FromDiscord | <KcVinu> Hi all, does Nim's "concept" is equal to the "Interface" in C# ? |
12:26:58 | FromGitter | <alehander92> PMunch but they still have extension methods , and c# is not really focused on CLI-s, so no echo-like stuff |
12:27:09 | FromGitter | <alehander92> overally i agree but still c# is one of the nicest mainstream languages |
12:27:13 | FromGitter | <alehander92> afaik |
12:27:39 | PMunch | KcVinu, not really. But they can be used to implement similar functionality |
12:27:47 | PMunch | Conceptually though they are quite different |
12:28:52 | PMunch | alehander92, extension methods? C# is okay, don't get me wrong, but there are certainly things that I miss coming from Nim. |
12:28:59 | FromDiscord | <KcVinu> @PMunch - Great. Is there any examples for concepts using like an Interface |
12:29:21 | PMunch | And don't get me wrong, there are things I miss in Nim as well, the difference is just that with metaprogramming you're often able to implement them yourself :) |
12:29:35 | FromGitter | <alehander92> https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods |
12:29:51 | FromGitter | <alehander92> not the same but still useful |
12:29:55 | PMunch | KcVinu, not that I know of, it's quite a new feature, and I think it's still marked as experimental and unstable |
12:29:58 | FromGitter | <alehander92> yes thats true |
12:29:59 | lqdev[m] | @alehander42 C++ would be even better, if not its horrible error messages that could fill up 10 A4 pages |
12:30:03 | FromGitter | <alehander92> but then you open a can of worms |
12:30:08 | FromGitter | <alehander92> nah sorry c++ is a pass from me |
12:30:11 | PMunch | So there isn't a lot of examples/tutorials/documentation around them |
12:30:27 | FromGitter | <alehander92> it has many genius things but its just .. overdesigned |
12:30:31 | FromGitter | <alehander92> and the compat thing |
12:30:48 | lqdev[m] | yeah |
12:30:52 | lqdev[m] | that's why I prefer C |
12:30:52 | FromGitter | <alehander92> i hope rust/nim/etc manage to take its place |
12:30:56 | lqdev[m] | whenever possible |
12:31:13 | FromGitter | <alehander92> yeah, i kinda prefer it |
12:31:13 | PMunch | KcVinu, normally you would implement interfaces like this in Nim: https://www.openmymind.net/Interfaces-In-Nim/ |
12:31:15 | FromGitter | <alehander92> as well |
12:31:29 | lqdev[m] | also D is a thibg |
12:31:30 | PMunch | That's more or less the way the `streams` module does it |
12:31:37 | lqdev[m] | :s/thibg/thing |
12:32:17 | FromDiscord | <KcVinu> @PMunch -Thanks. |
12:33:14 | PMunch | alehander92, ah so similar to how all procs work in Nim :P |
12:33:34 | FromGitter | <alehander92> thats why i am interested in os research, hopefully future os-es force more software to not depend on C |
12:33:46 | Araq | the more I studied it, the more I liked C++. The concepts behind it are excellent, the language itself sucks though. |
12:33:49 | FromGitter | <alehander92> or at least to make some standartized type API which expresses better stuff |
12:34:22 | FromGitter | <alehander92> Araq it seems to me that it's just very hard to combine all those *many* features + compatibility with C/old C++ |
12:34:25 | Araq | and I'm blaming C for most of the crap in C++ |
12:34:36 | FromGitter | <alehander92> almost impossible otherwise the ideas are probably great |
12:35:05 | FromGitter | <alehander92> thats why what you said about c# is remarkable |
12:35:14 | FromGitter | <alehander92> many features working kinda well together |
12:35:19 | FromGitter | <alehander92> is rarer |
12:35:27 | Araq | take Rust's "borrowed pointers" for example. Turns out C++98 had it, written as & |
12:35:39 | Araq | ok, it wasn't checked |
12:35:48 | Araq | and it still isn't and it's a big problem. |
12:37:51 | Araq | but it's clearly the idea behind &, they didn't know how to make it safe. But back then speed was more important than safety anyway and C++ was competing with C so they focussed on expressivity instead |
12:38:13 | FromGitter | <alehander92> yeah but just look at how many features |
12:38:22 | FromGitter | <alehander92> and competing proposals |
12:38:32 | Araq | like what? |
12:38:37 | FromGitter | <alehander92> and very base stuff like modules is still not even being added |
12:39:14 | FromGitter | <alehander92> ok contracts are removed |
12:39:48 | Araq | take C++: multiple inheritance, one feature dealing with what takes C# 2 features (classes and interfaces) |
12:40:05 | FromGitter | <alehander92> concepts, ranges, spaceship op, coroutines |
12:40:07 | Araq | and C# is still patching its interfaces and adding more and more features to them that classes already have |
12:40:22 | FromGitter | <alehander92> and thats after big changes in 11 and then some in 14,17 |
12:40:31 | FromGitter | <alehander92> and still contracts + modules are even remaining |
12:40:45 | FromGitter | <alehander92> and i constantly see newer ideas like limited pattern matching etc |
12:41:00 | Araq | same in C# land |
12:41:07 | FromGitter | <alehander92> its just a huge language designed by committe, like, its obviously full with great designs/ideas |
12:41:12 | Araq | C# got pattern matching too. |
12:41:17 | FromGitter | <alehander92> but if you somehow sit and try to fit all this in a new language |
12:41:26 | Araq | well then you get Nim. :P |
12:41:45 | FromGitter | <alehander92> in a more designed-together reuse-features way |
12:41:52 | FromGitter | <alehander92> yeah Nim is closer to that ideal somehow |
12:42:28 | FromGitter | <alehander92> C++ just remains me of scala in the way its evolving |
12:42:28 | Araq | but my point is that C++ is actually comparable to C# and Scala when you look at the creeping featurism |
12:42:35 | FromGitter | <alehander92> but i am not an expert in any of them so yeah |
12:42:55 | Araq | so yeah, it's piling features on top of features |
12:43:07 | FromGitter | <alehander92> and too many syntax additions |
12:43:15 | FromGitter | <alehander92> and its not like they're not needed/useful |
12:43:17 | Araq | but so is C# and Scala and maybe Java and Kotlin too |
12:43:31 | Araq | and yet only C++ gets blamed for it ;-) |
12:43:40 | FromGitter | <alehander92> yeah but C++ already had the whole template thing + other stuff + the C history |
12:43:53 | FromGitter | <alehander92> so its piling on a bigger base of piles |
12:44:00 | Araq | C# has the ugly Java history though |
12:44:11 | Araq | where everything must put inside a class |
12:44:16 | Araq | *be put |
12:45:02 | FromGitter | <alehander92> if i'd guess, it should take one e.g. 3 months to become "B2" with C# , ~3 with Nim, 2 with Ruby/Python, and like 7-8 with C++ |
12:45:17 | FromGitter | <alehander92> yeah but thats not complicated to learn |
12:46:56 | Araq | but is your guess based on anything else but folklore. |
12:47:16 | FromGitter | <alehander92> its based on my own experience |
12:47:25 | FromGitter | <alehander92> obviously anecdotical |
12:48:15 | FromGitter | <alehander92> but i agree there are no many big langdesign group research experiments what can you do |
12:48:34 | Araq | when C++ got the blame for its complexity it was about overloading and operator overloading and default parameters. |
12:48:40 | FromGitter | <alehander92> put 5_000 people in tents with X lang for 6 months and start watching their experience |
12:49:02 | Araq | and now many languages have the same things, including Python |
12:49:12 | Araq | and they don't get blamed for these features. |
12:49:15 | FromGitter | <alehander92> yeah but c++ has like 20 new things |
12:49:33 | Araq | so what, in 10 years the other languages will have copied these features :P |
12:49:36 | FromGitter | <alehander92> dont get me wrong, i think the features themselves are good |
12:49:48 | Araq | and also, this is exactly the wrong question |
12:49:50 | * | neceve quit (Ping timeout: 258 seconds) |
12:49:51 | FromGitter | <alehander92> but there must be a better way to combine them |
12:50:00 | Araq | "5_000 people in tents with X lang for 6 months and start watching their experience" |
12:50:08 | Araq | so you only gonna program for 6 months in your life? |
12:50:37 | FromGitter | <alehander92> well i cant imagine how can you do a bigger "science-y" experiment |
12:50:53 | FromGitter | <alehander92> like you can obviously interview some people periodically but no tents man |
12:51:00 | Araq | you can look at the products produced with lang X |
12:51:07 | * | neceve joined #nim |
12:51:09 | FromGitter | <alehander92> eh so many variables |
12:51:15 | Araq | and their reliability, memory consumption etc etc |
12:51:24 | FromGitter | <alehander92> but this is about speed of learning |
12:52:02 | Araq | but why? I can learn Euphoria in an afternoon |
12:52:49 | Araq | and afterwards I'm left with a silly language that doesn't let me create the system I want to create |
12:52:54 | FromGitter | <alehander92> yeah but there is a difference between "learn" and "actually know ~50% of the gotchas and edge cases and usual questions of people and be very productive" |
12:53:13 | FromGitter | <alehander92> and 1 day vs 1 month might not matter |
12:53:19 | FromGitter | <alehander92> but 6 months vs 18 months |
12:53:20 | Araq | exactly, learnability is not the same as "pain to use in practice after you learned it" |
12:53:23 | FromGitter | <alehander92> is a big difference |
12:53:45 | FromGitter | <alehander92> ok, but i just dont see the value |
12:54:14 | FromGitter | <alehander92> in learning e.g. language as c++ compared to e.g. nim (or even rust) |
12:54:44 | FromGitter | <alehander92> like obviously it has great value because of vast amounts of existing technology/jobs and to research ideas |
12:55:12 | FromGitter | <alehander92> but from purely language-to-use it just not a good foundation |
12:55:18 | FromGitter | <alehander92> even if you add 20 more features |
12:55:27 | FromGitter | <alehander92> you have to start removing some stuff |
12:55:42 | FromGitter | <alehander92> to actually make greater progress |
12:55:44 | Araq | ok, fine, I'll bite. What to remove from C++? |
12:56:26 | * | abm joined #nim |
12:59:12 | FromGitter | <alehander92> header/normal files: a simpler proper module system could be nicer ⏎ the whole hard-to-parse-grammar: no need for that, easy tooling is more important ⏎ text macros: just .. so hacky ⏎ no pointer safety by default, pointer syntax, all kinds of C compat-only syntax/type things ⏎ somehow rewrite more "lang" features to be meta-defineable in the language itself/defineable by each other |
12:59:12 | FromGitter | ... [https://gitter.im/nim-lang/Nim?at=5e14809f4687e30fe25c93fb] |
12:59:18 | FromGitter | <alehander92> but yeah thats just a different language |
13:00:33 | Araq | true and it's also where they are trying to get with modules and unique_ptr etc |
13:00:39 | * | marmotini_ quit (Remote host closed the connection) |
13:00:45 | Araq | but indeed it takes them decades |
13:01:12 | * | marmotini_ joined #nim |
13:01:15 | Araq | however, in order to fix e.g. C arrays they had to introduce std::array first, aka you start with *adding* yet another feature |
13:01:24 | Araq | in order to phase out the old cruft |
13:01:43 | FromGitter | <alehander92> exactly |
13:02:14 | FromGitter | <alehander92> probably one cant do it better, like, with their constraints i am even amazed by their progress |
13:02:26 | FromGitter | <alehander92> just saying that if i can use a new language without this foundation why not |
13:02:29 | FromDiscord | <Clyybber> Araq: Ugh, my PSym set doesn't work. Many CFG nodes don't have a sym |
13:02:51 | Araq | Clyybber: ah hmm, yeah sorry, but all have a 'node' |
13:02:57 | FromGitter | <alehander92> and of course .. this becomes the same problem for those new languages <x> time later :P |
13:03:24 | FromDiscord | <Clyybber> Araq: Yeah, I could store that and iterate over each node and see if it aliases the same loc |
13:04:05 | Araq | I think you can do better by simply fixing existing features, like 'int* p' is only a pointer from now on and 'int[*] p' is an array of unclear size |
13:04:35 | Araq | and 'int[N] p; int N' is an array and you can get the size from parameter N |
13:05:07 | Araq | C++ is instead getting observer_ptr<T> for T* that cannot point to an array |
13:05:14 | Araq | madness |
13:05:53 | * | marmotini_ quit (Ping timeout: 260 seconds) |
13:06:24 | FromGitter | <alehander92> but this is just hacky |
13:06:33 | FromGitter | <alehander92> because you then have so many years of programs and people |
13:06:40 | FromGitter | <alehander92> used to the way the features worked |
13:07:06 | FromGitter | <alehander92> so if they keep working .. but in more interesting ways it creates even more thing to learn |
13:07:30 | FromGitter | <alehander92> because you need to learn the new way , the proper way, the possibly limited way people expected X to also work etc |
13:10:05 | Araq | well there is no way around that anyway. You can also switch langs instead and work in a mixed lang environment where you need to learn 2 different languages |
13:11:55 | * | marmotini_ joined #nim |
13:12:19 | Araq | same problem with OSes, they have signals and threads and fork() and shells and env vars |
13:12:37 | Araq | and you have to learn it all or else your program has subtle bugs |
13:13:03 | Araq | or it doesn't "play nicely" with all the other junk |
13:14:52 | Araq | and in a signal handler only a couple of system calls are allowed. But it doesn't matter. And you know why it doesn't matter? |
13:15:24 | Araq | Because there is no "Unix Conf 2019" where people complain about it in their talks that are then uploaded to Youtube. |
13:17:09 | Araq | So all our emotional resources can focus on hating C++'s complexity. |
13:17:25 | FromDiscord | <Clyybber> Araq: The sym field of Instr feels kinda unneccessary IMO, if its just an alias for `if n.kind == nkSym: n.sym else: nil` |
13:17:38 | FromDiscord | <Clyybber> Or does it serve another purpose? |
13:19:35 | FromDiscord | <Skaruts> if you need more militants hating on C++'s complexity I'm in 🙂 |
13:19:36 | Araq | there is special handling for it inside useInstrTargets, defInstrTagets |
13:19:44 | leorize | narimiran: o/ |
13:19:49 | narimiran | leorize: hey! |
13:20:09 | FromDiscord | <gingerBill> C++'s complexity? I hated it so much, I made my own language 😛 I guess that's how Nim got made to some extend too. |
13:20:25 | * | nsf joined #nim |
13:20:42 | FromDiscord | <gingerBill> *extent |
13:21:09 | narimiran | leorize: don't know if i can easily find how to reproduce it, but i had to revert nim.nvim to `ea3bd85fc` commit (pre long-string improvements) because suddenly lots of stuff in system.nim was treated as a string |
13:21:23 | blackbeard420 | one could argue that nim is as complex as c++ |
13:22:03 | leorize | narimiran: try updating to the latest? |
13:22:06 | FromDiscord | <gingerBill> Nim is less complex than C++. I will say that Nim's metaprogramming system is quite complex. But the language itself is not that complicated. |
13:22:25 | * | Lord_Nightmare quit (Ping timeout: 258 seconds) |
13:22:32 | narimiran | leorize: i did. and that's why i reverted back |
13:22:34 | Araq | Clyybber: however, remove the .sym field and see what breaks |
13:22:40 | Araq | in theory it's redundant |
13:23:00 | Araq | and the tests cover everything |
13:23:07 | leorize | narimiran: or this is how to reproduce: open system.nim, do a screenshot when it happens, then send it to me :p |
13:23:36 | FromDiscord | <Skaruts> C++ STL errors are scarily complex |
13:23:38 | narimiran | leorize: ok, let me try going back to latest, producing a bug |
13:24:32 | FromDiscord | <gingerBill> I'm kind of glad there are some languages out there that have been inspired by the Pascal family. It's quite sad to see so many contemporary languages not know of the amazing things that the Pascal family discovered and refined. |
13:24:44 | * | lritter joined #nim |
13:24:49 | FromDiscord | <gingerBill> Sorry to bother you Araq, but what was the reason you made Nim? |
13:25:03 | FromDiscord | <gingerBill> (Or Nimrod as it was called when I first found out about it) |
13:25:41 | narimiran | leorize: (un)fortunately it is easy to reproduce :) screenshots in a minute |
13:25:46 | FromDiscord | <Skaruts> I was given a book on Pascal when I was 16... sadly I never read it... only learned programming 10 years later with a C book. I still have both. |
13:25:57 | leorize | narimiran: yea I just reproduced it :P |
13:26:30 | narimiran | hmm, it seems that after some delay, the highlighting corrects itself |
13:27:17 | FromDiscord | <gingerBill> If you get your hands on any material by Niklaus Wirth, I highly recommend it @Skaruts. Reading his stuff is how I learnt to program compilers and even think about programming correctly. _Algorithms + Data Structures = Programs_ is a great book. |
13:27:29 | FromDiscord | <gingerBill> Compiler Construction is also a brilliant book to learn from. |
13:27:37 | narimiran | leorize: here are some screenshots if needed: https://imgur.com/a/x5W6E0G |
13:27:42 | FromDiscord | <gingerBill> So much better than the Dragon book which everyone seems to recommend for bizarre reason. |
13:27:43 | leorize | narimiran: it's due to the fix I made for Zevv lol |
13:28:13 | narimiran | leorize: yeah, i know :) and that's why i reverted nim.nvim to `ea3bd85fc` commit |
13:28:35 | FromDiscord | <gingerBill> So much better than the Dragon book which everyone seems to recommend for some bizarre reason. |
13:30:58 | FromDiscord | <Skaruts> wouldn't mind reading on compilers actually, always felt the itch to make my own language for fun |
13:32:09 | Araq | gingerBill: I've probably answered the question so often that I wrote down some good answer to that somewhere |
13:32:21 | FromDiscord | <gingerBill> Hahaha. I apologize for that. |
13:32:28 | Araq | but I don't find it so here it is in a nutshell: |
13:32:41 | Araq | study Ada, Modula 3, C++ and Lisp |
13:33:00 | Araq | and realize how much of Lisp can be brought into a "systems" programming setting |
13:33:05 | Araq | and you get Nim. |
13:33:24 | Araq | take the syntax from Python because both {} and 'begin end' suck. |
13:33:29 | lqdev[m] | @Skaruts I can confirm it's fun |
13:34:01 | * | ptdel joined #nim |
13:34:06 | * | Lord_Nightmare joined #nim |
13:34:42 | FromGitter | <alehander92> Araq but its not the same |
13:34:55 | FromDiscord | <gingerBill> Ah... so it was made from the revelation that you could make Ada with Lisp-style macros and still have it be a "systems" programming language? Cool. |
13:34:55 | Araq | Nim doesn't exist because I dislike language X, it exists because it's an "obvious" language design nobody tried out before for some reason |
13:34:57 | FromGitter | <alehander92> when you have a feature X and it just works in the same way always |
13:35:01 | FromGitter | <alehander92> thats just better |
13:35:14 | FromGitter | <alehander92> and yeah os-es are also not a great example |
13:35:23 | FromGitter | <alehander92> but its much harder to change os-es |
13:35:46 | FromGitter | <alehander92> Araq well there are typed lisp-s |
13:35:49 | FromGitter | <alehander92> and even lips os-es |
13:35:53 | FromGitter | <alehander92> so they kinda did |
13:36:11 | Araq | yeah but their type systems were bad |
13:36:23 | FromDiscord | <gingerBill> @Skaruts I recommend also reading compilers themselves. Compilers I recommend to learn from: |
13:36:23 | FromDiscord | <gingerBill> * Oberon (what I learned from too, but probably a little old nowadays) |
13:36:23 | FromDiscord | <gingerBill> * Go (there are two different ones (the actual one and the tooling package)) |
13:36:24 | FromDiscord | <gingerBill> * Nim (very clear and simple, and written in Nim too) |
13:36:24 | FromDiscord | <gingerBill> * Odin (clear to read, and sorry to plug my own, but it is a clear resource to learn from too) |
13:36:25 | FromDiscord | <gingerBill> |
13:36:27 | Araq | for example, most Lisps use type annotations for optimizations |
13:36:28 | FromDiscord | <gingerBill> But all of these compilers have something in common, they are all quite Pascal-like in design (not just the type system) |
13:36:48 | Araq | but they don't *check* the types |
13:37:14 | Araq | it's more like "assume this type X here to produce faster code", like C's restrict feature. |
13:37:29 | Araq | the good type system for systems programming was explored by Ada IMHO |
13:37:58 | FromGitter | <alehander92> probably yeah |
13:38:23 | FromGitter | <alehander92> but still probably somebody did a lisp with ada-like stuff |
13:38:51 | FromDiscord | <Skaruts> well I made a brainfuck compiler from a nim tutorial once 🙂 |
13:39:07 | FromGitter | <alehander92> but i dont really love the lisp syntax these days after playing with it many years |
13:39:07 | FromGitter | <alehander92> gingerBill oh, you're the odin creator, welcome |
13:39:14 | FromDiscord | <gingerBill> I am 🙂 Hello. |
13:39:15 | FromGitter | <alehander92> hate the name, but otherwise great effort |
13:39:27 | FromGitter | <alehander92> are you coming to fosdem? |
13:39:37 | FromDiscord | <gingerBill> I am not. |
13:40:02 | FromDiscord | <gingerBill> Also, you are literally the first person to say they hate the name. Not a joke. The name just started off as a code name and it stuck. |
13:40:20 | FromDiscord | <Skaruts> soudns nordic |
13:40:24 | FromDiscord | <Skaruts> sounds* |
13:40:35 | FromDiscord | <gingerBill> Because it's named after the Norse god Odin 😛 |
13:40:43 | FromDiscord | <Skaruts> indeed 🙂 |
13:40:50 | FromGitter | <alehander92> yeah i just really dislike "mythology"-based names, they dont come from a good place |
13:40:53 | FromGitter | <alehander92> but yeah it've been good to see you on fosdem |
13:40:57 | FromDiscord | <gingerBill> I like my mythology, similar to Nim (Nimrod) 😛 |
13:41:14 | FromDiscord | <Skaruts> what does nimrod mean? |
13:41:14 | leorize | narimiran: fixed |
13:41:16 | FromGitter | <alehander92> i hate the nimrod name as well, my single biggest `-` about nim's history |
13:41:27 | FromGitter | <alehander92> the crown as well |
13:41:30 | FromDiscord | <Skaruts> yea I prefer nim |
13:41:40 | FromGitter | <alehander92> there was this idea to make a emerging langs room |
13:41:42 | FromDiscord | <gingerBill> Nimrod is the biblical figure. |
13:41:48 | FromGitter | <alehander92> but mostly crystal/nim got talks |
13:42:01 | FromDiscord | <Skaruts> oh, rings a bell |
13:42:11 | Araq | how long is my talk again? |
13:42:11 | narimiran | leorize: now that was fast! (and a nice fix with the restriction :)) |
13:42:19 | Araq | do I need to prepare anything? |
13:42:45 | Araq | I kinda lost my motivation to prepare anything, just give me a whiteboard and let me talk |
13:42:57 | FromDiscord | <gingerBill> Nimrod was the leader who built the Tower of Babel, if I remember correctly. |
13:43:07 | Araq | exactly |
13:43:25 | FromGitter | <alehander92> gingerBill yeah, but thats a pretty bad character from the Bible |
13:43:29 | Araq | he was also the first king ever. (according to scripture) |
13:44:46 | FromDiscord | <gingerBill> I like the stories. Odin's story is pretty cool. Being "bad" isn't really a thing about with regards to those stories. They are kind of archetypes and they have numerous virtues and vices. |
13:45:06 | FromGitter | <alehander92> eh thats not true |
13:45:35 | FromGitter | <alehander92> like, it's very true but |
13:45:45 | FromGitter | <alehander92> being rebellious against God is a pretty clear negative narrative (about Nimrod) |
13:45:52 | FromGitter | <alehander92> especially compared to e.g. Abraham |
13:45:52 | FromDiscord | <Skaruts> I might call my own language Nazgul -- which is also a king (an undead king - aka a Lich - which makes The Lich King name from WoW a redundancy) |
13:46:34 | FromDiscord | <Skaruts> it's also the most badass character from lotr 😄 |
13:46:51 | FromDiscord | <gingerBill> Again, Odin was just the name that stuck. Instead of worrying about a name for a project, I give a codename, usually named after a mythological figure. |
13:47:13 | Araq | alehander92: for me it always was about in arrogance attempting something doomed to fail |
13:47:27 | FromDiscord | <gingerBill> Lich is old english for corpse. Not king. |
13:47:59 | FromGitter | <alehander92> gingerBill there are many other nicer names to choose from :P |
13:48:07 | FromGitter | <alehander92> like `gingerBill`, this one is pretty cool |
13:48:28 | FromDiscord | <Skaruts> maybe I'm wrong then... back in Heroes of Might & Magic, Liches had crowns if I recall |
13:48:58 | FromDiscord | <Skaruts> maybe I got the wrong impression from several places |
13:49:04 | FromDiscord | <gingerBill> I'm not naming my language after myself. Who do I look like?---Linus Torvalds naming everything after himself. |
13:49:28 | FromDiscord | <Skaruts> is git named after himself? |
13:49:28 | Araq | " being rebellious against God " is a narrow point of view |
13:49:33 | FromGitter | <alehander92> Araq yeah this seems like a good description of it |
13:49:37 | FromDiscord | <gingerBill> Yes. Git is named after him. |
13:49:40 | FromGitter | <alehander92> (the arrogance attempt) |
13:50:07 | FromDiscord | <gingerBill> Git is a British insult for someone who is unpleasant, silly, etc. |
13:50:27 | Araq | you could give me some points for the self-reflections :P |
13:51:03 | PMunch | Araq, your talk is scheduled for 30 minutes, but please allow a little time to switch speakers as well, the talks are scheduled back-to-back. |
13:51:32 | narimiran | ...and for questions, right? |
13:51:59 | PMunch | And what do you mean "there was this idea to make a emerging langs room" alehander92? We have the "Minimalistic, Experimental and Emerging Languages devroom". |
13:52:47 | PMunch | And I think it's preffered to have slides, that way it's easier to watch the presentation later/live on video. |
13:53:06 | PMunch | Since you can download the slides as well (these should be uploaded before the presentation). |
13:53:12 | PMunch | Didn't you get a mail about this Araq? |
13:53:36 | Araq | I did but I don't remember |
13:54:02 | PMunch | Ah okay, but you are able to find this information if I'm not around :P |
13:54:48 | PMunch | alehander92, about the historical connotations about names, those are of course highly subjective. |
13:55:26 | PMunch | And wasn't the purpose of the tower of Babel to get closer to god, not to rebell against him? |
13:55:33 | PMunch | That whole story is really strange TBH |
13:55:37 | FromDiscord | <Clyybber> alehander92: Being rebellious against god must not be bad, if you relate it to lang design |
13:55:53 | FromDiscord | <Clyybber> challenge the best |
13:56:01 | FromDiscord | <gingerBill> Regarding the creation of Nim, I guess I came at designing Odin quite differently. I was getting annoyed with C and C++ but not seeing any sane alternatives. I tried just writing in C for my personal projects to see what I actually needed from a language, and it turned out to be very little. But the issues with C were bone deep and with the amount of augmentation I was doing to C (metaprogrammer tool), even doing that didn't help. So I j |
13:56:01 | FromDiscord | <gingerBill> |
13:56:01 | FromDiscord | <gingerBill> I didn't come at it from the perspective "why hasn't this language been made yet with these elements?". |
13:57:08 | PMunch | narimiran, yeah questions as well (if you want them :P) |
13:58:00 | narimiran | PMunch: my point was: if you have 30min for your talk. you should probably speak no more than 22-23min, to allow some time for questions |
13:58:23 | FromGitter | <alehander92> Clyybber well, i understand now the idea but it still seems like a bad metaphor for it, like i see much more the "confused unfaithful arrogance with inevitable fail" angle |
13:58:23 | FromGitter | <alehander92> you can call it `david` for the "beat the best" thing |
13:58:59 | PMunch | narimiran, that's true :) |
13:59:45 | Araq | alehander92: well the "Babel" reference also refers to current situation see https://xkcd.com/927/ |
13:59:56 | FromDiscord | <gingerBill> The Tower of Babel is very powerful symbolic story. The moral of its story is that you cannot create the "City of God" on Earth as trying to do so will end is failure. |
13:59:58 | FromDiscord | <gingerBill> (in |
14:00:21 | FromGitter | <alehander92> yea |
14:00:35 | Araq | and also, within Nim itself there is a Babel inside because you can use its macro system to create messes where nobody can understand each other's code. |
14:01:07 | Araq | so many different ways of looking at "Nimrod". it was a great name. |
14:01:13 | FromGitter | <alehander92> well, i wouldnt call it a bad thing, because after all it did turn out well for people imo |
14:02:20 | FromDiscord | <gingerBill> Names are the least thing to worry about. |
14:02:22 | FromGitter | <alehander92> from a christian viewpoint i still think dont see the good/subjective angle: as actual rebeliousness is literally one of the worst acts in the bible |
14:02:37 | FromDiscord | <Skaruts> I though nobody understanding each other's code was the current situation 🤔 |
14:03:21 | FromGitter | <alehander92> and after all the goal of nim is not really to "make a mess" or be foolishly ambitious and fail :D |
14:04:14 | FromDiscord | <Clyybber> alehander92: nim is so fine it challenges the nature of god and computation itself :p |
14:04:25 | FromGitter | <alehander92> so i really like the fact its related to scripture in a creative way, but its just the totally wrong name/connotation imo |
14:04:34 | FromDiscord | <Clyybber> Araq: Did you see this? https://github.com/belamenso/v |
14:05:12 | FromDiscord | <Clyybber> connotation depends on subjective interpretation |
14:05:15 | Araq | can you imagine in 2006 when I created the project the name was more in touch with reality |
14:05:53 | PMunch | I like Nim, and I like that it stems from Nimrod. Adds some history and flavour to the name, without keeping any current connotations |
14:05:59 | Araq | Clyybber: yeah I've seen it |
14:06:18 | Araq | PMunch, let that be the final word about it, completely agree. |
14:07:03 | FromGitter | <alehander92> as i said i like the idea, just my interpretation is that from biblical viewpoint calling X nimrod is similar to calling X stalin/hitler (literally) |
14:07:13 | FromGitter | <alehander92> but i guess people can argue about that indeed |
14:07:23 | FromDiscord | <Clyybber> baad analogy |
14:07:29 | FromDiscord | <gingerBill> I thought that was V thing was going to be related to the Vaporware/Scam that is the V language. I'm glad it wasn't 🙂 |
14:08:33 | FromDiscord | <Clyybber> also, stalin is a pretty good lisp |
14:08:36 | FromDiscord | <Clyybber> like freaking fast |
14:08:45 | FromGitter | <alehander92> Clyybber nope. exactly a good analogy, because you didnt see it that way so it makes you think |
14:08:55 | PMunch | Isn't V being developed still? |
14:08:55 | FromGitter | <alehander92> yeah i remember that implementation :D |
14:09:15 | Araq | you're the first to compare Nimrod to Hitler |
14:09:15 | FromDiscord | <gingerBill> `"Stalin brutally optimizes."` |
14:09:33 | Araq | and I think it's blown out of proportion |
14:10:09 | Araq | longing for meeting God is not anti-christian. |
14:10:50 | FromDiscord | <Clyybber> and even if it were, the world is not your christian-server :p |
14:11:27 | FromDiscord | <gingerBill> PMunch: V was pretty much a scam when it started out. It claimed it could do numerous things, when it didn't. Many of which were impossible too. And when it was first released in some form, it was pretty much a basic C preprocessor. The chap behind is very good at "marketing" and many people believed his claims or promise. The chap didn't even know why an AST was needed. I remember reading he finally added an AST to the compiler a few we |
14:12:53 | Araq | gah, you're making me unproductive. see you later. |
14:13:00 | FromDiscord | <gingerBill> Same! Gah! |
14:13:06 | FromDiscord | <Skaruts> is there a good reason why countup and countdown include the end limit? |
14:13:35 | FromDiscord | <gingerBill> Most people think of `countup` as `countupto`, i.e. inclusive. |
14:13:38 | FromDiscord | <Clyybber> is there a good reason why they shouldn't? |
14:14:07 | FromDiscord | <Skaruts> I don't know, from my experience 99.9% of the time you want to exclude it |
14:14:23 | FromDiscord | <Clyybber> then use ..< |
14:14:34 | FromDiscord | <Skaruts> when you say "for i in 10", you mean you want 10 iterations, not 11 |
14:14:43 | FromDiscord | <Skaruts> I know, I'm just asking |
14:14:59 | narimiran | @Skrauts don't ask that, Araq just said that he's leaving :D |
14:15:00 | FromGitter | <alehander92> Araq i'd absolutely love it longing was the internal motivation, but i doubt it as from what i've read about it was more about <a mighty king trying to replace God in the eyes of local people vs God> (and if that was it , why would God respond with destroying it?) |
14:15:41 | FromDiscord | <Skaruts> lol yea |
14:17:30 | FromGitter | <alehander92> gingerBill the guy from V was confused imo, i'd say that he was very motivated, but technically naive and thought many things seem much easier in his todo + hoping to work on something that he loves + some panic led to this chaos |
14:17:34 | FromDiscord | <Skaruts> I wrote my own iterator anyway, which is basically Godot's "range" iterator, but made slightly better (not sure yet if it will conflict with system.range, but so far so good) |
14:17:55 | FromGitter | <alehander92> but i wouldnt call it a scam, sorry |
14:18:20 | FromGitter | <alehander92> and a proper language project doesnt need to worry about such cases |
14:18:39 | FromDiscord | <Skaruts> but I find it strange that the default functionality that comes with the language isn't what I see people using most of the time (kinda like lua tables starting from 1) |
14:19:05 | FromGitter | <alehander92> Clyybber yeah, but i can always try to make it one :) |
14:19:21 | PMunch | You can't iterate to int.high with an exclusive countup ;) |
14:19:52 | FromGitter | <alehander92> such an edge case :D |
14:19:53 | FromDiscord | <Skaruts> how does the for look like with that? |
14:20:09 | PMunch | alehander92, true :P |
14:20:19 | FromDiscord | <Clyybber> alehander92: excorcise me |
14:20:19 | PMunch | `for i in int.low..int.high`? |
14:20:38 | FromDiscord | <Skaruts> meh that's even more typing than `..<` |
14:20:58 | * | marmotini_ quit (Remote host closed the connection) |
14:20:58 | PMunch | Skaruts, that iterates over all int numbers |
14:21:19 | FromGitter | <alehander92> Clyybber contact your closest Church unironically :P |
14:21:35 | * | marmotini_ joined #nim |
14:21:43 | FromDiscord | <Skaruts> oh, right |
14:22:14 | FromDiscord | <Skaruts> I misunderstood you before actually |
14:22:16 | PMunch | It's not a replacement for `..<` I was just explaining a potential reason why `..` was inclusive |
14:23:25 | PMunch | Gah, now I have too many tabs open again.. 295 this time.. |
14:23:34 | FromDiscord | <Clyybber> 396 |
14:23:42 | FromDiscord | <Skaruts> I get that `..` is inclusive, because that how ranges work (although it could also be `..` exclusive and something like `..>` includive, but anyway), but the iterator functions is what I find stranger |
14:24:17 | PMunch | Wait, you want iterators to not include the last element? |
14:24:53 | FromDiscord | <Skaruts> yes |
14:25:13 | FromDiscord | <Skaruts> well, I'm wondering why they don't |
14:25:24 | PMunch | So `for c in "hello"` should iterate with the values 'h', 'e', 'l', and 'l'? |
14:25:50 | FromDiscord | <Skaruts> nah, I'm just referring to countup and countdown |
14:26:04 | * | marmotini_ quit (Ping timeout: 268 seconds) |
14:26:16 | PMunch | Then the same argument goes as for ranges.. |
14:28:32 | FromDiscord | <Skaruts> I always interpreted a for loop as "give me x iterations", and not as "give me a range of numbers between x and y inclusive" |
14:29:48 | FromDiscord | <Skaruts> 99.9% of C loop are defined with `i < X;` |
14:29:59 | FromDiscord | <Clyybber> thats why we have ..< |
14:30:06 | FromDiscord | <Clyybber> the same reasoning doesn't apply for nim |
14:30:10 | FromDiscord | <Clyybber> since we have low and high too |
14:30:39 | FromDiscord | <gingerBill> `..` being exclusion is most likely because of Pascal. |
14:30:44 | FromDiscord | <gingerBill> *inclusive |
14:30:46 | FromDiscord | <Clyybber> and also since we don't have a `for i in countup(10) |
14:30:52 | FromDiscord | <Clyybber> countup has two params |
14:30:54 | FromDiscord | <gingerBill> `..` being inclusive, damn typos. |
14:31:14 | FromDiscord | <Skaruts> yea the fact that countup takes two params is also annoying |
14:31:26 | * | vsantana quit (Quit: leaving) |
14:32:36 | FromDiscord | <Clyybber> I don't think so |
14:32:49 | FromDiscord | <Clyybber> there is no default that would make sense here |
14:32:59 | FromDiscord | <Clyybber> unless you assume all arrays are indexed starting at zero |
14:33:03 | FromDiscord | <Clyybber> which isn't a given in nim |
14:33:11 | FromDiscord | <Clyybber> since you can have arrays indexed at one too |
14:35:53 | PMunch | In that case you're likely to just use `for i in array` anyways |
14:36:21 | FromGitter | <alehander92> yeah range |
14:36:26 | FromGitter | <alehander92> looping isnt so common imo |
14:36:39 | FromGitter | <alehander92> i'd like to have faster slice looping tho |
14:36:50 | FromGitter | <alehander92> so e.g. if i write for i, element in a[2..^1]: |
14:36:58 | FromGitter | <alehander92> this doesnt allocate a new sequence and copy |
14:38:00 | PMunch | That would be neat |
14:38:08 | PMunch | But could be hard to implement.. |
14:38:39 | PMunch | Or maybe not actually |
14:40:02 | FromDiscord | <Clyybber> its something that will be solved once we nail borrow semantics down |
14:40:58 | FromGitter | <alehander92> the whole slice/view thing |
14:41:30 | * | nsf quit (Quit: WeeChat 2.7) |
14:43:31 | FromDiscord | <gingerBill> Here is my controversial opinion: Ownership/Borrow semantics is an area of research which little actual evidence that helps its purported goals. I wish there was a language that tested to see if this obvious/naive approach to Ownership/Borrow semantics actually achieves the goals it set out to do. |
14:44:18 | FromDiscord | <gingerBill> I know Nim has Move semantics. |
14:44:54 | FromDiscord | <Skaruts> on the iterators, I find this much more in line with what people use (which is why other languages do it, I believe -- and this came from godot, but I improved a bit): https://play.nim-lang.org/#ix=26GC |
14:44:58 | FromDiscord | <gingerBill> However, Nim's approach is not as pervasive as Rust's. |
14:45:07 | FromDiscord | <gingerBill> So Nim's approach is optional. |
14:45:12 | FromGitter | <alehander92> it does help goals imo, i guess you ask if the amount of help is worth it? |
14:46:41 | FromGitter | <alehander92> i think one posibility is for borrow-like semantics to become so well known in system world(rust,c++ etc) that people just accept them as a "base" thing to learn, and not as a additional feature/layer bringing complexity |
14:46:54 | FromDiscord | <gingerBill> Yes and no. So it helps a particular set of safety goals which means you must write in a particular style which is a huge cost to productivity and even conceptualizing the problem at hand. |
14:47:27 | FromGitter | <alehander92> i agree, but you can just write parts of your projects in this style and other parts in gc-assisted style |
14:47:35 | FromGitter | <alehander92> maybe |
14:47:40 | FromGitter | <alehander92> one day |
14:47:45 | FromDiscord | <gingerBill> A lot of the time, most of the problems ownership semantics tries to solve is much better solved with a subsystem that gives out handles. |
14:47:54 | FromDiscord | <gingerBill> Handles with specific generation information and more. |
14:48:29 | FromDiscord | <Clyybber> @Skaruts its empty |
14:48:32 | FromDiscord | <gingerBill> For a GC'd language, this approach could easily be applied to the language by extending the concept of the pointer even further. Obese pointers? |
14:49:32 | FromDiscord | <gingerBill> But the approach of subsystems controlling things is not really a language enforceable thing which is naturally bit up from basic building blocks in the type system. |
14:49:41 | FromGitter | <Willyboar> Hey guys. I was sick for the last 4-5 days. |
14:49:49 | FromGitter | <alehander92> how would that "generation information" look like sorry cant really guess it yet |
14:50:06 | FromGitter | <alehander92> @Willyboar hey kalimera |
14:50:29 | FromDiscord | <Clyybber> @gingerBill move semantics are an optimization, and with slices its just an optimization too. |
14:50:42 | FromDiscord | <Clyybber> We will strive to make it non-intrusive |
14:50:49 | FromDiscord | <gingerBill> alehander92: quite a few different ways actually. Depends on the problem at hand. Floooh (Andre) has a good blog post on what I mean regarding this: https://floooh.github.io/2018/06/17/handles-vs-pointers.html |
14:51:26 | FromGitter | <Willyboar> Kalispera 😉 @alehander92 |
14:51:29 | FromDiscord | <gingerBill> @Clyybber Yes. Which is why I don't think Nim's "move" semantics are actually a bad thing. It's just weird that they called that. |
14:51:39 | FromDiscord | <Clyybber> well they move stuff |
14:51:48 | FromDiscord | <Clyybber> when its a last read we can move |
14:51:49 | FromDiscord | <Clyybber> it |
14:52:01 | FromGitter | <alehander92> gingerBill i remember that one i think |
14:52:07 | FromGitter | <alehander92> and i really liked some insights |
14:52:25 | FromGitter | <alehander92> but cant remember most of the meat |
14:52:26 | FromDiscord | <gingerBill> I'm old school, so nothing is being moved. How computers work =/= how every day objects work |
14:52:28 | FromGitter | <alehander92> thanks |
14:52:31 | FromDiscord | <Clyybber> and right now I'm working on logic to make sure that when stuff is moved it doesn't have to be zeroed out if it will be fully written to |
14:53:28 | FromDiscord | <Clyybber> gingerBill: Its called move because you wouldn't want to destroy twice |
14:53:31 | FromDiscord | <Clyybber> so you "move" it |
14:53:38 | FromDiscord | <Clyybber> zeroing out the source location |
14:53:46 | FromDiscord | <Clyybber> if you have to |
14:53:52 | FromDiscord | <Clyybber> otherwise its just a memCpy |
14:54:04 | * | marmotini_ joined #nim |
14:54:31 | FromDiscord | <gingerBill> A simple way to implement handles (in C) could be like this: |
14:54:31 | FromDiscord | <gingerBill> ```c |
14:54:31 | FromDiscord | <gingerBill> struct Handle { uint32_t index, generation; }; |
14:54:31 | FromDiscord | <gingerBill> ``` |
14:54:32 | FromDiscord | <gingerBill> or even |
14:54:32 | FromDiscord | <gingerBill> ```c |
14:54:32 | FromDiscord | <gingerBill> struct Handle { uint32_t index : 10; uint32_t generation : 22; }; |
14:54:34 | FromDiscord | <gingerBill> ``` |
14:54:52 | FromDiscord | <gingerBill> Different systems may require more or fewer bits. |
14:56:52 | * | PMunch quit (Quit: Leaving) |
14:56:59 | FromDiscord | <gingerBill> @Clyybber Yes. It's an optimization for objects with constructors. |
14:57:09 | FromDiscord | <Clyybber> *destructors |
14:57:13 | FromDiscord | <gingerBill> Yes. |
14:57:16 | FromDiscord | <gingerBill> TYPOS GALORE TODAY! |
15:00:45 | disruptek | slice/views are efficiently impl with cursors. |
15:02:20 | lqdev[m] | what's the new .cursor pragma for? |
15:02:26 | * | Vladar quit (Quit: Leaving) |
15:07:58 | FromGitter | <alehander92> gingerBill yeah it sounds good |
15:08:37 | FromGitter | <alehander92> but it does need good language support imo |
15:08:41 | FromDiscord | <Clyybber> Araq: Can you explain what PathKinds0 and PathKinds1 mean? |
15:08:48 | FromGitter | <alehander92> to make it less easy to have errors |
15:09:06 | FromDiscord | <Clyybber> Araq: Does the number refer to the child node? |
15:11:53 | FromDiscord | <Skaruts> @Clyybber strange, it's not empty for me |
15:12:13 | FromDiscord | <Clyybber> huh, now it works |
15:12:27 | FromDiscord | <Skaruts> maybe try this one then: https://play.nim-lang.org/#ix=26GK |
15:12:57 | disruptek | can i get some arc help today, some point? |
15:13:34 | FromDiscord | <Clyybber> sure |
15:14:16 | disruptek | thanks; checkout gittyup and play with the constants at the top of tgit.nim. bbiab more coffee. |
15:14:19 | FromDiscord | <Clyybber> @Skaruts nice, I personally find exclusive ranges unintuitive in this case, but thats the joy of nim, just write what you need yourself and use it as if it were builtin |
15:14:55 | FromDiscord | <Skaruts> don't you have to be correcting for the inclusivity all the time? |
15:15:08 | FromDiscord | <Clyybber> how so? |
15:15:18 | FromDiscord | <Clyybber> only with len |
15:15:27 | FromDiscord | <Clyybber> and then you could just use high instead |
15:15:36 | FromGitter | <matrixbot> `grantmwilliams` man ive been having a lot of fun playing around with Nim. Still awful with it, but it feels really good |
15:16:15 | disruptek | turns out the awful phase can last months and months if you're a knucklehead. |
15:16:31 | FromDiscord | <Skaruts> will with the normal for loop, if 99.9% of the time you type `..<` and not `..`, then you're essetially doing -1 all the time, correcting for the inclusivity |
15:16:53 | FromDiscord | <Clyybber> @Skaruts It depends on what you are iterating upon |
15:17:14 | FromDiscord | <Clyybber> and even if you do I find `..<` better, because its look clarifies that its exclusive |
15:17:20 | FromDiscord | <Clyybber> upper bound exclusive |
15:19:08 | FromGitter | <alehander92> disruptek say no to coffee |
15:19:11 | FromGitter | <alehander92> say yes to airyan |
15:19:16 | FromDiscord | <Skaruts> well, exclusivity should be implicit if it was the default, not needed to be clarified |
15:19:28 | FromDiscord | <Clyybber> no |
15:19:32 | FromDiscord | <Clyybber> it should not be |
15:19:35 | FromDiscord | <Clyybber> there is no default |
15:19:47 | FromDiscord | <Clyybber> you simply use the appropriate iterator |
15:20:06 | FromDiscord | <Skaruts> the default is `..`, the `<` is a correction |
15:20:16 | FromDiscord | <Clyybber> no it is not |
15:20:20 | FromDiscord | <Skaruts> it's the added `-1` |
15:20:26 | FromDiscord | <Skaruts> it's an extra symbol |
15:20:30 | FromDiscord | <Clyybber> and so? |
15:20:40 | FromDiscord | <Clyybber> I find an extra symbol to clarify a good thing |
15:20:45 | FromDiscord | <Skaruts> whch you don't need most of the time 🙂 |
15:21:10 | FromDiscord | <Skaruts> well, you do need in nim, but you don't need most of the time the inclusive limit, is what I mean |
15:21:43 | FromDiscord | <Clyybber> yeah, but its wrong |
15:21:50 | FromDiscord | <Clyybber> or at least not verifiable |
15:21:52 | FromGitter | <alehander92> i think 1 .. n is certainly more obvious to be inclusive |
15:22:07 | FromGitter | <alehander92> so i can imagine ..= and ..< |
15:22:13 | FromGitter | <alehander92> (probably those exist somewhere else) |
15:22:17 | FromGitter | <alehander92> but no .. for exclusivity |
15:22:20 | FromDiscord | <Clyybber> also, I think regardless of what is more common, one should choose the best fitting (visually) |
15:22:23 | FromGitter | <alehander92> it just seems confusing |
15:22:28 | FromDiscord | <Clyybber> yeah |
15:23:14 | FromDiscord | <gingerBill> ..= is probably clearer but ugly. Maybe that's just me |
15:24:17 | FromDiscord | <Skaruts> maybe I'm biased, but 99.9% of the time I need exclusive, and that's also wht I've been seeing in other people's code, even in nim most people use `..<` most of the time and not `..`, and my point is just that what people need the most should be the default (i.e. the form that doesn't need to be corrected for) |
15:24:39 | FromDiscord | <Clyybber> IMO its better to have clear, intuitive syntax over saving one char |
15:24:40 | FromDiscord | <Skaruts> (and by biased I mean, maybe my applications are different in nature, most of what I do is games) |
15:25:17 | FromDiscord | <Clyybber> @Skaruts there is no default |
15:25:31 | FromDiscord | <Clyybber> there is no error thus there need not be a correction |
15:26:18 | FromDiscord | <Skaruts> well I'm sorry but there is, `countup` and `countdown` are inclusive by default, and the `<` is a extra correction for the inclusive `..` |
15:26:42 | FromDiscord | <Clyybber> correction is simply the wrong word |
15:26:52 | FromDiscord | <Skaruts> it's equivalent to -1 |
15:27:01 | FromDiscord | <Clyybber> no |
15:27:11 | FromDiscord | <Skaruts> lol it is |
15:27:11 | FromDiscord | <Clyybber> onky for integers |
15:27:16 | FromDiscord | <Skaruts> of course |
15:27:25 | FromDiscord | <Skaruts> I'm not talking about iterating over arrays or strings |
15:27:33 | FromGitter | <alehander92> floats |
15:27:43 | FromGitter | <alehander92> can we iterate through floats :O |
15:27:54 | FromDiscord | <Clyybber> alehander92 nope |
15:27:55 | FromDiscord | <Skaruts> I have no idea |
15:28:15 | FromDiscord | <Clyybber> I think there was a PR for it but it was rejected |
15:28:26 | FromDiscord | <Clyybber> since you could overshoot |
15:28:36 | FromDiscord | <Clyybber> due to float arithmetic |
15:28:40 | FromGitter | <alehander92> yes |
15:28:46 | FromDiscord | <Skaruts> yea imprecision might ruin it |
15:31:03 | FromDiscord | <Clyybber> @Skaruts when else do you need ..< ? |
15:31:12 | FromDiscord | <Clyybber> if not for iterating over arrays |
15:31:23 | FromDiscord | <Skaruts> everywhere else really |
15:31:39 | FromDiscord | <Skaruts> the cases where I need inclusive are very rare |
15:31:52 | FromDiscord | <Skaruts> same for what I've seen from other people |
15:32:04 | FromDiscord | <Clyybber> without examples we cant really argue |
15:32:11 | FromDiscord | <Skaruts> well even in one video from Araq I noticed he was using `..<` |
15:32:41 | FromDiscord | <Clyybber> also clarity is always better than.. well not clarity |
15:33:13 | FromDiscord | <Clyybber> inclusive ranges are symmetric, .. is symmetric |
15:33:24 | FromDiscord | <Clyybber> so it just makes more sense |
15:33:39 | FromDiscord | <Skaruts> tbh when I started with nim I had many errors from forgetting a `<` and I struggled to see the error because it's really easy to overlook a missing `<` |
15:33:49 | FromDiscord | <Clyybber> its simply not worth it to shave one char off and create mass confusion |
15:34:38 | FromDiscord | <Clyybber> @Skaruts lol, i was about to argue that it prevents off by one errors due to being easier to reason about |
15:34:50 | FromDiscord | <Clyybber> but i guess that argument doesnt hold for ya |
15:35:14 | FromDiscord | <Skaruts> I never heard anyone complaining |
15:35:26 | FromDiscord | <Clyybber> youll get used to it though, and someday you will appreciate it i gues |
15:35:51 | FromDiscord | <Skaruts> this is kinda like lua starting arrays at 1 for me, it's one thing I never seen anyone complaining about that it's confusing to start at 0 |
15:36:04 | nisstyre | some languages have a .next() method for floats that does something with the epsilon value, but it's not very useful |
15:36:06 | disruptek | fewer rules and fewer exceptions, please. |
15:36:09 | FromDiscord | <Clyybber> go to luaconf then |
15:36:40 | FromDiscord | <Skaruts> I've seen many people complaining that the arrays in lua start at 1, never the that arrays in other places start at 0 |
15:37:00 | FromDiscord | <Skaruts> and same for for exclusive loops |
15:37:52 | FromDiscord | <Skaruts> in the 12 years I've been programming and reading other people's code, the cases where I've seen a C/C++ loop use `i<=X` are few and specific |
15:38:26 | disruptek | really. |
15:39:06 | FromDiscord | <Skaruts> heh, I was gonna give you examples, but I converted all my code to use the range iterators I made... lol I gotta go on another project |
15:42:25 | FromDiscord | <Clyybber> @Skaruts see, even C is explicit about it, they use `<` it would be simply unintuitive to assign a symmetric operator `..` to a relation that is not symmetric. |
15:44:16 | * | rauss joined #nim |
15:44:34 | FromDiscord | <Skaruts> C is different, in the sense that you have to specify a comparison, it's not that its explicit |
15:44:38 | FromDiscord | <Skaruts> see python for loops |
15:44:40 | * | rauss quit (Client Quit) |
15:44:48 | FromDiscord | <Skaruts> here's an example: https://github.com/Skaruts/Game-of-Life-in-Multiple-Languages/blob/master/Nim/cellmap.nim#L35 |
15:44:50 | * | rauss joined #nim |
15:44:52 | * | rauss quit (Client Quit) |
15:44:52 | FromDiscord | <Skaruts> btw |
15:45:01 | * | rauss joined #nim |
15:45:06 | FromDiscord | <Skaruts> here's an example: <https://github.com/Skaruts/Game-of-Life-in-Multiple-Languages/blob/master/Nim/cellmap.nim#L35> |
15:45:41 | FromDiscord | <Skaruts> here more: <https://github.com/Skaruts/roguelikedev-rl-tutorial-2019/blob/master/map_gen/dungeon_gen.nim#L15> |
15:45:51 | FromDiscord | <Clyybber> I just don't see the problem |
15:46:26 | FromDiscord | <Clyybber> Nim doesn't save you that one char because it is *not* opinionated |
15:47:23 | FromDiscord | <Skaruts> this isn't matter of opinion, it's a matter of what is it that people use most of the time, inclusive or exclusive |
15:47:37 | FromDiscord | <Clyybber> ugh |
15:47:46 | disruptek | yes, but if we tie semantics to the past, we never advance what people use. |
15:47:51 | FromDiscord | <Skaruts> from my experience, exclusive, and why most languages (that I know at least) are exclusive |
15:48:00 | FromDiscord | <Clyybber> and that is an opinion |
15:48:14 | FromDiscord | <Skaruts> that's an observation, not an opinion |
15:48:17 | disruptek | we're in the dark ages of programming. scrabbling around in the mud like animals. |
15:48:25 | disruptek | it won't be this way forever, unless we never evolve. |
15:48:48 | FromDiscord | <Skaruts> well you could argue that about anything |
15:48:52 | FromDiscord | <Clyybber> @Skaruts .. is inclusive because .. is symmetric and inclusive ranges are symmetric |
15:48:57 | FromDiscord | <gingerBill> No one should be opinionated! |
15:49:07 | FromDiscord | <gingerBill> That's my opinion. |
15:49:25 | FromDiscord | <Clyybber> @Skaruts there is no default, so there is nothing to argue about actually |
15:49:48 | disruptek | yeah, it's not opinion. it's fact. |
15:50:51 | FromDiscord | <Skaruts> there is a default in nim, like I already told you countup and countdown are inclusive by default |
15:51:04 | * | uu91 joined #nim |
15:51:08 | FromDiscord | <Clyybber> because its not `countupuntil` |
15:51:08 | FromDiscord | <Skaruts> when you use either of them you'll have to do -1 |
15:51:16 | FromDiscord | <Clyybber> if you want -1 that is |
15:51:20 | FromDiscord | <Clyybber> if you dont, dont |
15:51:28 | * | floppydh quit (Quit: WeeChat 2.6) |
15:51:35 | FromDiscord | <Skaruts> didn't know that exists, but it's a bit of a mouthfull to type... |
15:51:44 | FromDiscord | <Clyybber> it doesnt exist |
15:51:50 | FromDiscord | <Skaruts> ah ok |
15:51:55 | FromDiscord | <Skaruts> well then my point stands |
15:51:59 | disruptek | skaruts: fork the compiler and you'll understand better. |
15:52:30 | FromDiscord | <Skaruts> does the compiler use inclusive loops most of the time? |
15:52:40 | FromDiscord | <Skaruts> as in `..` and not `..<` |
15:52:40 | FromDiscord | <Clyybber> @Skaruts see, if we were to make .. imply from n until m -1 it would be opinionated |
15:52:56 | FromDiscord | <Clyybber> since we could also argue that it should imply from n + 1 until m |
15:53:05 | FromDiscord | <Skaruts> no it wouldn't, there's no opinion in this |
15:53:09 | disruptek | why not + 2? |
15:53:17 | FromDiscord | <Clyybber> @Skaruts no it uses exclusive ones most of the time |
15:53:22 | FromDiscord | <Clyybber> but it doesn't matter |
15:54:11 | FromDiscord | <Skaruts> then there you go |
15:54:14 | FromDiscord | <Clyybber> since you don't yakshave one char off just because it gets used more often |
15:54:23 | FromDiscord | <Clyybber> its just unneccessary |
15:54:33 | * | marmotini_ quit (Ping timeout: 265 seconds) |
15:54:44 | disruptek | bbl; i have some lint i need to remove from my navel. |
15:55:02 | FromDiscord | <Clyybber> c ya |
15:55:31 | * | marmotini_ joined #nim |
15:55:58 | FromDiscord | <Skaruts> if 99% of the time people use exclusive, then you do like python and let people not need one extra char to get it, is what I'm saying |
15:56:29 | FromDiscord | <Clyybber> I know what you mean, but it doesn't apply to nim |
15:56:54 | FromDiscord | <Skaruts> ok, but that's back to where we started, where I asked why is that? |
15:57:12 | FromDiscord | <Skaruts> it seems backwards to me |
15:57:36 | FromDiscord | <Clyybber> you do understand why it is the way it is for `..` and `..<` right? |
15:57:42 | FromDiscord | <gingerBill> Regarding `..` and `..<`, there different ways to look at this. Coming from my language Odin, `..` and `..<` are more commonly used in different cases. |
15:57:42 | FromDiscord | <gingerBill> ``` |
15:57:42 | FromDiscord | <gingerBill> for i in 0..<12 {} |
15:57:42 | FromDiscord | <gingerBill> ``` |
15:57:43 | FromDiscord | <gingerBill> is a good case for `..<` |
15:57:43 | FromDiscord | <gingerBill> |
15:57:43 | FromDiscord | <gingerBill> ``` |
15:57:45 | FromDiscord | <gingerBill> switch c { |
15:57:46 | FromDiscord | <gingerBill> case 'A' .. 'Z', 'a' .. 'z': |
15:57:48 | FromDiscord | <gingerBill> case '0' .. '9': |
15:57:48 | FromDiscord | <gingerBill> } |
15:57:49 | FromDiscord | <gingerBill> ``` |
15:57:50 | FromDiscord | <gingerBill> is a good case for `..` |
15:57:52 | FromDiscord | <gingerBill> |
15:57:53 | FromDiscord | <gingerBill> Different contexts prefer different ranges. |
15:57:55 | FromDiscord | <gingerBill> |
15:57:55 | solitudesf | oh no |
15:58:02 | FromDiscord | <gingerBill> However, the slice syntax in Odin is `[:]` like Python/Go. This is done for two reasons: familiarity and use cases. Odin doesn't have "ranged" arrays (yet) and as a result, all arrays are 0-indexed. Therefore it makes very little sense to use `..<` and `..` as the slicing operator as 99.99% of the time you'll be wanting `..<` and not `..` and as such, this will be very error prone (it was from testing). `..=` instead of `..` may have b |
15:58:04 | FromDiscord | <Skaruts> but why not `..` and `..>` instead? |
15:58:07 | FromDiscord | <Clyybber> bruh |
15:58:11 | FromDiscord | <Clyybber> because `..` is symmetric |
15:58:19 | FromDiscord | <Clyybber> and inclusive ranges are symmetric |
15:58:32 | Yardanico | @gingerBill please don't paste more than 2 lines of code in Discord :) |
15:58:36 | FromDiscord | <Clyybber> and exlcusive ones are not |
15:58:36 | FromDiscord | <Skaruts> ok, I'm fine with that, I don't much of gripe with ranges tbh, I understand the logic there |
15:58:37 | Yardanico | people in IRC or Gitter are gonna suffer |
15:58:46 | FromDiscord | <Skaruts> ehe |
15:58:52 | FromDiscord | <gingerBill> Yardanico: I apologize. I am so used to Discord now over IRC. |
15:59:05 | FromDiscord | <gingerBill> In my IRC days, short lines everywhere. |
15:59:28 | FromDiscord | <Clyybber> @Skaruts Yeah, with countup and countdown its more an opinion thing, but its easier to understand when you know that they are aliases to `..` or the other way around |
15:59:41 | FromDiscord | <gingerBill> Short answer: `..<` and `..` have different use cases in practice. |
16:00:31 | FromDiscord | <Clyybber> @Skaruts I actually can't argue about countup and countdown other than it would be confusing to change them now |
16:00:53 | FromDiscord | <Skaruts> maybe it's a matter of interpretation, I always seen for loops as give me 10 iterations, and so it's up to 9 because it starts at 0 |
16:01:00 | FromDiscord | <Clyybber> yeah |
16:01:02 | * | marmotini_ quit (Ping timeout: 268 seconds) |
16:01:07 | FromDiscord | <Clyybber> so you write countup 0, 9 |
16:01:08 | FromDiscord | <Skaruts> in lua it makes sense to be inclusive because it starts at 1, although that doesn't make sense |
16:01:15 | FromDiscord | <Clyybber> you just made your argument yourself |
16:01:21 | FromDiscord | <Skaruts> no |
16:01:24 | FromDiscord | <Clyybber> sure |
16:01:35 | FromDiscord | <Clyybber> because you yourself thought about it in terms of zero to nine |
16:01:48 | FromDiscord | <Skaruts> repeat 10, the 10 is the number of iterations, so the computer does 0.....9, which is 10 iterations |
16:01:53 | FromDiscord | <Clyybber> yeah |
16:02:03 | FromDiscord | <Skaruts> but yiou type `10` |
16:02:04 | FromDiscord | <Clyybber> but countup is ot repeat |
16:02:09 | FromDiscord | <Clyybber> not |
16:02:19 | FromGitter | <matrixbot> `grantmwilliams` so ..< is a non inclusive range? 1..<3 would give you 1, 2? |
16:02:24 | FromDiscord | <Clyybber> but I agree, if we had a repeat iterator it should behave the way you mentioned |
16:02:36 | FromDiscord | <Clyybber> grantmwilliams: exactly |
16:02:36 | Yardanico | https://www.youtube.com/watch?v=GPxTX2kVzYE |
16:02:40 | Yardanico | sorry wrong window :( |
16:02:45 | FromDiscord | <Clyybber> lol |
16:04:18 | FromDiscord | <Clyybber> @Skaruts in practice countup isnt used that often, you more often use its alias `..` |
16:04:50 | FromDiscord | <Clyybber> and for countdown its not clear if it would be lowerbound or upperbound exclusive |
16:05:07 | FromDiscord | <Clyybber> so Nim has chosen the unambiguous case of it being inclusive |
16:06:43 | FromDiscord | <Clyybber> Yardanico: Played that on piano once, was an experience for sure.. |
16:22:26 | FromDiscord | <Skaruts> I suppose nim could provide both cases though, as it is, as well as a python like iterator |
16:22:40 | FromDiscord | <Skaruts> like python `range` |
16:23:03 | FromDiscord | <Clyybber> I guess it could yeah, |
16:23:12 | FromDiscord | <Clyybber> but it should not be called range then :p |
16:23:16 | FromDiscord | <Clyybber> because that would be confusing |
16:23:21 | FromDiscord | <Clyybber> for Nim users |
16:23:40 | FromDiscord | <Skaruts> yea, it would be inconsistent with actual ranges |
16:23:47 | FromDiscord | <Clyybber> yeah |
16:23:52 | * | pbb quit (Quit: No Ping reply in 180 seconds.) |
16:24:18 | FromDiscord | <Skaruts> I named mine after python's only bacause I literally type for i in range(something) in 2 secs, my fingers just flow through it like butter |
16:24:38 | FromDiscord | <Clyybber> heh |
16:24:55 | FromDiscord | <Skaruts> maybe because I've typed that 999999 times so far... |
16:25:19 | * | pbb joined #nim |
16:25:59 | FromDiscord | <Skaruts> I'll talk to Araq later to see what he thinks of it, maybe I could propose it |
16:26:19 | FromDiscord | <Clyybber> repeat would be a good candidate IMO |
16:26:54 | FromDiscord | <Solitude> nice discussion, brehs, almost as much substance as in `& is unreachable`. |
16:27:08 | FromGitter | <kayabaNerve> How can I get an inner macro evaluated before an outer macro? |
16:27:22 | FromDiscord | <Skaruts> what was meant by "unreachable"? |
16:27:29 | FromDiscord | <Clyybber> with the fingers lol |
16:27:37 | FromDiscord | <Skaruts> I agree to it then lol |
16:27:44 | FromDiscord | <Clyybber> haha |
16:28:28 | FromDiscord | <Skaruts> it's a bit too far from either shift key |
16:28:32 | FromGitter | <kayabaNerve> ```code paste, see link``` ⏎ ⏎ Just to be clear about the code I'm running. Trying to get b executed before a. [https://gitter.im/nim-lang/Nim?at=5e14b1b03679536f96257da4] |
16:29:43 | FromDiscord | <Clyybber> yall need to play more C:DDA |
16:30:04 | FromDiscord | <Clyybber> you craft stuff with `&` there |
16:31:08 | FromDiscord | <Skaruts> symbols are a bit of a pain though because keyboards are different in different places |
16:31:29 | FromDiscord | <Skaruts> what's handy for some is a pain for others |
16:33:09 | FromDiscord | <Skaruts> I added lua style concatenation to my nim though, seems to be working fine so far, only had a bit of a conflict with ranges once but the problem was in a template that turned out to be redundant anyway |
16:34:04 | FromDiscord | <Clyybber> as long as no one ever reads your code :p |
16:34:04 | FromDiscord | <Skaruts> I find it way more readable tbh |
16:34:13 | FromDiscord | <Skaruts> less clutering |
16:34:16 | FromDiscord | <Clyybber> heh, coming from lua, I don't |
16:36:48 | FromDiscord | <Skaruts> yea, this kind of stuff is highly subjective, and maybe it also depends on the colors of your syntax highlighting |
16:37:27 | FromDiscord | <Skaruts> that's really the strong point about nim, you can adjust it 🙂 |
16:37:37 | FromDiscord | <Clyybber> yep |
16:41:04 | * | krux02 joined #nim |
16:45:33 | FromDiscord | <Rika> oh lord no not the & is unreachable discussion again |
16:45:35 | FromDiscord | <Rika> dark past |
16:46:15 | * | Trustable joined #nim |
16:48:02 | * | pbb quit (Quit: No Ping reply in 180 seconds.) |
16:48:05 | * | nsf joined #nim |
16:49:45 | * | pbb joined #nim |
16:54:53 | FromDiscord | <Skaruts> thank goodness for `fmt` 😄 |
16:55:19 | * | marmotini_ joined #nim |
16:56:30 | narimiran | "almost as much substance as in `& is unreachable`." -- legendary stuff :) :) |
16:56:35 | FromDiscord | <Rika> theyre not functionally the same |
16:58:04 | FromDiscord | <Skaruts> I know, but you can replace &s with it |
16:58:48 | narimiran | if i don't find at least one comment about `& is unreachable` in nim survey (https://nim-lang.org/blog/2019/12/20/community-survey-2019.html), i'll be highly disappointed in this community! :D |
16:59:24 | disruptek | when are the survey results out? |
17:00:03 | Yardanico | disruptek: around 2-3 months I think |
17:00:07 | disruptek | ~survey is the Nim Community Servey at https://nim-lang.org/blog/2019/12/20/community-survey-2019.html |
17:00:08 | disbot | survey: 11the Nim Community Servey at https://nim-lang.org/blog/2019/12/20/community-survey-2019.html |
17:00:17 | disruptek | ~survey is the Nim Community Survey at https://nim-lang.org/blog/2019/12/20/community-survey-2019.html |
17:00:18 | disbot | survey: 11the Nim Community Survey at https://nim-lang.org/blog/2019/12/20/community-survey-2019.html |
17:00:29 | Yardanico | you can check how long did it take for the results for previous two surveys to come out |
17:00:34 | lqdev[m] | that's why rod will have `*&&*` as the concat operator. |
17:00:42 | lqdev[m] | even more unreachable, muhaha! |
17:00:47 | narimiran | Yardanico, disruptek: when i decide it is enough :) |
17:00:51 | disruptek | i can't. my days are spent trying to get arc to behave. |
17:00:59 | Yardanico | 2017 - 23 June 2017 01 October 2017 , 2018 - 23 June 2018 - 27 October 2018 |
17:01:07 | narimiran | btw, from the article: "Submissions will be accepted until around February 2020, depending on the response rates" |
17:01:12 | Yardanico | oh okay |
17:01:18 | Yardanico | and also it'll take some time to prepare the blog article |
17:01:24 | narimiran | yep |
17:02:15 | FromDiscord | <Clyybber> ~survey |
17:02:16 | disbot | survey: 11the Nim Community Survey at https://nim-lang.org/blog/2019/12/20/community-survey-2019.html |
17:02:57 | FromDiscord | <Skaruts> gitter and irc people suffer due to multilines, discord people suffer because of links without < > |
17:02:59 | FromDiscord | <Skaruts> :S |
17:03:17 | FromDiscord | <Clyybber> huh, why should the links have <>? |
17:03:34 | FromDiscord | <Skaruts> to omit the big a** banners |
17:03:41 | FromDiscord | <Skaruts> or whatever they're called |
17:03:42 | FromDiscord | <Clyybber> ah |
17:03:46 | disruptek | huh? |
17:03:54 | disruptek | i can add those if it helps. |
17:04:17 | FromDiscord | <~i is> sorry |
17:04:52 | FromDiscord | <Skaruts> basically when anyone posts a link, discord shows a preview of the page, does't make much difference if it's just one link, but several links take the conversations out of the screen |
17:05:12 | FromDiscord | <Skaruts> This fucks with IRC users |
17:05:38 | FromDiscord | <Skaruts> lol |
17:05:42 | FromDiscord | <Clyybber> blissfully unaware |
17:05:51 | disruptek | pretend i'm an idiot. do you want <> around URLs or not. |
17:05:53 | narimiran | "but several links take the conversations out of the screen" -- ok, now i know what to do to discord users when they paste 20 lines here :D |
17:06:12 | FromDiscord | <Skaruts> 🙂 |
17:06:23 | FromDiscord | <demotomohiro> <https://nim-lang.org/blog/2019/12/20/community-survey-2019.html> |
17:06:26 | FromDiscord | <disruptor> disruptek: hello. brother |
17:07:08 | FromDiscord | <Skaruts> @disruptek, personally, I prefer links with <>, but see if it bothers other people or not, maybe some people like the previews I dunno |
17:07:11 | FromDiscord | <demotomohiro> <URL> doesn't show preview on discord |
17:07:22 | stefantalpalaru | Skaruts: there's a Discord setting to disable link expansion. Search for it in preferences. |
17:07:40 | FromGitter | <matrixbot> `grantmwilliams` made a simple Nim program to count the primes below 100,000,000. Runs in .13 seconds on my laptop. Very impressed with the speed vs expressability of Nim! |
17:07:43 | disruptek | so it's settled; learn a thing about configuring your client. |
17:07:59 | FromDiscord | <Skaruts> gonna take a look |
17:08:47 | disruptek | i probably should emboss urls with underscore/blue in the footnotes, too. |
17:09:36 | FromDiscord | <Skaruts> nice, I turned it off, thanks |
17:09:43 | narimiran | @grantmwilliams you can directly connect to IRC without matrix bot. leorize knows the details |
17:10:14 | FromDiscord | <Clyybber> @Skaruts can you change your nickname on this server? |
17:11:11 | FromDiscord | <Skaruts> I never tried |
17:11:26 | FromDiscord | <Clyybber> I'm not requesting you to :p, I was just wondering if it is possible |
17:12:06 | FromDiscord | <Clyybber> because it probably shouldn't be |
17:12:15 | FromDiscord | <Clyybber> otherwise you could impersonate people pretty easily |
17:12:20 | FromDiscord | <Clyybber> and irc users wouldn't notice |
17:12:39 | FromDiscord | <Arnold Braunchweiger> test |
17:12:41 | disruptek | irc users don't care. |
17:12:48 | FromDiscord | <Arnold Braunchweiger> seems like I can |
17:12:51 | disruptek | the whole point of nicks is blame. |
17:13:02 | FromDiscord | <Clyybber> @Arnold Braunchweiger thanks for checking |
17:13:28 | FromGitter | <alehander92> ~clyybber |
17:13:29 | disbot | no footnotes for `clyybber`. 🙁 |
17:13:36 | disruptek | the reason `disruptek` wasn't taken is that no one wants to be confused for the moron that wrote my code. |
17:13:38 | FromGitter | <alehander92> come on disbot this is embarassing |
17:13:45 | FromDiscord | <Skaruts> I changed it in the settings, though, is there any other way? |
17:13:48 | FromDiscord | <Clyybber> ~clyybber is a dick |
17:13:49 | disbot | clyybber: 11a dick |
17:13:52 | FromDiscord | <Clyybber> lol |
17:14:04 | solitudesf | ~clyybber |
17:14:05 | disbot | clyybber: 11a dick |
17:14:07 | FromGitter | <alehander92> ~is is is |
17:14:08 | disbot | is: 11is |
17:14:30 | FromGitter | <alehander92> i am not sure what i wanted to accomplish |
17:14:34 | FromGitter | <alehander92> but i didnt |
17:14:51 | FromGitter | <matrixbot> `grantmwilliams` @narimiran im using the Riot client for Gitter atm. Should i just hop on an IRC client instead of using gitter? |
17:15:07 | disruptek | irc > discord > gitter. |
17:15:23 | narimiran | @grantmwilliams there is a direct connection from riot to irc |
17:15:28 | FromDiscord | <Skaruts> agree, but for talking about programming discord > irc |
17:15:34 | FromDiscord | <Skaruts> because you can paste code |
17:15:39 | disruptek | ~clyybber is looks like a fish but smells like a weasel. |
17:15:40 | disbot | clyybber: 11a dick |
17:15:40 | disbot | clyybber: 11looks like a fish but smells like a weasel. |
17:15:55 | solitudesf | actual usable but nonexistant text chat >>>>>>>>>>>>>> irc > discord > gitter |
17:15:58 | FromDiscord | <Clyybber> oh, so it appends |
17:16:22 | disruptek | yes, but you can replace your own footnote. |
17:16:24 | narimiran | https://matrix.to/#/#freenode_#nim:matrix.org |
17:16:48 | FromDiscord | <Clyybber> disruptek: by indexing it? |
17:16:51 | narimiran | (i don't know if this is it, but this is what is on our website; if it is not correct, we should update it) |
17:16:56 | disruptek | no, just by setting a new footnote. |
17:17:03 | disruptek | come help me fix gittyup. |
17:17:10 | FromDiscord | <Clyybber> so how does it figure out if it should replace the old one? |
17:17:11 | solitudesf | ~& is unreachable |
17:17:11 | disbot | &: 11unreachable |
17:17:16 | solitudesf | ~& |
17:17:17 | disbot | &: 11unreachable -- solitudesf |
17:17:19 | solitudesf | not false |
17:17:20 | FromDiscord | <Clyybber> disruptek: Sure, whats the problem? |
17:17:30 | FromDiscord | <Clyybber> ah you told me before |
17:17:30 | disruptek | --gc:arc |
17:17:36 | disruptek | ~arc |
17:17:37 | disbot | arc: 11a new memory manager for Nim; see https://forum.nim-lang.org/t/5734 -- disruptek |
17:17:44 | FromDiscord | <Clyybber> thanks, didn't know that |
17:17:46 | FromDiscord | <Clyybber> lol |
17:17:47 | disruptek | lol |
17:18:23 | disruptek | maybe -- should be a keyword, too. then it could auto-add docs. |
17:18:53 | FromDiscord | <Clyybber> disruptek: what do I have to do reproduce your isse? |
17:19:02 | FromDiscord | <Clyybber> and *what* is the issue? |
17:19:07 | disruptek | clone gittyup and try to run tgit.nim with --gc:arc. |
17:19:20 | FromDiscord | <Clyybber> aight |
17:19:31 | disruptek | the issue is a double free and memory corruption. |
17:21:19 | FromDiscord | <Clyybber> cant open nimgit2 |
17:21:50 | disruptek | `nimph doctor` |
17:21:51 | FromDiscord | <Clyybber> whispers: submodules |
17:21:58 | FromGitter | <matrixbot> `grantmwilliams` Is this better? |
17:22:23 | FromDiscord | <Clyybber> disruptek: don't have nimph installed on this machine |
17:22:33 | FromDiscord | <Clyybber> don't you have a nimgit2 file you could lend me ? |
17:22:36 | disruptek | nimble install nimgit2 |
17:22:49 | FromDiscord | <Clyybber> don't have nimble installed on this machine |
17:22:54 | FromDiscord | <Clyybber> :p |
17:23:01 | FromDiscord | <Clyybber> and I can't find the repo |
17:23:03 | disruptek | clever boy. |
17:23:17 | FromDiscord | <Clyybber> ah found it |
17:24:27 | FromGitter | <matrixbot> `grantmwilliams` This is the first time ive ever tried gitter so im sure ive made a mess of it already |
17:24:41 | FromDiscord | <Clyybber> ugh |
17:24:44 | FromDiscord | <Clyybber> nimterop dependency |
17:25:47 | FromDiscord | <Clyybber> aaah regex |
17:26:53 | disruptek | it's like this is your first exposure to the ecosystem. |
17:27:32 | FromDiscord | <Clyybber> aaah unicodedb |
17:27:44 | FromGitter | <alehander92> grantwilliams looks kinda normal |
17:27:46 | FromDiscord | <Clyybber> disruptek: I was using nimble and all that jazz |
17:27:51 | FromGitter | <alehander92> but it seems you are on matrix |
17:28:06 | FromGitter | <alehander92> this is not jazz clyybber its a package manager |
17:28:19 | FromDiscord | <Clyybber> disruptek: emeriting from the ecosystem |
17:28:19 | FromGitter | <alehander92> you're not in some kind of cabaret!!! |
17:28:20 | FromDiscord | <Clyybber> lol |
17:28:40 | FromGitter | <alehander92> my puns are consistently getting worse i like it |
17:28:49 | disruptek | that makes one of us. |
17:29:10 | FromGitter | <alehander92> like bono sang |
17:29:12 | FromGitter | <alehander92> "one" |
17:29:50 | FromGitter | <matrixbot> `grantmwilliams` Alexander Ivanov (Gitter): |
17:30:12 | FromDiscord | <Clyybber> and now unicode plus |
17:30:18 | FromDiscord | <Clyybber> my --paths are getting many |
17:30:22 | FromGitter | <matrixbot> `grantmwilliams` maybe i should just use irc... |
17:30:24 | FromDiscord | <Clyybber> and my /tmp smaller |
17:31:04 | narimiran | @grantmwilliams can you try to connect to `#freenode_#nim` from riot? |
17:32:09 | FromDiscord | <Clyybber> disruptek: cannot importc variable at compile time |
17:32:26 | FromGitter | <alehander92> grantmwilliams yep |
17:32:28 | FromDiscord | <Clyybber> csterr |
17:32:31 | FromDiscord | <Clyybber> cstderr |
17:32:47 | disruptek | did you actually install nimterop? it doesn't work unless it is installed in your $NIMBLE_DIR |
17:32:50 | FromDiscord | <Clyybber> nimgit2.nim:27 |
17:32:59 | FromDiscord | <Clyybber> disruptek: WHY? |
17:33:08 | disruptek | blame shashlick. 😁 |
17:33:23 | FromGitter | <alehander92> https://vim-bootstrap.com/ vim people |
17:33:28 | FromGitter | <alehander92> where is nim |
17:33:49 | FromDiscord | <Clyybber> I don't get why nimgit2 can't be distributed as a *standalone* wrapper |
17:34:11 | FromGitter | <alehander92> because you need an orchestra |
17:34:13 | FromGitter | <alehander92> for good jazz |
17:34:20 | FromDiscord | <Clyybber> disruptek: So can I just do --nimblePath? |
17:34:21 | shashlick | i need https://github.com/nim-lang/Nim/pull/13010 to know $NIMBLE_DIR |
17:34:22 | disbot | ➥ Implement compileSetting() and compileSettingSeq() |
17:34:55 | FromDiscord | <Clyybber> shashlick: I mean, why can't you make nimgit2 independent of nimterop |
17:34:57 | FromDiscord | <Clyybber> generate once |
17:34:58 | shashlick | Clyybber - nimgit2 isn't just a wrapper, it also sets up libgit2 if you don't have it |
17:35:14 | FromDiscord | <Clyybber> you mean install it on my system?? |
17:35:39 | shashlick | if you just `nimble install nimgit2` it allows you to get libgit2 working across any OS |
17:36:03 | FromDiscord | <Clyybber> so no way to use it without nimble? |
17:36:07 | shashlick | nimterop isn't just about wrapping, it also helps with getting libraries downloaded and built |
17:36:13 | FromDiscord | <Clyybber> this is nuts |
17:36:22 | shashlick | you can if you want |
17:36:40 | shashlick | if you as the dev wants to deal with downloading and setting up libgit2 and just want a wrapper, sure |
17:37:01 | FromDiscord | <Clyybber> shashlick: Why can't it just include a few compile pragmas and have the libgit2 repo as a submodule? |
17:37:35 | shashlick | that doesn't work for larger libraries |
17:37:59 | shashlick | i played with compile pragmas long enough to realize it is safer to use the lib's build tools to build it |
17:38:15 | FromDiscord | <Clyybber> do you link dynamically? |
17:39:03 | disruptek | yep. |
17:39:13 | FromDiscord | <Clyybber> so why do I need to build libgit2? |
17:39:20 | disruptek | so it can be linked. |
17:39:45 | disruptek | the way this works is, the train moves, not the station. |
17:40:42 | FromDiscord | <Clyybber> so I need to build libgit2 to link to libgit? |
17:40:47 | FromDiscord | <Clyybber> why is that? |
17:41:05 | FromDiscord | <Clyybber> why does it not suffice to include the header and link? |
17:41:07 | disruptek | because linking happens between object files and not source code. |
17:41:13 | FromDiscord | <Clyybber> sure thing |
17:41:19 | disruptek | 👍 |
17:41:37 | FromDiscord | <Clyybber> so why do I need to build it? |
17:41:42 | disruptek | because linking happens between object files and not source code. |
17:41:49 | Yardanico | disruptek: that's not the reason really |
17:41:52 | FromDiscord | <Clyybber> but I have the so |
17:42:05 | FromDiscord | <Clyybber> so why do I need to build it? |
17:42:09 | FromDiscord | <Clyybber> lol |
17:42:19 | disruptek | well, there's an option to link against the system's .so but i don't remember what it is. |
17:42:34 | disruptek | if you aren't running HEAD of libgit2, it doesn't matter. i require HEAD. |
17:42:42 | FromDiscord | <Clyybber> oh no |
17:42:44 | disruptek | 0.28.4 does not support status iteration. |
17:43:01 | disruptek | ergo i cannot safely roll repositories. |
17:43:24 | shashlick | nimgit2 will look for libgit2.so in the standard system dirs before downloading |
17:43:35 | disruptek | just imagine how much rage you feel right now. |
17:43:41 | disruptek | multiple that by 7. |
17:43:43 | FromDiscord | <Clyybber> i feel you |
17:43:48 | disruptek | that's how pissed solitudesf is. |
17:43:56 | solitudesf | how did you know |
17:44:01 | disruptek | i feel you. |
17:44:04 | FromDiscord | <Clyybber> ~solitudesf is pissed |
17:44:05 | disbot | solitudesf: 11pissed |
17:44:13 | disruptek | i feel your seething contempt. |
17:44:17 | shashlick | i think offloading the job of looking for lib dependencies and installing, building is worth the compromise |
17:44:43 | shashlick | and nimterop is a build dependency, not a runtime dependency |
17:44:55 | disruptek | technically, nimph will link against 0.28.4, but it will refuse to roll your deps. |
17:44:58 | shashlick | its like being upset that you need gcc |
17:45:01 | disruptek | because it cannot do so safely. |
17:45:47 | FromDiscord | <Clyybber> disruptek: so to repro I don't need libgit head? |
17:46:05 | lqdev[m] | shashlick: does nimterop support checking out tags in gitPull? |
17:46:06 | disruptek | no, you don't. |
17:46:13 | disruptek | yes, it does, shashlick. |
17:46:36 | shashlick | yes, tags, commits, branches are supported |
17:46:44 | disruptek | git2SetVer="v0.28.4" is a tag. "0.28.4" is a version download. |
17:46:46 | FromDiscord | <Clyybber> so how do I make it take my system libgit |
17:47:36 | disruptek | shashlick alone knows. |
17:48:09 | shashlick | you need to pass `-d:git2Std` if you want it to look |
17:48:45 | shashlick | but right now, using std libs doesn't do any version checking |
17:48:51 | FromDiscord | <Clyybber> thanks |
17:49:03 | FromDiscord | <Clyybber> but I'm still getting the importc var at ct error |
17:49:12 | FromDiscord | <Clyybber> do I need my compiler built with libFFI? |
17:49:14 | shashlick | nimarchive does it by default - https://github.com/genotrance/nimarchive/blob/master/nimarchive/archive.nim#L17 |
17:49:16 | shashlick | no |
17:49:30 | shashlick | can you share a snippet? |
17:50:04 | FromGitter | <deech> Yet another warning for the linter: https://forum.nim-lang.org/t/5777. |
17:52:02 | FromDiscord | <Clyybber> shashlick: Ah sry |
17:52:07 | FromDiscord | <Clyybber> false alarm, it was my compiler |
17:52:11 | FromDiscord | <Clyybber> now I'm getting: /tmp/gittyup/nimgit2/nimgit2.nim(27, 10) template/generic instantiation of `getHeader` from here |
17:52:11 | FromDiscord | <Clyybber> /home/clyybber/builds/nim/lib/system/fatal.nim(55, 5) Error: unhandled exception: /tmp/gittyup/nimterop/nimterop/build.nim(813, 12) `cmakeDeps or conDeps or made` |
17:52:11 | FromDiscord | <Clyybber> # Build configuration failed - No build files found in /home/clyybber/.cache/nim/nimterop/nimgit2/libgit2Dyn |
17:52:11 | FromDiscord | <Clyybber> [AssertionError] |
17:52:14 | FromDiscord | <Clyybber> fuck |
17:52:17 | FromDiscord | <Clyybber> sry for the paste |
17:52:33 | FromDiscord | <Clyybber> oh |
17:52:40 | FromDiscord | <Clyybber> I guess I need to download libgit2 |
17:53:10 | shashlick | nimph build should abstract all this - unless you are building it yourself |
17:53:20 | FromDiscord | <Clyybber> thats what I'm doing rn |
17:53:25 | disruptek | he doesn't want to run the nimph bootstrap for some reason. |
17:53:32 | shashlick | i don't think disruptek is using -d:git2Std since he wants a specific libgit2 version |
17:53:43 | shashlick | okay |
17:53:47 | FromDiscord | <Clyybber> brb eatin |
17:53:52 | shashlick | Clyybber - what's your command line |
17:54:12 | disruptek | i specify the defines in gittyup.nim.cfg, but you can screw with them if you want. |
17:55:14 | shashlick | Clyybber since you are a new user to all this, open to feedback |
17:57:21 | * | krux02 quit (Remote host closed the connection) |
18:01:03 | * | abm quit (Quit: Leaving) |
18:04:15 | FromGitter | <Albus70007> i need help with this error, does someone know how cani fix it? `node.kind == JObject` [AssertionError] ⏎ ⏎ i am comparing these: (if game_info["Game"]["is_match_ended"].getBool() == true:) ⏎ ⏎ and that is: (..."is_match_ended":false, ...) [https://gitter.im/nim-lang/Nim?at=5e14c81f9c13050f1f8e851c] |
18:07:01 | * | krux02 joined #nim |
18:11:11 | Yardanico | can you give us game_info json example (please use some pasting service for it)? |
18:11:44 | FromGitter | <Albus70007> ok |
18:13:44 | FromGitter | <Albus70007> https://pastebin.com/fDwcmdxf |
18:14:06 | FromGitter | <Albus70007> is_match_ended is one of the last ones |
18:16:03 | Yardanico | @Albus70007 with your JSON structure you should access it like this: game_info["Game"][0]["is_match_ended"].getBool() |
18:16:16 | * | nameisjohn joined #nim |
18:16:20 | nameisjohn | hi all :) |
18:16:25 | nameisjohn | I learned about Nim a few seconds ago |
18:16:26 | FromGitter | <Albus70007> hi |
18:16:37 | * | Trustable quit (Remote host closed the connection) |
18:16:49 | disruptek | hi, welcome, and what's your name? |
18:16:55 | Yardanico | xd |
18:17:02 | nameisjohn | Its python but statically compiled and fast and the code syntax looks more logical and cleaner. I think it could be a big deal |
18:17:06 | nameisjohn | It's john :) |
18:17:17 | Yardanico | nameisjohn: but please refrain from thinking about nim as "compiled python" :) |
18:17:18 | disruptek | ~nameisjohn is It's john :) |
18:17:19 | disbot | nameisjohn: 11It's john :) |
18:17:19 | nameisjohn | I used to be "John" on Freenode for about 12 years but some mod on a big room stole my name |
18:17:24 | FromGitter | <Albus70007> i also think like you |
18:17:27 | nameisjohn | haha bingo :P |
18:17:50 | narimiran | nameisjohn: "Its python...." until you scratch under the surface ;) if you explore nim some more, you'll see it is much more than "compiled python" |
18:17:53 | Yardanico | apart from the whitespace indentation there's not much similarities between nim and python IMO |
18:18:00 | nameisjohn | Yardanico haha, ok, you're right. Python doesn't have a monopoly on sane syntax |
18:18:01 | FromGitter | <Albus70007> @Yardanico THX, it worked! |
18:18:44 | Yardanico | @Albus70007 although if you're sure that your "Game" field will always have only 1 element in it (not the array like currently), you can remove that array definition (well, if you're creating that JSON yourself and not getting it from some API) |
18:19:17 | FromGitter | <alehander92> well i'd say syntax is still important and there are many syntax python influences |
18:19:21 | FromGitter | <Albus70007> i know it, i actually add it, but just in case |
18:19:37 | FromGitter | <alehander92> but metaprogramming is probably the other big thing, but its more lisp-like |
18:20:28 | nameisjohn | I know that you guys recently made it to v1.0, which is awesome. Now i'm not sure if i'm too late to ask, but the dependency-free feature of Nim - how does this work? |
18:21:34 | disruptek | you're too late. |
18:21:52 | solitudesf | we're opening tomorrow |
18:21:55 | nameisjohn | Do you just, like, "import X", and then even if X isn't installed on your system it pulls it down and bundles all the necessary code during compile time? |
18:22:42 | nameisjohn | Haha, sorry, i was going to say something and changed my mind |
18:23:11 | Yardanico | uhh, no? but all Nim modules (if they're pure Nim and not bindings to C libs) are built into the binary by default, after you compile it there's no need to distribute any source code |
18:23:27 | Yardanico | so you get nice binary executables which only depend on C lib |
18:23:43 | Yardanico | and you can also use musl so you get fully static executables |
18:24:22 | disruptek | or you can write nim that doesn't even depend on libc. |
18:24:41 | nameisjohn | oh nice, you guys have really thought this through |
18:24:42 | nameisjohn | this is ideal |
18:25:12 | disruptek | there are nim kernels and linux module(s?) written in nim. |
18:25:18 | nameisjohn | no waay |
18:25:23 | nameisjohn | could you write an OS in Nim? |
18:25:32 | disruptek | that's kinda the idea behind a kernel. |
18:25:39 | nameisjohn | hah, ok, derp |
18:25:41 | lqdev[m] | also, if you want to, you can statically link C libraries |
18:25:45 | FromGitter | <alehander92> yes you can, it can get pretty low level |
18:26:06 | FromDiscord | <mratsim> that's a mild statement |
18:26:15 | disruptek | !repo alehander42/ nim kernel |
18:26:15 | disbot | no results 😢 |
18:26:18 | FromGitter | <alehander92> well you cant verilog it yet!! |
18:26:18 | disruptek | boo |
18:26:21 | FromGitter | <alehander92> !repo lodka |
18:26:23 | FromDiscord | <Clyybber> !repo volka |
18:26:23 | disbot | https://github.com/leinovladimir/LODKA -- 9LODKA: 11 15 0⭐ 0🍴 & 10 more... |
18:26:25 | disbot | https://github.com/DirtyBitz/volkano-frontend -- 9volkano-frontend: 11The React+Next frontend for Volkano 15 3⭐ 0🍴 7& 29 more... |
18:26:30 | FromDiscord | <Clyybber> oh, right lodka |
18:26:36 | * | endragor quit (Remote host closed the connection) |
18:26:39 | FromDiscord | <Clyybber> I was like vodka but with some L |
18:26:44 | FromGitter | <alehander92> https://github.com/alehander92/lodka is extremely hacky |
18:26:47 | disruptek | !repo alehander42/lodka |
18:26:49 | disbot | no results 😢 |
18:26:54 | Yardanico | boat |
18:26:56 | disruptek | oh, 92 |
18:26:57 | FromGitter | <alehander92> but https://github.com/samanthadoran/Mero is the original one |
18:27:01 | FromGitter | <alehander92> 1) @dom96 's nimkernel |
18:27:08 | FromDiscord | <Clyybber> shashlick: Its `nim c --path=../nimgit2/ --path=../nimterop --path=../nim-regex/src --path=../nim-unicodedb/src --path=../nim-unicodeplus/src -d:git2Std --gc:arc tgit.nim` |
18:27:24 | FromGitter | <alehander92> Yardanico exactly! good to have slavic lang around |
18:27:29 | Yardanico | :P |
18:27:46 | FromDiscord | <Clyybber> shashlick: But I need to clone libgit into my .cache I presume? |
18:28:31 | disruptek | nimgit2'll do that for you. |
18:28:37 | FromDiscord | <Clyybber> hmm |
18:28:41 | FromDiscord | <Clyybber> so why does it not |
18:28:50 | FromDiscord | <Clyybber> or does it try to use system headers too? |
18:29:02 | FromDiscord | <Clyybber> with -d:git2Std |
18:29:05 | disruptek | did you build nimterop and is it in $NIMBLE_DIR? |
18:29:10 | FromDiscord | <Clyybber> nope |
18:29:44 | FromDiscord | <Clyybber> does nimterop not do its stuff in the VM? |
18:29:44 | disruptek | also, pull |
18:29:53 | disruptek | not yet it doesn't. |
18:30:52 | FromDiscord | <Clyybber> disruptek: your mem corruption, does it still occur without actually calling any libgit2 functions? |
18:31:01 | nameisjohn | OK what's the downside? Does Nim take ages to compile? Is everyone a communist? Is the original author a tyrant? There has to be something :P |
18:31:10 | disruptek | all true. |
18:31:14 | * | madprops left #nim ("Leaving") |
18:31:17 | nameisjohn | haha, i'm in. |
18:31:19 | nameisjohn | :P |
18:31:19 | FromDiscord | <Clyybber> everyone's a communist |
18:31:24 | Yardanico | nameisjohn: no company backing like Google or Mozilla :) |
18:31:24 | FromDiscord | <Clyybber> not a downside |
18:31:24 | * | madprops joined #nim |
18:31:28 | FromDiscord | <Clyybber> fite me |
18:31:32 | FromDiscord | <Clyybber> jk |
18:31:32 | Yardanico | although that's not really a downside |
18:31:37 | Yardanico | it's the opposite actually |
18:31:39 | nameisjohn | Yardanico omg really? i'm tingling |
18:32:02 | disruptek | i don't think i have any way to test memory allocation without calling libgit2. |
18:32:10 | nameisjohn | I hate what Mozilla Foundation did to their browser |
18:32:16 | nameisjohn | big companies ruin everything, eventually |
18:32:22 | solitudesf | nameisjohn, https://nim-lang.github.io/Nim/manual.html#lexical-analysis-identifier-equality if you get past this, then you're ok |
18:32:24 | FromDiscord | <Clyybber> true I guess |
18:32:30 | FromGitter | <alehander92> hm i kinda like mozilla |
18:32:40 | FromGitter | <alehander92> i mean at least its not chrome and they do sponsor some good tech |
18:32:51 | FromGitter | <matrixbot> `grantmwilliams` So what is the reasoning behind having countup() and countdown() vs just a count() function (similar to range())? |
18:32:54 | nameisjohn | They're trying hard, but the board is now all stacked with Microsoft/etc. |
18:33:04 | FromDiscord | <Clyybber> nameisjohn: in some way open source is communism as its intended |
18:33:19 | lqdev[m] | then I'm a communist |
18:33:24 | FromGitter | <alehander92> ehh i think its very hard to apply it to digital stuff |
18:33:37 | disruptek | huh, it's hard not to. |
18:33:42 | FromDiscord | <Clyybber> lqdev[m]: We all are, in our hearts |
18:33:45 | shashlick | Clyybber: sorry lunching |
18:33:51 | FromDiscord | <Clyybber> disruptek: whisper do it |
18:34:03 | shashlick | so nimterop calls nim internally but doesn't yet know what flags were passed to the parent process |
18:34:04 | FromDiscord | <Clyybber> hearts and... |
18:34:11 | shashlick | so it isn't possible to pass it down to the child processes |
18:34:23 | FromDiscord | <Clyybber> shashlick: Ah |
18:34:32 | disruptek | hammers and sickles, people; hammers and sickles! |
18:34:53 | FromDiscord | <Clyybber> nice |
18:35:02 | FromGitter | <alehander92> NOEZ |
18:35:10 | shashlick | but i don't know if that's really your issue yet |
18:35:17 | solitudesf | @grantmwilliams usually you use them to iterate the list or something, so when you iterate from a number to list end, you dont want it to suddenly return negative indexes, you want it to terminate |
18:35:17 | shashlick | is it still not finding any files? |
18:35:21 | FromGitter | <alehander92> <flashbacks of red army and 45 years of socialism appear> |
18:35:31 | nameisjohn | All your code belongs to us, comrade :) I do know what you mean though. Everything i write is open source, it's just that there are some languages that looked really promising but at some point the ideology became overpowering |
18:35:52 | shashlick | plus nimterop is untested in --gc:arc |
18:36:10 | disruptek | actually, gittyup worked in --gc:arc once. |
18:36:26 | * | gmpreussner quit (Ping timeout: 268 seconds) |
18:36:36 | FromDiscord | <Clyybber> disruptek: Is your compiler coming from head? |
18:36:39 | disruptek | another problem gittyup demonstrates is that it fails when `sink` is removed. |
18:36:40 | lqdev[m] | nameisjohn: honestly, Nim is a friendly language with a friendly community |
18:36:42 | FromGitter | <alehander92> i actually .. think we should be more supportive of commercial code |
18:36:49 | nameisjohn | This HTML example is unfair. This language is unfair. You're going to put Angular out of buisness with this |
18:36:53 | disruptek | clyybber: as of yesterday, yeah. |
18:36:58 | FromDiscord | <Clyybber> ah |
18:36:59 | nameisjohn | lqdev[m] seems that way :) |
18:37:02 | disruptek | git hash: ba4fbb63285ce198a9feb62e8058889462a96a87 |
18:37:03 | FromGitter | <alehander92> because honestly finding ways to make money with open source leads to so much ads + so much saas |
18:37:09 | FromDiscord | <Clyybber> disruptek: I'm fixing a few bugs rn |
18:37:11 | FromDiscord | <Clyybber> in arc |
18:37:18 | FromDiscord | <Clyybber> so maybe it fixes your issue too |
18:37:19 | FromGitter | <alehander92> 1) its actually very fine to expect money for software |
18:37:28 | FromDiscord | <Clyybber> if not I'mma dig into it I promise :p |
18:37:44 | disruptek | i am building a new compiler now. |
18:37:50 | FromDiscord | <Clyybber> even worse |
18:38:02 | FromDiscord | <Clyybber> oh well |
18:38:06 | FromGitter | <alehander92> disruptek do you want your compiler and my os to play together |
18:38:06 | FromGitter | <matrixbot> `grantmwilliams` i feel like having a corporate sponsor is the best way to get paid for open source |
18:38:10 | FromDiscord | <Clyybber> not exactly, the only thing that can happen is leak |
18:38:19 | FromGitter | <matrixbot> `grantmwilliams` like google & golang or mozilla & rust |
18:38:38 | FromDiscord | <Clyybber> its also the best way to succumb to gremium-design |
18:38:40 | disruptek | i don't see a change with HEAD. |
18:38:50 | FromDiscord | <Clyybber> disruptek: ah, fine |
18:39:31 | nameisjohn | FromDiscord people need to eat :) But i've done enough work for other people who misused my hard work. I was a scientist for 10 years. Until i found a bug in a dataformat which i raised with my boss, who fired me within a month to keep it quiet because it affected a lot of his publications |
18:39:36 | disruptek | i would just set the const `specing` to false, to start. |
18:39:51 | disruptek | tagging = true, tagtable = true. |
18:40:13 | disruptek | you should get a double free. |
18:40:13 | FromGitter | <alehander92> sounds interesting nameisjohn |
18:40:18 | nameisjohn | So now i just code for myself. I think that's the way to go. Make stuff you personally want to see in this world, and make it good enough to pass down to your children. If you have any. |
18:40:18 | FromGitter | <alehander92> btw .. its your name day in bulgaria |
18:40:25 | FromDiscord | <Clyybber> nameisjohn: Did you make the bug public by now? |
18:40:26 | FromGitter | <alehander92> somehow random but anyway |
18:41:04 | nameisjohn | You guys have name-days? That's pretty cool :) People don't know how hard it is to be a synonym for toilet |
18:41:27 | FromGitter | <alehander92> wat |
18:41:41 | nameisjohn | Clyybber, no, unfortunately once you step outside academia, you kinda lose all your connections |
18:41:55 | * | gmpreussner joined #nim |
18:42:23 | * | leorize quit (Ping timeout: 240 seconds) |
18:43:31 | FromDiscord | <Clyybber> hmm, I think many software made for academic purposes is buggy, because it is often made and then never touched again |
18:44:07 | FromDiscord | <Clyybber> s / many /m uch |
18:44:12 | nameisjohn | So no one would read it if i made a blog post about it, and it's a kind of estoteric issue where basically the speification says X but that doesn't allow for the analysis everyone wants to do, so people just assume the file should be like Y, and that difference is really non-obvious but breaks everything. Designing good dataformats is hard. Before |
18:44:12 | nameisjohn | i got the boot, i was really getting into something called "LangSec" (http://langsec.org/), which is an attempt to make data formats that are provably secure |
18:44:47 | * | leorize joined #nim |
18:44:49 | disruptek | a lot of academic software is made by those untrained in the art, as well. |
18:45:11 | FromGitter | <alehander92> ive heard about it sounds interesting |
18:45:57 | nameisjohn | Clyybber that and people don't stick around for long, particularly programmers. A lot of computer science grads go into my field (Genomics) and make a thing and leave 5 years later once they realise they can make 10x more money making junk on the Appstore |
18:46:12 | nameisjohn | So all our tooling rots away |
18:46:42 | nameisjohn | disruptek yeah theres a huge difference between writing code academically, and professionally where customers are involved |
18:47:13 | nameisjohn | Although the former is how we come to understand the world around us, somehow the stakes are higher for the latter :P |
18:47:41 | disruptek | i used to run university networks. it was... challenging. |
18:48:25 | nameisjohn | ok ! i'm done ! i'm going to learn Nim first thing tomorrow. Thank you all for your warm introduction :) |
18:48:38 | disruptek | have fun, whatsyername. |
18:49:22 | FromDiscord | <Clyybber> cee ya john |
18:49:31 | nameisjohn | Oh, actually, two more questions - is there a package manager thing like NPM or whatever? And is there documentation, official or unofficial, that's good for a newbie? |
18:49:43 | disruptek | ~manual |
18:49:44 | disbot | no footnotes for `manual`. 🙁 |
18:49:47 | disruptek | ~compiler |
18:49:48 | disbot | compiler: 11https://nim-lang.org/docs/nimc.html -- the Nim Compiler User Guide -- disruptek |
18:49:52 | FromDiscord | <Clyybber> nameisjohn: Theres nimble and nimph |
18:49:56 | disruptek | !repo nimph |
18:49:57 | disbot | https://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future 🧚 15 49⭐ 2🍴 7& 1 more... |
18:49:58 | FromDiscord | <Clyybber> those are the big package managers |
18:50:09 | FromDiscord | <Clyybber> and nimph is developed by this fella ^^ |
18:50:15 | FromDiscord | <Clyybber> disruptek |
18:50:20 | narimiran | nameisjohn: start here: https://nim-lang.org/learn.html |
18:50:26 | nameisjohn | ah, ok. I forsee saying the word "Nim" a lot in the future. Are we pronouncing it like "Tim" |
18:50:47 | nameisjohn | Awesome, thank you :) |
18:50:48 | shashlick | with --gc:arc - `Error: cannot 'importc' variable at compile time; cstderr` |
18:51:06 | FromDiscord | <Clyybber> nameisjohn: I think so yeah |
18:51:22 | FromDiscord | <Clyybber> shashlick: Yap, but only on latest devel I think |
18:51:35 | shashlick | okay was just testing nimterop with --gc:arc |
18:51:42 | shashlick | builds but that error at runtim |
18:51:47 | disruptek | ~manual is the Nim Manual is https://nim-lang.org/docs/manual.html |
18:51:47 | disbot | manual: 11the Nim Manual is https://nim-lang.org/docs/manual.html |
18:52:13 | FromGitter | <Albus70007> ok, first of all thank you everyone that helped me creating this example bot, but its doing something very weird, it only does a few iterations before stopping, thats not weird, the weird thing is that the number of iterations he completes depends on how many times i print something between sending and receiving data per iteration |
18:52:47 | * | gmpreussner_ joined #nim |
18:52:55 | FromGitter | <Albus70007> fuck, i didnt mean to delete it :( |
18:53:12 | FromDiscord | <Clyybber> its not deleted for IRC and discord users 🙂 |
18:53:16 | nameisjohn | Thank you narimiran and disruptek, i'll check them both out now, and really get down to it tomorrow. Goodnight and Dovizhdane :) |
18:53:38 | * | gmpreussner quit (Ping timeout: 240 seconds) |
18:53:41 | FromGitter | <Albus70007> @Clyybber then could you help me with that? |
18:53:44 | FromDiscord | <Clyybber> goodnight dovahkin |
18:53:46 | * | nameisjohn quit (Remote host closed the connection) |
18:53:47 | FromGitter | <Albus70007> i can address the code |
18:54:03 | FromDiscord | <Clyybber> Albus70007: Sure |
18:54:23 | disruptek | that guy's name reminded me of a toilet. |
18:54:47 | FromDiscord | <Clyybber> I once knew a toilet, beautiful with long hair |
18:55:23 | * | seerix quit (Quit: Leaving) |
18:58:12 | FromGitter | <Albus70007> the echos inside the recievePacket() and send_inputs() are the ones that affect the number of iterations |
18:58:20 | FromGitter | <Albus70007> https://pastebin.com/2nc9Yq7W |
18:58:42 | FromGitter | <Albus70007> i can also provide the "server's" executable |
19:00:22 | * | ng0 joined #nim |
19:02:16 | * | nsf quit (Quit: WeeChat 2.7) |
19:05:00 | FromDiscord | <Clyybber> Albus70007: Do you get an exception or something? This sounds like an ordering problem |
19:06:54 | FromGitter | <Albus70007> nope, it just stops |
19:08:09 | FromDiscord | <Clyybber> Hmm, try inserting as much echos as possible so you can see exactly where it stops |
19:08:30 | Zevv | Albus70007: running on linux? |
19:08:51 | * | NimBot joined #nim |
19:09:22 | FromGitter | <Albus70007> also how much data i recieve to get the header (in reievePacket) seems to also affect, the less i get, the more iterations it does |
19:09:46 | FromGitter | <Albus70007> @Zevv no, windows |
19:09:54 | Zevv | ok |
19:11:56 | * | abm joined #nim |
19:16:10 | * | Vladar joined #nim |
19:25:15 | * | marmotini_ quit (Remote host closed the connection) |
19:25:57 | * | PMunch joined #nim |
19:27:31 | * | marmotini_ joined #nim |
19:29:13 | FromGitter | <Varriount> Grr, why doesn't posix have any concept of a process handle |
19:29:43 | FromGitter | <Varriount> PIDs are so prone to race days races |
19:29:47 | FromGitter | <Varriount> *data |
19:40:51 | * | Ven`` joined #nim |
19:48:45 | * | endragor joined #nim |
19:48:53 | Yardanico | I feel like we need to update matterbridge used for Discord<->IRC bridge, since it's running a more than 1.5 year old version, is everyone okay with that? |
19:49:09 | Yardanico | It's running v1.9.0 now, latest is 1.16.3 |
19:49:16 | lqdev[m] | no |
19:49:20 | Yardanico | :D |
19:49:41 | lqdev[m] | I'm not okay that it dumps every line of a Discord paste as a separate IRC message |
19:49:45 | lqdev[m] | most people here aren't |
19:50:03 | lqdev[m] | no clue if they fixed it, but it's worth checking out |
19:50:22 | Yardanico | neither am I :( I hope I won't have to change matterbridge config a lot |
19:50:46 | lqdev[m] | I'm praying you won't, man |
19:50:51 | Yardanico | I'll run it on test channel on the Discord and on #nim-web to test |
19:52:40 | lqdev[m] | gaah, can somebody motivate me to work on something and not just slack off the whole day |
19:53:38 | * | endragor quit (Ping timeout: 260 seconds) |
19:54:16 | * | kapzyl joined #nim |
19:56:27 | Yardanico | do we want edited messages from Discord to be sent to other services or not? |
19:56:42 | Yardanico | or we can set it so that every edited message has a "edited" prefix before it |
19:56:45 | * | marmotini_ quit (Remote host closed the connection) |
19:56:46 | FromGitter | <timotheecour> anyone familiar with pegs? |
19:57:07 | disruptek | only npeg |
19:57:09 | disruptek | !repo npeg |
19:57:10 | disbot | https://github.com/zevv/npeg -- 9npeg: 11PEGs for Nim, another take 15 76⭐ 4🍴 |
19:57:12 | lqdev[m] | @timotheecour yeah, I'm one person |
19:57:20 | * | marmotini_ joined #nim |
19:57:24 | lqdev[m] | Yardanico: is there no setting to use s//? |
19:57:29 | FromGitter | <timotheecour> Yay! how do i match ‘begin anything end’ ? |
19:57:31 | Yardanico | lqdev[m]: no :( |
19:57:55 | FromGitter | <Albus70007> where should i download nim's latest version? |
19:58:47 | lqdev[m] | timotheecour: assuming you have a whitespace `ws -> ' '+`, you'd do `block -> 'begin' ws content ws 'end'` |
19:59:07 | lqdev[m] | not sure what flavor you're using, this is just my preferred generic syntax |
20:01:51 | * | marmotini_ quit (Ping timeout: 258 seconds) |
20:02:15 | * | marmotini_ joined #nim |
20:02:52 | FromGitter | <timotheecour> Hmm not sure i follow; here’s what i want to translate to peg: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e14e3eb3679536f9626eaf3] |
20:04:05 | FromGitter | <timotheecour> where `x*?` is `x*? zero or more of x (ungreedy/lazy)` https://nitely.github.io/nim-regex/#match%2Cstring%2CRegex%2CRegexMatch%2Cint |
20:04:52 | FromGitter | <alehander92> Yardanico do they have diff mode |
20:04:56 | Yardanico | no :( |
20:04:59 | FromGitter | <alehander92> which just sends the changed part with some context |
20:05:11 | FromGitter | <alehander92> no problem, then i guess at least some hint that its an edit is good |
20:05:30 | Yardanico | well, I actually have my own IRC-Discord bot in Nim which I wrote for a bit in 2018 but never finished :D |
20:06:50 | * | filcuc joined #nim |
20:11:25 | lqdev[m] | @timotheecour are you using the stdlib pegs? |
20:11:47 | FromGitter | <timotheecour> yes |
20:12:20 | lqdev[m] | you'd do `"begin" ws body ws @"end"` |
20:12:26 | lqdev[m] | I think |
20:12:29 | lqdev[m] | give me a sec |
20:13:34 | lqdev[m] | yeah, should be it |
20:14:07 | FromGitter | <timotheecour> btw, it’s not `ws`, I want to match anything (like in regex example) => something like `.*` but i tried it doens’t work |
20:14:35 | * | filcuc quit (Ping timeout: 265 seconds) |
20:14:57 | * | marmotini_ quit (Remote host closed the connection) |
20:39:48 | * | narimiran quit (Ping timeout: 258 seconds) |
20:40:21 | * | filcuc joined #nim |
20:41:07 | Yardanico | https://i.imgur.com/RNbKK4y.png does that look okay (ix.io is used, and when it failed for some reason bot gives a direct link to Discord message) |
20:41:42 | disruptek | seems like an improvement to me. |
20:41:57 | Yardanico | well, that's using my own old irc-discord bridge in nim :) |
20:42:16 | Yardanico | it's pretty unfinished and has some crashes since `discordnim` lib wasn't updated since June and Discord API changed in some places since then |
20:42:33 | Yardanico | and it's not yet open sourced xd |
20:43:45 | FromDiscord | <exelotl> omg that looks epic |
20:44:47 | Yardanico | Also there's a discord feature so that we can display IRC names in discord like this: https://i.imgur.com/03HVAS7.png |
20:46:06 | FromDiscord | <exelotl> does it work by changing the name of the bot before each message? 🤔 |
20:46:50 | FromDiscord | <Yardanico> Nah, it's an official feature of Discord webhooks, when you use webhooks you can specify any username to be used on Discord |
20:47:27 | FromDiscord | <exelotl> oh, cool |
20:47:42 | FromDiscord | <Yardanico> You can kinda make the same in IRC by connecting using a different client for each user, but that'll have a lot of overhead 😄 |
20:49:16 | FromDiscord | <exelotl> I think most IRC servers put a limit on the number of users from a single IP address |
20:49:38 | Yardanico | oh, right |
20:53:44 | * | beshr quit (Read error: Connection reset by peer) |
20:54:12 | Yardanico | I've decided to treat all messages which contain ``` or more than two \n or more than 500 characters (512 is IRC limit) to be code pastes or big messages :D |
20:58:27 | * | kapzyl quit (Remote host closed the connection) |
21:06:40 | * | PMunch quit (Remote host closed the connection) |
21:17:04 | * | Yardanico is now known as FromDiscordNim |
21:17:11 | * | FromDiscordNim is now known as Yardanico |
21:17:14 | * | Yardanico is now known as FromDiscordNim |
21:17:46 | * | FromDiscordNim is now known as Yardanico |
21:33:42 | * | skelett1 quit (Read error: Connection reset by peer) |
21:35:34 | * | skelett1 joined #nim |
21:45:27 | * | neceve quit (Remote host closed the connection) |
21:45:46 | * | skelett1 quit (Read error: Connection reset by peer) |
21:51:42 | * | icebattle joined #nim |
21:55:03 | * | mal`` quit (Quit: Leaving) |
22:09:38 | * | skelett1 joined #nim |
22:10:02 | * | solitudesf quit (Ping timeout: 240 seconds) |
22:12:05 | * | Yardanico[m] joined #nim |
22:13:06 | Yardanico | so the bot is capable of something like that currently on Discord https://i.imgur.com/eRTwzbe.png |
22:13:33 | * | mal`` joined #nim |
22:14:22 | FromGitter | <matrixbot> `grantmwilliams` How do you guys feela bout a Timsort implementation for Nim? I know python currently uses it as its Sort() |
22:16:11 | Yardanico | @grantmwilliams can you please write at least 1 message in https://gitter.im/nim-lang/twitch ? for testing my bridge bot :) |
22:16:29 | Yardanico | and FYI, you can use a direct matrix - irc bridge instead of gitter with https://github.com/matrix-org/matrix-appservice-irc/wiki/Guide:-How-to-use-Matrix-to-participate-in-IRC-rooms |
22:29:52 | Yardanico | if anyone wants to check the discord-nim bridge code, https://github.com/Yardanico/ircord/ (it's not really the best, but it kinda works, although I didn't test it for long run) |
22:30:35 | * | unclechu joined #nim |
22:30:43 | FromGitter | <matrixbot> `grantmwilliams` Yardanico (Gitter): can i log in without using gitlab/github/twitter? |
22:31:07 | Yardanico | @grantmwilliams ignore my message about twitch, but if you're asking about matrix-irc, yes |
22:31:29 | Yardanico | Just follow that github link I gave and you'll be able to have a much more "native" experience with IRC bridge :P |
22:31:47 | FromGitter | <matrixbot> `grantmwilliams` will do |
22:33:05 | FromGitter | <deech> Is there a reason why generic procs aren't type checked until used? https://github.com/nim-lang/Nim/issues/13061#issuecomment-571750721 |
22:33:07 | disbot | ➥ Converters found after a match not typechecked ; snippet at 12https://play.nim-lang.org/#ix=26KZ |
22:33:11 | unclechu | hi, i'm trying to find a resource where i could look for a nimble packages, but can't find one, is there such a resource? |
22:33:17 | Yardanico | nimble.directory |
22:33:26 | Yardanico | https://nimble.directory |
22:34:13 | unclechu | Yardanico: thanks, but why not add it to the https://nim-lang.org/ website menu? |
22:34:22 | Yardanico | well, it's not official :) |
22:38:55 | * | ltriant joined #nim |
22:44:00 | * | filcuc quit (Ping timeout: 258 seconds) |
22:46:02 | * | sacredfrog quit (Quit: ZNC 1.7.5 - https://znc.in) |
22:46:27 | * | abm quit (Quit: Leaving) |
22:47:41 | * | sacredfrog joined #nim |
22:59:16 | * | rockcavera joined #nim |
23:07:23 | * | uu91 quit (Remote host closed the connection) |
23:16:01 | * | lritter quit (Quit: Leaving) |
23:51:11 | deepend | is there an easy way to print numbers with commas? e.g. 1234567 -> 1,234,567 didn't seem to find it in strformat |