<< 07-01-2020 >>

00:00:08*marmotini_ quit (Ping timeout: 260 seconds)
00:00:12FromGitter<Varriount> You couldn't actually deliver an alias for a reference type
00:00:29*Hideki_ quit (Ping timeout: 258 seconds)
00:01:09FromGitter<Varriount> ,*define
00:01:30FromDiscord<Fern & Simula (They/Them)> huh, interesting
00:01:31FromDiscord<Fern & Simula (They/Them)> thanks!
00:13:09FromDiscord<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:08leorizeseq[T] is not an object
00:23:24leorizeand you mis indented the proc :P
00:24:16leorizeanyhow, here is how it's done: https://play.nim-lang.org/#ix=26DR
00:24:44FromDiscord<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:30FromDiscord<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:12FromDiscord<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:15FromDiscord<Fern & Simula (They/Them)> removed `distinct` and it works, nvm
00:40:58leorizeuntil you use it in an another module :P
00:44:33leorizefern & simula: here you go: https://play.nim-lang.org/#ix=26DZ
00:44:54leorizeuse converters to transparently convert Ring into seq
01:02:34FromDiscord<Fern & Simula (They/Them)> oh wow, forgot about converters, thats handy
01:04:50disruptekyeah, they're great for fostering confusion and contempt on your team.
01:37:31FromGitter<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:38disrupteksure.
01:38:27FromGitter<deech> So it's just a proc?
01:38:34disrupteki 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:37FromGitter<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:08disruptekjust think of the hilarious hijinks when you start exporting them.
01:47:11FromGitter<deech> Flip line 4 and 5 and suddenly you get a type error.
01:52:01FromGitter<deech> Ok I am sufficiently scared of converters now
01:52:14disrupteka healthy fear, i'm sure.
01:54:38FromGitter<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:10FromDiscord<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:20FromDiscord<Fern & Simula (They/Them)> i feel like it should be obvious but it isn't
01:59:56disruptekdo you know many stories about sea lions?
02:00:43FromDiscord<treeform> there was a youtube thing about them...
02:03:33FromDiscord<treeform> @Fern & Simula (They/Them) : `i = i mod r.len - r.len`
02:04:15FromDiscord<Fern & Simula (They/Them)> `Error: unhandled exception: index -2 not in 0 .. 2 [IndexError]`
02:06:39FromDiscord<treeform> I guess if i can be negative it does not work
02:06:48FromDiscord<Fern & Simula (They/Them)> i is never negative
02:06:50FromDiscord<treeform> try `if i > 0: i = i mod r.len - r.len`
02:07:04FromDiscord<Fern & Simula (They/Them)> that error happened when i = 1
02:07:19FromDiscord<treeform> what is r.len then?
02:07:33FromDiscord<Fern & Simula (They/Them)> anything, but in this case it's 3
02:07:46FromDiscord<Fern & Simula (They/Them)> sorry, anything greater than 0
02:07:52FromDiscord<treeform> https://play.nim-lang.org/#ix=26Ej
02:08:16FromDiscord<treeform> yeah my thing only breaks on 0
02:08:19FromDiscord<Fern & Simula (They/Them)> i don't want it in a while loop though, that's the problem
02:08:23FromDiscord<treeform> use `if i > 0: i = i mod r.len - r.len`
02:08:33FromDiscord<Fern & Simula (They/Them)> i is already greater than 0
02:08:40FromDiscord<treeform> then it works
02:08:49FromDiscord<Fern & Simula (They/Them)> no, it doesn't
02:09:14FromDiscord<treeform> exact same output with i=1 and len=3
02:09:15FromDiscord<treeform> https://play.nim-lang.org/#ix=26Ek
02:09:22*pbb quit (Ping timeout: 260 seconds)
02:09:37FromDiscord<Fern & Simula (They/Them)> i already have a while loop
02:09:50FromDiscord<Fern & Simula (They/Them)> i'm attempting to transform the proc into a constant-time function
02:09:51FromDiscord<treeform> top one is yours, bottom up is mine
02:09:54FromDiscord<treeform> top one has while loop
02:10:09FromDiscord<Fern & Simula (They/Them)> https://play.nim-lang.org/#ix=26Eo
02:10:59FromDiscord<Fern & Simula (They/Them)> whoops wrong code
02:11:48FromDiscord<Fern & Simula (They/Them)> same error though: https://play.nim-lang.org/#ix=26Ep
02:12:15*pbb joined #nim
02:12:25FromDiscord<treeform> where is the while loop one?
02:12:32FromDiscord<treeform> while had the abs on the index no?
02:13:02FromDiscord<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:55FromDiscord<treeform> you right it breaks when i = r.len
02:17:11FromDiscord<treeform> https://play.nim-lang.org/#ix=26Es
02:17:30disruptekso... sea lion stories?
02:18:34FromDiscord<treeform> disruptek: https://www.youtube.com/watch?v=7s6VfSOuZpQ
02:18:41*pbb quit (Quit: No Ping reply in 180 seconds.)
02:18:51FromDiscord<Fern & Simula (They/Them)> hey, that works perfectly! thank you treeform
02:19:55*pbb joined #nim
02:20:39disruptekokay, who here knows what a sea lion is?
02:21:00FromDiscord<Fern & Simula (They/Them)> it's a jetbrains product
02:21:01*marmotini_ joined #nim
02:21:09FromDiscord<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:46FromDiscord<treeform> @Fern & Simula (They/Them) you can also do `(r.len - (int(i) mod r.len)) mod r.len`
02:37:53FromDiscord<treeform> https://play.nim-lang.org/#ix=26Eu
02:38:00FromDiscord<treeform> which makes it a 1 liner
02:38:08FromDiscord<Fern & Simula (They/Them)> oh i hate that so much, it's perfect!
02:38:36FromDiscord<treeform> you can also use the prev one to cut it down a bit
02:38:42FromDiscord<treeform> prev []
02:39:14FromDiscord<treeform> https://play.nim-lang.org/#ix=26Ev
02:39:32FromDiscord<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:54disruptek~tables is hash table dictionary mappings; see https://nim-lang.org/docs/tables.html
03:53:55disbottables: 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:48madpropsGo programmers love to talk about 'goroutines'. Is there something like that in nim?
05:10:59disruptek!repo treeform/greenlet
05:11:00disbothttps://github.com/treeform/greenlet -- 9greenlet: 11Greenlet - Coroutines library for nim similar to python's greenlet. 15 15⭐ 0🍴
05:11:11madpropshuh
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:44PMunchStrange things I miss from Nim: discard
09:53:46narimiranleorize: are you here?
09:54:14AraqPMunch, I missed 'set' in C# fwiw
09:58:44FromDiscord<Rika> ugh
09:58:53PMunchLike the set typE?
09:59:10FromDiscord<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:32AraqPMunch, yeah like if x in {a, b, c} and knowing it produces excellent code
10:05:17PMunchYeah, there are many things I'm missing so far
10:18:20PMunchI also miss UCS and case/underscore insensitivity..
10:18:59PMunchAnd array literals, and the (subjectively) better syntax, and metaprogramming, and the list goes on and on..
10:19:13PMunchAnd "echo"..
10:20:50PMunchAnd implicit return
10:21:34PMunchAnd named optional parameters..
10:24:21Araqnamed parameters are avaiable in C#
10:24:43PMunchAre they?
10:25:03Araqyeah, foo(arg: value) is the syntax, colons instead of equals
10:25:37PMunchAah
10:25:53PMunchOkay, 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:42lqdev[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:04FromDiscord<Clyybber> madprops: There are also the goroutines in nim
11:19:10FromDiscord<Clyybber> literally the same
11:19:36FromDiscord<Clyybber> !repo goroutines
11:19:36disbothttps://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:18Zevvwhat'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:58PMunchlqdev[m], yeah I was ranting about the lack of "for line in myString.lines" yesterday
12:25:41lqdev[m]PMunch: it's useful in if statements, too
12:26:00PMunchOh yeah, that's true
12:26:38FromDiscord<KcVinu> Hi all, does Nim's "concept" is equal to the "Interface" in C# ?
12:26:58FromGitter<alehander92> PMunch but they still have extension methods , and c# is not really focused on CLI-s, so no echo-like stuff
12:27:09FromGitter<alehander92> overally i agree but still c# is one of the nicest mainstream languages
12:27:13FromGitter<alehander92> afaik
12:27:39PMunchKcVinu, not really. But they can be used to implement similar functionality
12:27:47PMunchConceptually though they are quite different
12:28:52PMunchalehander92, extension methods? C# is okay, don't get me wrong, but there are certainly things that I miss coming from Nim.
12:28:59FromDiscord<KcVinu> @PMunch - Great. Is there any examples for concepts using like an Interface
12:29:21PMunchAnd 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:35FromGitter<alehander92> https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods
12:29:51FromGitter<alehander92> not the same but still useful
12:29:55PMunchKcVinu, not that I know of, it's quite a new feature, and I think it's still marked as experimental and unstable
12:29:58FromGitter<alehander92> yes thats true
12:29:59lqdev[m]@alehander42 C++ would be even better, if not its horrible error messages that could fill up 10 A4 pages
12:30:03FromGitter<alehander92> but then you open a can of worms
12:30:08FromGitter<alehander92> nah sorry c++ is a pass from me
12:30:11PMunchSo there isn't a lot of examples/tutorials/documentation around them
12:30:27FromGitter<alehander92> it has many genius things but its just .. overdesigned
12:30:31FromGitter<alehander92> and the compat thing
12:30:48lqdev[m]yeah
12:30:52lqdev[m]that's why I prefer C
12:30:52FromGitter<alehander92> i hope rust/nim/etc manage to take its place
12:30:56lqdev[m]whenever possible
12:31:13FromGitter<alehander92> yeah, i kinda prefer it
12:31:13PMunchKcVinu, normally you would implement interfaces like this in Nim: https://www.openmymind.net/Interfaces-In-Nim/
12:31:15FromGitter<alehander92> as well
12:31:29lqdev[m]also D is a thibg
12:31:30PMunchThat's more or less the way the `streams` module does it
12:31:37lqdev[m]:s/thibg/thing
12:32:17FromDiscord<KcVinu> @PMunch -Thanks.
12:33:14PMunchalehander92, ah so similar to how all procs work in Nim :P
12:33:34FromGitter<alehander92> thats why i am interested in os research, hopefully future os-es force more software to not depend on C
12:33:46Araqthe more I studied it, the more I liked C++. The concepts behind it are excellent, the language itself sucks though.
12:33:49FromGitter<alehander92> or at least to make some standartized type API which expresses better stuff
12:34:22FromGitter<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:25Araqand I'm blaming C for most of the crap in C++
12:34:36FromGitter<alehander92> almost impossible otherwise the ideas are probably great
12:35:05FromGitter<alehander92> thats why what you said about c# is remarkable
12:35:14FromGitter<alehander92> many features working kinda well together
12:35:19FromGitter<alehander92> is rarer
12:35:27Araqtake Rust's "borrowed pointers" for example. Turns out C++98 had it, written as &
12:35:39Araqok, it wasn't checked
12:35:48Araqand it still isn't and it's a big problem.
12:37:51Araqbut 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:13FromGitter<alehander92> yeah but just look at how many features
12:38:22FromGitter<alehander92> and competing proposals
12:38:32Araqlike what?
12:38:37FromGitter<alehander92> and very base stuff like modules is still not even being added
12:39:14FromGitter<alehander92> ok contracts are removed
12:39:48Araqtake C++: multiple inheritance, one feature dealing with what takes C# 2 features (classes and interfaces)
12:40:05FromGitter<alehander92> concepts, ranges, spaceship op, coroutines
12:40:07Araqand C# is still patching its interfaces and adding more and more features to them that classes already have
12:40:22FromGitter<alehander92> and thats after big changes in 11 and then some in 14,17
12:40:31FromGitter<alehander92> and still contracts + modules are even remaining
12:40:45FromGitter<alehander92> and i constantly see newer ideas like limited pattern matching etc
12:41:00Araqsame in C# land
12:41:07FromGitter<alehander92> its just a huge language designed by committe, like, its obviously full with great designs/ideas
12:41:12AraqC# got pattern matching too.
12:41:17FromGitter<alehander92> but if you somehow sit and try to fit all this in a new language
12:41:26Araqwell then you get Nim. :P
12:41:45FromGitter<alehander92> in a more designed-together reuse-features way
12:41:52FromGitter<alehander92> yeah Nim is closer to that ideal somehow
12:42:28FromGitter<alehander92> C++ just remains me of scala in the way its evolving
12:42:28Araqbut my point is that C++ is actually comparable to C# and Scala when you look at the creeping featurism
12:42:35FromGitter<alehander92> but i am not an expert in any of them so yeah
12:42:55Araqso yeah, it's piling features on top of features
12:43:07FromGitter<alehander92> and too many syntax additions
12:43:15FromGitter<alehander92> and its not like they're not needed/useful
12:43:17Araqbut so is C# and Scala and maybe Java and Kotlin too
12:43:31Araqand yet only C++ gets blamed for it ;-)
12:43:40FromGitter<alehander92> yeah but C++ already had the whole template thing + other stuff + the C history
12:43:53FromGitter<alehander92> so its piling on a bigger base of piles
12:44:00AraqC# has the ugly Java history though
12:44:11Araqwhere everything must put inside a class
12:44:16Araq*be put
12:45:02FromGitter<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:17FromGitter<alehander92> yeah but thats not complicated to learn
12:46:56Araqbut is your guess based on anything else but folklore.
12:47:16FromGitter<alehander92> its based on my own experience
12:47:25FromGitter<alehander92> obviously anecdotical
12:48:15FromGitter<alehander92> but i agree there are no many big langdesign group research experiments what can you do
12:48:34Araqwhen C++ got the blame for its complexity it was about overloading and operator overloading and default parameters.
12:48:40FromGitter<alehander92> put 5_000 people in tents with X lang for 6 months and start watching their experience
12:49:02Araqand now many languages have the same things, including Python
12:49:12Araqand they don't get blamed for these features.
12:49:15FromGitter<alehander92> yeah but c++ has like 20 new things
12:49:33Araqso what, in 10 years the other languages will have copied these features :P
12:49:36FromGitter<alehander92> dont get me wrong, i think the features themselves are good
12:49:48Araqand also, this is exactly the wrong question
12:49:50*neceve quit (Ping timeout: 258 seconds)
12:49:51FromGitter<alehander92> but there must be a better way to combine them
12:50:00Araq"5_000 people in tents with X lang for 6 months and start watching their experience"
12:50:08Araqso you only gonna program for 6 months in your life?
12:50:37FromGitter<alehander92> well i cant imagine how can you do a bigger "science-y" experiment
12:50:53FromGitter<alehander92> like you can obviously interview some people periodically but no tents man
12:51:00Araqyou can look at the products produced with lang X
12:51:07*neceve joined #nim
12:51:09FromGitter<alehander92> eh so many variables
12:51:15Araqand their reliability, memory consumption etc etc
12:51:24FromGitter<alehander92> but this is about speed of learning
12:52:02Araqbut why? I can learn Euphoria in an afternoon
12:52:49Araqand afterwards I'm left with a silly language that doesn't let me create the system I want to create
12:52:54FromGitter<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:13FromGitter<alehander92> and 1 day vs 1 month might not matter
12:53:19FromGitter<alehander92> but 6 months vs 18 months
12:53:20Araqexactly, learnability is not the same as "pain to use in practice after you learned it"
12:53:23FromGitter<alehander92> is a big difference
12:53:45FromGitter<alehander92> ok, but i just dont see the value
12:54:14FromGitter<alehander92> in learning e.g. language as c++ compared to e.g. nim (or even rust)
12:54:44FromGitter<alehander92> like obviously it has great value because of vast amounts of existing technology/jobs and to research ideas
12:55:12FromGitter<alehander92> but from purely language-to-use it just not a good foundation
12:55:18FromGitter<alehander92> even if you add 20 more features
12:55:27FromGitter<alehander92> you have to start removing some stuff
12:55:42FromGitter<alehander92> to actually make greater progress
12:55:44Araqok, fine, I'll bite. What to remove from C++?
12:56:26*abm joined #nim
12:59:12FromGitter<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:12FromGitter... [https://gitter.im/nim-lang/Nim?at=5e14809f4687e30fe25c93fb]
12:59:18FromGitter<alehander92> but yeah thats just a different language
13:00:33Araqtrue 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:45Araqbut indeed it takes them decades
13:01:12*marmotini_ joined #nim
13:01:15Araqhowever, 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:24Araqin order to phase out the old cruft
13:01:43FromGitter<alehander92> exactly
13:02:14FromGitter<alehander92> probably one cant do it better, like, with their constraints i am even amazed by their progress
13:02:26FromGitter<alehander92> just saying that if i can use a new language without this foundation why not
13:02:29FromDiscord<Clyybber> Araq: Ugh, my PSym set doesn't work. Many CFG nodes don't have a sym
13:02:51AraqClyybber: ah hmm, yeah sorry, but all have a 'node'
13:02:57FromGitter<alehander92> and of course .. this becomes the same problem for those new languages <x> time later :P
13:03:24FromDiscord<Clyybber> Araq: Yeah, I could store that and iterate over each node and see if it aliases the same loc
13:04:05AraqI 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:35Araqand 'int[N] p; int N' is an array and you can get the size from parameter N
13:05:07AraqC++ is instead getting observer_ptr<T> for T* that cannot point to an array
13:05:14Araqmadness
13:05:53*marmotini_ quit (Ping timeout: 260 seconds)
13:06:24FromGitter<alehander92> but this is just hacky
13:06:33FromGitter<alehander92> because you then have so many years of programs and people
13:06:40FromGitter<alehander92> used to the way the features worked
13:07:06FromGitter<alehander92> so if they keep working .. but in more interesting ways it creates even more thing to learn
13:07:30FromGitter<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:05Araqwell 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:19Araqsame problem with OSes, they have signals and threads and fork() and shells and env vars
13:12:37Araqand you have to learn it all or else your program has subtle bugs
13:13:03Araqor it doesn't "play nicely" with all the other junk
13:14:52Araqand 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:24AraqBecause there is no "Unix Conf 2019" where people complain about it in their talks that are then uploaded to Youtube.
13:17:09AraqSo all our emotional resources can focus on hating C++'s complexity.
13:17:25FromDiscord<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:38FromDiscord<Clyybber> Or does it serve another purpose?
13:19:35FromDiscord<Skaruts> if you need more militants hating on C++'s complexity I'm in 🙂
13:19:36Araqthere is special handling for it inside useInstrTargets, defInstrTagets
13:19:44leorizenarimiran: o/
13:19:49narimiranleorize: hey!
13:20:09FromDiscord<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:42FromDiscord<gingerBill> *extent
13:21:09narimiranleorize: 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:23blackbeard420one could argue that nim is as complex as c++
13:22:03leorizenarimiran: try updating to the latest?
13:22:06FromDiscord<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:32narimiranleorize: i did. and that's why i reverted back
13:22:34AraqClyybber: however, remove the .sym field and see what breaks
13:22:40Araqin theory it's redundant
13:23:00Araqand the tests cover everything
13:23:07leorizenarimiran: or this is how to reproduce: open system.nim, do a screenshot when it happens, then send it to me :p
13:23:36FromDiscord<Skaruts> C++ STL errors are scarily complex
13:23:38narimiranleorize: ok, let me try going back to latest, producing a bug
13:24:32FromDiscord<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:49FromDiscord<gingerBill> Sorry to bother you Araq, but what was the reason you made Nim?
13:25:03FromDiscord<gingerBill> (Or Nimrod as it was called when I first found out about it)
13:25:41narimiranleorize: (un)fortunately it is easy to reproduce :) screenshots in a minute
13:25:46FromDiscord<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:57leorizenarimiran: yea I just reproduced it :P
13:26:30narimiranhmm, it seems that after some delay, the highlighting corrects itself
13:27:17FromDiscord<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:29FromDiscord<gingerBill> Compiler Construction is also a brilliant book to learn from.
13:27:37narimiranleorize: here are some screenshots if needed: https://imgur.com/a/x5W6E0G
13:27:42FromDiscord<gingerBill> So much better than the Dragon book which everyone seems to recommend for bizarre reason.
13:27:43leorizenarimiran: it's due to the fix I made for Zevv lol
13:28:13narimiranleorize: yeah, i know :) and that's why i reverted nim.nvim to `ea3bd85fc` commit
13:28:35FromDiscord<gingerBill> So much better than the Dragon book which everyone seems to recommend for some bizarre reason.
13:30:58FromDiscord<Skaruts> wouldn't mind reading on compilers actually, always felt the itch to make my own language for fun
13:32:09AraqgingerBill: I've probably answered the question so often that I wrote down some good answer to that somewhere
13:32:21FromDiscord<gingerBill> Hahaha. I apologize for that.
13:32:28Araqbut I don't find it so here it is in a nutshell:
13:32:41Araqstudy Ada, Modula 3, C++ and Lisp
13:33:00Araqand realize how much of Lisp can be brought into a "systems" programming setting
13:33:05Araqand you get Nim.
13:33:24Araqtake the syntax from Python because both {} and 'begin end' suck.
13:33:29lqdev[m]@Skaruts I can confirm it's fun
13:34:01*ptdel joined #nim
13:34:06*Lord_Nightmare joined #nim
13:34:42FromGitter<alehander92> Araq but its not the same
13:34:55FromDiscord<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:55AraqNim 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:57FromGitter<alehander92> when you have a feature X and it just works in the same way always
13:35:01FromGitter<alehander92> thats just better
13:35:14FromGitter<alehander92> and yeah os-es are also not a great example
13:35:23FromGitter<alehander92> but its much harder to change os-es
13:35:46FromGitter<alehander92> Araq well there are typed lisp-s
13:35:49FromGitter<alehander92> and even lips os-es
13:35:53FromGitter<alehander92> so they kinda did
13:36:11Araqyeah but their type systems were bad
13:36:23FromDiscord<gingerBill> @Skaruts I recommend also reading compilers themselves. Compilers I recommend to learn from:
13:36:23FromDiscord<gingerBill> * Oberon (what I learned from too, but probably a little old nowadays)
13:36:23FromDiscord<gingerBill> * Go (there are two different ones (the actual one and the tooling package))
13:36:24FromDiscord<gingerBill> * Nim (very clear and simple, and written in Nim too)
13:36:24FromDiscord<gingerBill> * Odin (clear to read, and sorry to plug my own, but it is a clear resource to learn from too)
13:36:25FromDiscord<gingerBill>
13:36:27Araqfor example, most Lisps use type annotations for optimizations
13:36:28FromDiscord<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:48Araqbut they don't *check* the types
13:37:14Araqit's more like "assume this type X here to produce faster code", like C's restrict feature.
13:37:29Araqthe good type system for systems programming was explored by Ada IMHO
13:37:58FromGitter<alehander92> probably yeah
13:38:23FromGitter<alehander92> but still probably somebody did a lisp with ada-like stuff
13:38:51FromDiscord<Skaruts> well I made a brainfuck compiler from a nim tutorial once 🙂
13:39:07FromGitter<alehander92> but i dont really love the lisp syntax these days after playing with it many years
13:39:07FromGitter<alehander92> gingerBill oh, you're the odin creator, welcome
13:39:14FromDiscord<gingerBill> I am 🙂 Hello.
13:39:15FromGitter<alehander92> hate the name, but otherwise great effort
13:39:27FromGitter<alehander92> are you coming to fosdem?
13:39:37FromDiscord<gingerBill> I am not.
13:40:02FromDiscord<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:20FromDiscord<Skaruts> soudns nordic
13:40:24FromDiscord<Skaruts> sounds*
13:40:35FromDiscord<gingerBill> Because it's named after the Norse god Odin 😛
13:40:43FromDiscord<Skaruts> indeed 🙂
13:40:50FromGitter<alehander92> yeah i just really dislike "mythology"-based names, they dont come from a good place
13:40:53FromGitter<alehander92> but yeah it've been good to see you on fosdem
13:40:57FromDiscord<gingerBill> I like my mythology, similar to Nim (Nimrod) 😛
13:41:14FromDiscord<Skaruts> what does nimrod mean?
13:41:14leorizenarimiran: fixed
13:41:16FromGitter<alehander92> i hate the nimrod name as well, my single biggest `-` about nim's history
13:41:27FromGitter<alehander92> the crown as well
13:41:30FromDiscord<Skaruts> yea I prefer nim
13:41:40FromGitter<alehander92> there was this idea to make a emerging langs room
13:41:42FromDiscord<gingerBill> Nimrod is the biblical figure.
13:41:48FromGitter<alehander92> but mostly crystal/nim got talks
13:42:01FromDiscord<Skaruts> oh, rings a bell
13:42:11Araqhow long is my talk again?
13:42:11narimiranleorize: now that was fast! (and a nice fix with the restriction :))
13:42:19Araqdo I need to prepare anything?
13:42:45AraqI kinda lost my motivation to prepare anything, just give me a whiteboard and let me talk
13:42:57FromDiscord<gingerBill> Nimrod was the leader who built the Tower of Babel, if I remember correctly.
13:43:07Araqexactly
13:43:25FromGitter<alehander92> gingerBill yeah, but thats a pretty bad character from the Bible
13:43:29Araqhe was also the first king ever. (according to scripture)
13:44:46FromDiscord<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:06FromGitter<alehander92> eh thats not true
13:45:35FromGitter<alehander92> like, it's very true but
13:45:45FromGitter<alehander92> being rebellious against God is a pretty clear negative narrative (about Nimrod)
13:45:52FromGitter<alehander92> especially compared to e.g. Abraham
13:45:52FromDiscord<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:34FromDiscord<Skaruts> it's also the most badass character from lotr 😄
13:46:51FromDiscord<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:13Araqalehander92: for me it always was about in arrogance attempting something doomed to fail
13:47:27FromDiscord<gingerBill> Lich is old english for corpse. Not king.
13:47:59FromGitter<alehander92> gingerBill there are many other nicer names to choose from :P
13:48:07FromGitter<alehander92> like `gingerBill`, this one is pretty cool
13:48:28FromDiscord<Skaruts> maybe I'm wrong then... back in Heroes of Might & Magic, Liches had crowns if I recall
13:48:58FromDiscord<Skaruts> maybe I got the wrong impression from several places
13:49:04FromDiscord<gingerBill> I'm not naming my language after myself. Who do I look like?---Linus Torvalds naming everything after himself.
13:49:28FromDiscord<Skaruts> is git named after himself?
13:49:28Araq" being rebellious against God " is a narrow point of view
13:49:33FromGitter<alehander92> Araq yeah this seems like a good description of it
13:49:37FromDiscord<gingerBill> Yes. Git is named after him.
13:49:40FromGitter<alehander92> (the arrogance attempt)
13:50:07FromDiscord<gingerBill> Git is a British insult for someone who is unpleasant, silly, etc.
13:50:27Araqyou could give me some points for the self-reflections :P
13:51:03PMunchAraq, 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:32narimiran...and for questions, right?
13:51:59PMunchAnd 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:47PMunchAnd I think it's preffered to have slides, that way it's easier to watch the presentation later/live on video.
13:53:06PMunchSince you can download the slides as well (these should be uploaded before the presentation).
13:53:12PMunchDidn't you get a mail about this Araq?
13:53:36AraqI did but I don't remember
13:54:02PMunchAh okay, but you are able to find this information if I'm not around :P
13:54:48PMunchalehander92, about the historical connotations about names, those are of course highly subjective.
13:55:26PMunchAnd wasn't the purpose of the tower of Babel to get closer to god, not to rebell against him?
13:55:33PMunchThat whole story is really strange TBH
13:55:37FromDiscord<Clyybber> alehander92: Being rebellious against god must not be bad, if you relate it to lang design
13:55:53FromDiscord<Clyybber> challenge the best
13:56:01FromDiscord<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:01FromDiscord<gingerBill>
13:56:01FromDiscord<gingerBill> I didn't come at it from the perspective "why hasn't this language been made yet with these elements?".
13:57:08PMunchnarimiran, yeah questions as well (if you want them :P)
13:58:00narimiranPMunch: 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:23FromGitter<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:23FromGitter<alehander92> you can call it `david` for the "beat the best" thing
13:58:59PMunchnarimiran, that's true :)
13:59:45Araqalehander92: well the "Babel" reference also refers to current situation see https://xkcd.com/927/
13:59:56FromDiscord<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:58FromDiscord<gingerBill> (in
14:00:21FromGitter<alehander92> yea
14:00:35Araqand 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:07Araqso many different ways of looking at "Nimrod". it was a great name.
14:01:13FromGitter<alehander92> well, i wouldnt call it a bad thing, because after all it did turn out well for people imo
14:02:20FromDiscord<gingerBill> Names are the least thing to worry about.
14:02:22FromGitter<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:37FromDiscord<Skaruts> I though nobody understanding each other's code was the current situation 🤔
14:03:21FromGitter<alehander92> and after all the goal of nim is not really to "make a mess" or be foolishly ambitious and fail :D
14:04:14FromDiscord<Clyybber> alehander92: nim is so fine it challenges the nature of god and computation itself :p
14:04:25FromGitter<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:34FromDiscord<Clyybber> Araq: Did you see this? https://github.com/belamenso/v
14:05:12FromDiscord<Clyybber> connotation depends on subjective interpretation
14:05:15Araqcan you imagine in 2006 when I created the project the name was more in touch with reality
14:05:53PMunchI 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:59AraqClyybber: yeah I've seen it
14:06:18AraqPMunch, let that be the final word about it, completely agree.
14:07:03FromGitter<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:13FromGitter<alehander92> but i guess people can argue about that indeed
14:07:23FromDiscord<Clyybber> baad analogy
14:07:29FromDiscord<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:33FromDiscord<Clyybber> also, stalin is a pretty good lisp
14:08:36FromDiscord<Clyybber> like freaking fast
14:08:45FromGitter<alehander92> Clyybber nope. exactly a good analogy, because you didnt see it that way so it makes you think
14:08:55PMunchIsn't V being developed still?
14:08:55FromGitter<alehander92> yeah i remember that implementation :D
14:09:15Araqyou're the first to compare Nimrod to Hitler
14:09:15FromDiscord<gingerBill> `"Stalin brutally optimizes."`
14:09:33Araqand I think it's blown out of proportion
14:10:09Araqlonging for meeting God is not anti-christian.
14:10:50FromDiscord<Clyybber> and even if it were, the world is not your christian-server :p
14:11:27FromDiscord<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:53Araqgah, you're making me unproductive. see you later.
14:13:00FromDiscord<gingerBill> Same! Gah!
14:13:06FromDiscord<Skaruts> is there a good reason why countup and countdown include the end limit?
14:13:35FromDiscord<gingerBill> Most people think of `countup` as `countupto`, i.e. inclusive.
14:13:38FromDiscord<Clyybber> is there a good reason why they shouldn't?
14:14:07FromDiscord<Skaruts> I don't know, from my experience 99.9% of the time you want to exclude it
14:14:23FromDiscord<Clyybber> then use ..<
14:14:34FromDiscord<Skaruts> when you say "for i in 10", you mean you want 10 iterations, not 11
14:14:43FromDiscord<Skaruts> I know, I'm just asking
14:14:59narimiran@Skrauts don't ask that, Araq just said that he's leaving :D
14:15:00FromGitter<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:41FromDiscord<Skaruts> lol yea
14:17:30FromGitter<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:34FromDiscord<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:55FromGitter<alehander92> but i wouldnt call it a scam, sorry
14:18:20FromGitter<alehander92> and a proper language project doesnt need to worry about such cases
14:18:39FromDiscord<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:05FromGitter<alehander92> Clyybber yeah, but i can always try to make it one :)
14:19:21PMunchYou can't iterate to int.high with an exclusive countup ;)
14:19:52FromGitter<alehander92> such an edge case :D
14:19:53FromDiscord<Skaruts> how does the for look like with that?
14:20:09PMunchalehander92, true :P
14:20:19FromDiscord<Clyybber> alehander92: excorcise me
14:20:19PMunch`for i in int.low..int.high`?
14:20:38FromDiscord<Skaruts> meh that's even more typing than `..<`
14:20:58*marmotini_ quit (Remote host closed the connection)
14:20:58PMunchSkaruts, that iterates over all int numbers
14:21:19FromGitter<alehander92> Clyybber contact your closest Church unironically :P
14:21:35*marmotini_ joined #nim
14:21:43FromDiscord<Skaruts> oh, right
14:22:14FromDiscord<Skaruts> I misunderstood you before actually
14:22:16PMunchIt's not a replacement for `..<` I was just explaining a potential reason why `..` was inclusive
14:23:25PMunchGah, now I have too many tabs open again.. 295 this time..
14:23:34FromDiscord<Clyybber> 396
14:23:42FromDiscord<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:17PMunchWait, you want iterators to not include the last element?
14:24:53FromDiscord<Skaruts> yes
14:25:13FromDiscord<Skaruts> well, I'm wondering why they don't
14:25:24PMunchSo `for c in "hello"` should iterate with the values 'h', 'e', 'l', and 'l'?
14:25:50FromDiscord<Skaruts> nah, I'm just referring to countup and countdown
14:26:04*marmotini_ quit (Ping timeout: 268 seconds)
14:26:16PMunchThen the same argument goes as for ranges..
14:28:32FromDiscord<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:48FromDiscord<Skaruts> 99.9% of C loop are defined with `i < X;`
14:29:59FromDiscord<Clyybber> thats why we have ..<
14:30:06FromDiscord<Clyybber> the same reasoning doesn't apply for nim
14:30:10FromDiscord<Clyybber> since we have low and high too
14:30:39FromDiscord<gingerBill> `..` being exclusion is most likely because of Pascal.
14:30:44FromDiscord<gingerBill> *inclusive
14:30:46FromDiscord<Clyybber> and also since we don't have a `for i in countup(10)
14:30:52FromDiscord<Clyybber> countup has two params
14:30:54FromDiscord<gingerBill> `..` being inclusive, damn typos.
14:31:14FromDiscord<Skaruts> yea the fact that countup takes two params is also annoying
14:31:26*vsantana quit (Quit: leaving)
14:32:36FromDiscord<Clyybber> I don't think so
14:32:49FromDiscord<Clyybber> there is no default that would make sense here
14:32:59FromDiscord<Clyybber> unless you assume all arrays are indexed starting at zero
14:33:03FromDiscord<Clyybber> which isn't a given in nim
14:33:11FromDiscord<Clyybber> since you can have arrays indexed at one too
14:35:53PMunchIn that case you're likely to just use `for i in array` anyways
14:36:21FromGitter<alehander92> yeah range
14:36:26FromGitter<alehander92> looping isnt so common imo
14:36:39FromGitter<alehander92> i'd like to have faster slice looping tho
14:36:50FromGitter<alehander92> so e.g. if i write for i, element in a[2..^1]:
14:36:58FromGitter<alehander92> this doesnt allocate a new sequence and copy
14:38:00PMunchThat would be neat
14:38:08PMunchBut could be hard to implement..
14:38:39PMunchOr maybe not actually
14:40:02FromDiscord<Clyybber> its something that will be solved once we nail borrow semantics down
14:40:58FromGitter<alehander92> the whole slice/view thing
14:41:30*nsf quit (Quit: WeeChat 2.7)
14:43:31FromDiscord<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:18FromDiscord<gingerBill> I know Nim has Move semantics.
14:44:54FromDiscord<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:58FromDiscord<gingerBill> However, Nim's approach is not as pervasive as Rust's.
14:45:07FromDiscord<gingerBill> So Nim's approach is optional.
14:45:12FromGitter<alehander92> it does help goals imo, i guess you ask if the amount of help is worth it?
14:46:41FromGitter<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:54FromDiscord<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:27FromGitter<alehander92> i agree, but you can just write parts of your projects in this style and other parts in gc-assisted style
14:47:35FromGitter<alehander92> maybe
14:47:40FromGitter<alehander92> one day
14:47:45FromDiscord<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:54FromDiscord<gingerBill> Handles with specific generation information and more.
14:48:29FromDiscord<Clyybber> @Skaruts its empty
14:48:32FromDiscord<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:32FromDiscord<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:41FromGitter<Willyboar> Hey guys. I was sick for the last 4-5 days.
14:49:49FromGitter<alehander92> how would that "generation information" look like sorry cant really guess it yet
14:50:06FromGitter<alehander92> @Willyboar hey kalimera
14:50:29FromDiscord<Clyybber> @gingerBill move semantics are an optimization, and with slices its just an optimization too.
14:50:42FromDiscord<Clyybber> We will strive to make it non-intrusive
14:50:49FromDiscord<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:26FromGitter<Willyboar> Kalispera 😉 @alehander92
14:51:29FromDiscord<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:39FromDiscord<Clyybber> well they move stuff
14:51:48FromDiscord<Clyybber> when its a last read we can move
14:51:49FromDiscord<Clyybber> it
14:52:01FromGitter<alehander92> gingerBill i remember that one i think
14:52:07FromGitter<alehander92> and i really liked some insights
14:52:25FromGitter<alehander92> but cant remember most of the meat
14:52:26FromDiscord<gingerBill> I'm old school, so nothing is being moved. How computers work =/= how every day objects work
14:52:28FromGitter<alehander92> thanks
14:52:31FromDiscord<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:28FromDiscord<Clyybber> gingerBill: Its called move because you wouldn't want to destroy twice
14:53:31FromDiscord<Clyybber> so you "move" it
14:53:38FromDiscord<Clyybber> zeroing out the source location
14:53:46FromDiscord<Clyybber> if you have to
14:53:52FromDiscord<Clyybber> otherwise its just a memCpy
14:54:04*marmotini_ joined #nim
14:54:31FromDiscord<gingerBill> A simple way to implement handles (in C) could be like this:
14:54:31FromDiscord<gingerBill> ```c
14:54:31FromDiscord<gingerBill> struct Handle { uint32_t index, generation; };
14:54:31FromDiscord<gingerBill> ```
14:54:32FromDiscord<gingerBill> or even
14:54:32FromDiscord<gingerBill> ```c
14:54:32FromDiscord<gingerBill> struct Handle { uint32_t index : 10; uint32_t generation : 22; };
14:54:34FromDiscord<gingerBill> ```
14:54:52FromDiscord<gingerBill> Different systems may require more or fewer bits.
14:56:52*PMunch quit (Quit: Leaving)
14:56:59FromDiscord<gingerBill> @Clyybber Yes. It's an optimization for objects with constructors.
14:57:09FromDiscord<Clyybber> *destructors
14:57:13FromDiscord<gingerBill> Yes.
14:57:16FromDiscord<gingerBill> TYPOS GALORE TODAY!
15:00:45disruptekslice/views are efficiently impl with cursors.
15:02:20lqdev[m]what's the new .cursor pragma for?
15:02:26*Vladar quit (Quit: Leaving)
15:07:58FromGitter<alehander92> gingerBill yeah it sounds good
15:08:37FromGitter<alehander92> but it does need good language support imo
15:08:41FromDiscord<Clyybber> Araq: Can you explain what PathKinds0 and PathKinds1 mean?
15:08:48FromGitter<alehander92> to make it less easy to have errors
15:09:06FromDiscord<Clyybber> Araq: Does the number refer to the child node?
15:11:53FromDiscord<Skaruts> @Clyybber strange, it's not empty for me
15:12:13FromDiscord<Clyybber> huh, now it works
15:12:27FromDiscord<Skaruts> maybe try this one then: https://play.nim-lang.org/#ix=26GK
15:12:57disruptekcan i get some arc help today, some point?
15:13:34FromDiscord<Clyybber> sure
15:14:16disruptekthanks; checkout gittyup and play with the constants at the top of tgit.nim. bbiab more coffee.
15:14:19FromDiscord<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:55FromDiscord<Skaruts> don't you have to be correcting for the inclusivity all the time?
15:15:08FromDiscord<Clyybber> how so?
15:15:18FromDiscord<Clyybber> only with len
15:15:27FromDiscord<Clyybber> and then you could just use high instead
15:15:36FromGitter<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:15disruptekturns out the awful phase can last months and months if you're a knucklehead.
15:16:31FromDiscord<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:53FromDiscord<Clyybber> @Skaruts It depends on what you are iterating upon
15:17:14FromDiscord<Clyybber> and even if you do I find `..<` better, because its look clarifies that its exclusive
15:17:20FromDiscord<Clyybber> upper bound exclusive
15:19:08FromGitter<alehander92> disruptek say no to coffee
15:19:11FromGitter<alehander92> say yes to airyan
15:19:16FromDiscord<Skaruts> well, exclusivity should be implicit if it was the default, not needed to be clarified
15:19:28FromDiscord<Clyybber> no
15:19:32FromDiscord<Clyybber> it should not be
15:19:35FromDiscord<Clyybber> there is no default
15:19:47FromDiscord<Clyybber> you simply use the appropriate iterator
15:20:06FromDiscord<Skaruts> the default is `..`, the `<` is a correction
15:20:16FromDiscord<Clyybber> no it is not
15:20:20FromDiscord<Skaruts> it's the added `-1`
15:20:26FromDiscord<Skaruts> it's an extra symbol
15:20:30FromDiscord<Clyybber> and so?
15:20:40FromDiscord<Clyybber> I find an extra symbol to clarify a good thing
15:20:45FromDiscord<Skaruts> whch you don't need most of the time 🙂
15:21:10FromDiscord<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:43FromDiscord<Clyybber> yeah, but its wrong
15:21:50FromDiscord<Clyybber> or at least not verifiable
15:21:52FromGitter<alehander92> i think 1 .. n is certainly more obvious to be inclusive
15:22:07FromGitter<alehander92> so i can imagine ..= and ..<
15:22:13FromGitter<alehander92> (probably those exist somewhere else)
15:22:17FromGitter<alehander92> but no .. for exclusivity
15:22:20FromDiscord<Clyybber> also, I think regardless of what is more common, one should choose the best fitting (visually)
15:22:23FromGitter<alehander92> it just seems confusing
15:22:28FromDiscord<Clyybber> yeah
15:23:14FromDiscord<gingerBill> ..= is probably clearer but ugly. Maybe that's just me
15:24:17FromDiscord<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:39FromDiscord<Clyybber> IMO its better to have clear, intuitive syntax over saving one char
15:24:40FromDiscord<Skaruts> (and by biased I mean, maybe my applications are different in nature, most of what I do is games)
15:25:17FromDiscord<Clyybber> @Skaruts there is no default
15:25:31FromDiscord<Clyybber> there is no error thus there need not be a correction
15:26:18FromDiscord<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:42FromDiscord<Clyybber> correction is simply the wrong word
15:26:52FromDiscord<Skaruts> it's equivalent to -1
15:27:01FromDiscord<Clyybber> no
15:27:11FromDiscord<Skaruts> lol it is
15:27:11FromDiscord<Clyybber> onky for integers
15:27:16FromDiscord<Skaruts> of course
15:27:25FromDiscord<Skaruts> I'm not talking about iterating over arrays or strings
15:27:33FromGitter<alehander92> floats
15:27:43FromGitter<alehander92> can we iterate through floats :O
15:27:54FromDiscord<Clyybber> alehander92 nope
15:27:55FromDiscord<Skaruts> I have no idea
15:28:15FromDiscord<Clyybber> I think there was a PR for it but it was rejected
15:28:26FromDiscord<Clyybber> since you could overshoot
15:28:36FromDiscord<Clyybber> due to float arithmetic
15:28:40FromGitter<alehander92> yes
15:28:46FromDiscord<Skaruts> yea imprecision might ruin it
15:31:03FromDiscord<Clyybber> @Skaruts when else do you need ..< ?
15:31:12FromDiscord<Clyybber> if not for iterating over arrays
15:31:23FromDiscord<Skaruts> everywhere else really
15:31:39FromDiscord<Skaruts> the cases where I need inclusive are very rare
15:31:52FromDiscord<Skaruts> same for what I've seen from other people
15:32:04FromDiscord<Clyybber> without examples we cant really argue
15:32:11FromDiscord<Skaruts> well even in one video from Araq I noticed he was using `..<`
15:32:41FromDiscord<Clyybber> also clarity is always better than.. well not clarity
15:33:13FromDiscord<Clyybber> inclusive ranges are symmetric, .. is symmetric
15:33:24FromDiscord<Clyybber> so it just makes more sense
15:33:39FromDiscord<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:49FromDiscord<Clyybber> its simply not worth it to shave one char off and create mass confusion
15:34:38FromDiscord<Clyybber> @Skaruts lol, i was about to argue that it prevents off by one errors due to being easier to reason about
15:34:50FromDiscord<Clyybber> but i guess that argument doesnt hold for ya
15:35:14FromDiscord<Skaruts> I never heard anyone complaining
15:35:26FromDiscord<Clyybber> youll get used to it though, and someday you will appreciate it i gues
15:35:51FromDiscord<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:04nisstyresome languages have a .next() method for floats that does something with the epsilon value, but it's not very useful
15:36:06disruptekfewer rules and fewer exceptions, please.
15:36:09FromDiscord<Clyybber> go to luaconf then
15:36:40FromDiscord<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:00FromDiscord<Skaruts> and same for for exclusive loops
15:37:52FromDiscord<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:26disruptekreally.
15:39:06FromDiscord<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:25FromDiscord<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:34FromDiscord<Skaruts> C is different, in the sense that you have to specify a comparison, it's not that its explicit
15:44:38FromDiscord<Skaruts> see python for loops
15:44:40*rauss quit (Client Quit)
15:44:48FromDiscord<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:52FromDiscord<Skaruts> btw
15:45:01*rauss joined #nim
15:45:06FromDiscord<Skaruts> here's an example: <https://github.com/Skaruts/Game-of-Life-in-Multiple-Languages/blob/master/Nim/cellmap.nim#L35>
15:45:41FromDiscord<Skaruts> here more: <https://github.com/Skaruts/roguelikedev-rl-tutorial-2019/blob/master/map_gen/dungeon_gen.nim#L15>
15:45:51FromDiscord<Clyybber> I just don't see the problem
15:46:26FromDiscord<Clyybber> Nim doesn't save you that one char because it is *not* opinionated
15:47:23FromDiscord<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:37FromDiscord<Clyybber> ugh
15:47:46disruptekyes, but if we tie semantics to the past, we never advance what people use.
15:47:51FromDiscord<Skaruts> from my experience, exclusive, and why most languages (that I know at least) are exclusive
15:48:00FromDiscord<Clyybber> and that is an opinion
15:48:14FromDiscord<Skaruts> that's an observation, not an opinion
15:48:17disruptekwe're in the dark ages of programming. scrabbling around in the mud like animals.
15:48:25disruptekit won't be this way forever, unless we never evolve.
15:48:48FromDiscord<Skaruts> well you could argue that about anything
15:48:52FromDiscord<Clyybber> @Skaruts .. is inclusive because .. is symmetric and inclusive ranges are symmetric
15:48:57FromDiscord<gingerBill> No one should be opinionated!
15:49:07FromDiscord<gingerBill> That's my opinion.
15:49:25FromDiscord<Clyybber> @Skaruts there is no default, so there is nothing to argue about actually
15:49:48disruptekyeah, it's not opinion. it's fact.
15:50:51FromDiscord<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:08FromDiscord<Clyybber> because its not `countupuntil`
15:51:08FromDiscord<Skaruts> when you use either of them you'll have to do -1
15:51:16FromDiscord<Clyybber> if you want -1 that is
15:51:20FromDiscord<Clyybber> if you dont, dont
15:51:28*floppydh quit (Quit: WeeChat 2.6)
15:51:35FromDiscord<Skaruts> didn't know that exists, but it's a bit of a mouthfull to type...
15:51:44FromDiscord<Clyybber> it doesnt exist
15:51:50FromDiscord<Skaruts> ah ok
15:51:55FromDiscord<Skaruts> well then my point stands
15:51:59disruptekskaruts: fork the compiler and you'll understand better.
15:52:30FromDiscord<Skaruts> does the compiler use inclusive loops most of the time?
15:52:40FromDiscord<Skaruts> as in `..` and not `..<`
15:52:40FromDiscord<Clyybber> @Skaruts see, if we were to make .. imply from n until m -1 it would be opinionated
15:52:56FromDiscord<Clyybber> since we could also argue that it should imply from n + 1 until m
15:53:05FromDiscord<Skaruts> no it wouldn't, there's no opinion in this
15:53:09disruptekwhy not + 2?
15:53:17FromDiscord<Clyybber> @Skaruts no it uses exclusive ones most of the time
15:53:22FromDiscord<Clyybber> but it doesn't matter
15:54:11FromDiscord<Skaruts> then there you go
15:54:14FromDiscord<Clyybber> since you don't yakshave one char off just because it gets used more often
15:54:23FromDiscord<Clyybber> its just unneccessary
15:54:33*marmotini_ quit (Ping timeout: 265 seconds)
15:54:44disruptekbbl; i have some lint i need to remove from my navel.
15:55:02FromDiscord<Clyybber> c ya
15:55:31*marmotini_ joined #nim
15:55:58FromDiscord<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:29FromDiscord<Clyybber> I know what you mean, but it doesn't apply to nim
15:56:54FromDiscord<Skaruts> ok, but that's back to where we started, where I asked why is that?
15:57:12FromDiscord<Skaruts> it seems backwards to me
15:57:36FromDiscord<Clyybber> you do understand why it is the way it is for `..` and `..<` right?
15:57:42FromDiscord<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:42FromDiscord<gingerBill> ```
15:57:42FromDiscord<gingerBill> for i in 0..<12 {}
15:57:42FromDiscord<gingerBill> ```
15:57:43FromDiscord<gingerBill> is a good case for `..<`
15:57:43FromDiscord<gingerBill>
15:57:43FromDiscord<gingerBill> ```
15:57:45FromDiscord<gingerBill> switch c {
15:57:46FromDiscord<gingerBill> case 'A' .. 'Z', 'a' .. 'z':
15:57:48FromDiscord<gingerBill> case '0' .. '9':
15:57:48FromDiscord<gingerBill> }
15:57:49FromDiscord<gingerBill> ```
15:57:50FromDiscord<gingerBill> is a good case for `..`
15:57:52FromDiscord<gingerBill>
15:57:53FromDiscord<gingerBill> Different contexts prefer different ranges.
15:57:55FromDiscord<gingerBill>
15:57:55solitudesfoh no
15:58:02FromDiscord<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:04FromDiscord<Skaruts> but why not `..` and `..>` instead?
15:58:07FromDiscord<Clyybber> bruh
15:58:11FromDiscord<Clyybber> because `..` is symmetric
15:58:19FromDiscord<Clyybber> and inclusive ranges are symmetric
15:58:32Yardanico@gingerBill please don't paste more than 2 lines of code in Discord :)
15:58:36FromDiscord<Clyybber> and exlcusive ones are not
15:58:36FromDiscord<Skaruts> ok, I'm fine with that, I don't much of gripe with ranges tbh, I understand the logic there
15:58:37Yardanicopeople in IRC or Gitter are gonna suffer
15:58:46FromDiscord<Skaruts> ehe
15:58:52FromDiscord<gingerBill> Yardanico: I apologize. I am so used to Discord now over IRC.
15:59:05FromDiscord<gingerBill> In my IRC days, short lines everywhere.
15:59:28FromDiscord<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:41FromDiscord<gingerBill> Short answer: `..<` and `..` have different use cases in practice.
16:00:31FromDiscord<Clyybber> @Skaruts I actually can't argue about countup and countdown other than it would be confusing to change them now
16:00:53FromDiscord<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:00FromDiscord<Clyybber> yeah
16:01:02*marmotini_ quit (Ping timeout: 268 seconds)
16:01:07FromDiscord<Clyybber> so you write countup 0, 9
16:01:08FromDiscord<Skaruts> in lua it makes sense to be inclusive because it starts at 1, although that doesn't make sense
16:01:15FromDiscord<Clyybber> you just made your argument yourself
16:01:21FromDiscord<Skaruts> no
16:01:24FromDiscord<Clyybber> sure
16:01:35FromDiscord<Clyybber> because you yourself thought about it in terms of zero to nine
16:01:48FromDiscord<Skaruts> repeat 10, the 10 is the number of iterations, so the computer does 0.....9, which is 10 iterations
16:01:53FromDiscord<Clyybber> yeah
16:02:03FromDiscord<Skaruts> but yiou type `10`
16:02:04FromDiscord<Clyybber> but countup is ot repeat
16:02:09FromDiscord<Clyybber> not
16:02:19FromGitter<matrixbot> `grantmwilliams` so ..< is a non inclusive range? 1..<3 would give you 1, 2?
16:02:24FromDiscord<Clyybber> but I agree, if we had a repeat iterator it should behave the way you mentioned
16:02:36FromDiscord<Clyybber> grantmwilliams: exactly
16:02:36Yardanicohttps://www.youtube.com/watch?v=GPxTX2kVzYE
16:02:40Yardanicosorry wrong window :(
16:02:45FromDiscord<Clyybber> lol
16:04:18FromDiscord<Clyybber> @Skaruts in practice countup isnt used that often, you more often use its alias `..`
16:04:50FromDiscord<Clyybber> and for countdown its not clear if it would be lowerbound or upperbound exclusive
16:05:07FromDiscord<Clyybber> so Nim has chosen the unambiguous case of it being inclusive
16:06:43FromDiscord<Clyybber> Yardanico: Played that on piano once, was an experience for sure..
16:22:26FromDiscord<Skaruts> I suppose nim could provide both cases though, as it is, as well as a python like iterator
16:22:40FromDiscord<Skaruts> like python `range`
16:23:03FromDiscord<Clyybber> I guess it could yeah,
16:23:12FromDiscord<Clyybber> but it should not be called range then :p
16:23:16FromDiscord<Clyybber> because that would be confusing
16:23:21FromDiscord<Clyybber> for Nim users
16:23:40FromDiscord<Skaruts> yea, it would be inconsistent with actual ranges
16:23:47FromDiscord<Clyybber> yeah
16:23:52*pbb quit (Quit: No Ping reply in 180 seconds.)
16:24:18FromDiscord<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:38FromDiscord<Clyybber> heh
16:24:55FromDiscord<Skaruts> maybe because I've typed that 999999 times so far...
16:25:19*pbb joined #nim
16:25:59FromDiscord<Skaruts> I'll talk to Araq later to see what he thinks of it, maybe I could propose it
16:26:19FromDiscord<Clyybber> repeat would be a good candidate IMO
16:26:54FromDiscord<Solitude> nice discussion, brehs, almost as much substance as in `& is unreachable`.
16:27:08FromGitter<kayabaNerve> How can I get an inner macro evaluated before an outer macro?
16:27:22FromDiscord<Skaruts> what was meant by "unreachable"?
16:27:29FromDiscord<Clyybber> with the fingers lol
16:27:37FromDiscord<Skaruts> I agree to it then lol
16:27:44FromDiscord<Clyybber> haha
16:28:28FromDiscord<Skaruts> it's a bit too far from either shift key
16:28:32FromGitter<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:43FromDiscord<Clyybber> yall need to play more C:DDA
16:30:04FromDiscord<Clyybber> you craft stuff with `&` there
16:31:08FromDiscord<Skaruts> symbols are a bit of a pain though because keyboards are different in different places
16:31:29FromDiscord<Skaruts> what's handy for some is a pain for others
16:33:09FromDiscord<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:04FromDiscord<Clyybber> as long as no one ever reads your code :p
16:34:04FromDiscord<Skaruts> I find it way more readable tbh
16:34:13FromDiscord<Skaruts> less clutering
16:34:16FromDiscord<Clyybber> heh, coming from lua, I don't
16:36:48FromDiscord<Skaruts> yea, this kind of stuff is highly subjective, and maybe it also depends on the colors of your syntax highlighting
16:37:27FromDiscord<Skaruts> that's really the strong point about nim, you can adjust it 🙂
16:37:37FromDiscord<Clyybber> yep
16:41:04*krux02 joined #nim
16:45:33FromDiscord<Rika> oh lord no not the & is unreachable discussion again
16:45:35FromDiscord<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:53FromDiscord<Skaruts> thank goodness for `fmt` 😄
16:55:19*marmotini_ joined #nim
16:56:30narimiran"almost as much substance as in `& is unreachable`." -- legendary stuff :) :)
16:56:35FromDiscord<Rika> theyre not functionally the same
16:58:04FromDiscord<Skaruts> I know, but you can replace &s with it
16:58:48narimiranif 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:24disruptekwhen are the survey results out?
17:00:03Yardanicodisruptek: around 2-3 months I think
17:00:07disruptek~survey is the Nim Community Servey at https://nim-lang.org/blog/2019/12/20/community-survey-2019.html
17:00:08disbotsurvey: 11the Nim Community Servey at https://nim-lang.org/blog/2019/12/20/community-survey-2019.html
17:00:17disruptek~survey is the Nim Community Survey at https://nim-lang.org/blog/2019/12/20/community-survey-2019.html
17:00:18disbotsurvey: 11the Nim Community Survey at https://nim-lang.org/blog/2019/12/20/community-survey-2019.html
17:00:29Yardanicoyou can check how long did it take for the results for previous two surveys to come out
17:00:34lqdev[m]that's why rod will have `*&&*` as the concat operator.
17:00:42lqdev[m]even more unreachable, muhaha!
17:00:47narimiranYardanico, disruptek: when i decide it is enough :)
17:00:51disrupteki can't. my days are spent trying to get arc to behave.
17:00:59Yardanico2017 - 23 June 2017 01 October 2017 , 2018 - 23 June 2018 - 27 October 2018
17:01:07narimiranbtw, from the article: "Submissions will be accepted until around February 2020, depending on the response rates"
17:01:12Yardanicooh okay
17:01:18Yardanicoand also it'll take some time to prepare the blog article
17:01:24narimiranyep
17:02:15FromDiscord<Clyybber> ~survey
17:02:16disbotsurvey: 11the Nim Community Survey at https://nim-lang.org/blog/2019/12/20/community-survey-2019.html
17:02:57FromDiscord<Skaruts> gitter and irc people suffer due to multilines, discord people suffer because of links without < >
17:02:59FromDiscord<Skaruts> :S
17:03:17FromDiscord<Clyybber> huh, why should the links have <>?
17:03:34FromDiscord<Skaruts> to omit the big a** banners
17:03:41FromDiscord<Skaruts> or whatever they're called
17:03:42FromDiscord<Clyybber> ah
17:03:46disruptekhuh?
17:03:54disrupteki can add those if it helps.
17:04:17FromDiscord<~i is> sorry
17:04:52FromDiscord<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:12FromDiscord<Skaruts> This fucks with IRC users
17:05:38FromDiscord<Skaruts> lol
17:05:42FromDiscord<Clyybber> blissfully unaware
17:05:51disruptekpretend i'm an idiot. do you want <> around URLs or not.
17:05:53narimiran"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:12FromDiscord<Skaruts> 🙂
17:06:23FromDiscord<demotomohiro> <https://nim-lang.org/blog/2019/12/20/community-survey-2019.html>
17:06:26FromDiscord<disruptor> disruptek: hello. brother
17:07:08FromDiscord<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:11FromDiscord<demotomohiro> <URL> doesn't show preview on discord
17:07:22stefantalpalaruSkaruts: there's a Discord setting to disable link expansion. Search for it in preferences.
17:07:40FromGitter<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:43disruptekso it's settled; learn a thing about configuring your client.
17:07:59FromDiscord<Skaruts> gonna take a look
17:08:47disrupteki probably should emboss urls with underscore/blue in the footnotes, too.
17:09:36FromDiscord<Skaruts> nice, I turned it off, thanks
17:09:43narimiran@grantmwilliams you can directly connect to IRC without matrix bot. leorize knows the details
17:10:14FromDiscord<Clyybber> @Skaruts can you change your nickname on this server?
17:11:11FromDiscord<Skaruts> I never tried
17:11:26FromDiscord<Clyybber> I'm not requesting you to :p, I was just wondering if it is possible
17:12:06FromDiscord<Clyybber> because it probably shouldn't be
17:12:15FromDiscord<Clyybber> otherwise you could impersonate people pretty easily
17:12:20FromDiscord<Clyybber> and irc users wouldn't notice
17:12:39FromDiscord<Arnold Braunchweiger> test
17:12:41disruptekirc users don't care.
17:12:48FromDiscord<Arnold Braunchweiger> seems like I can
17:12:51disruptekthe whole point of nicks is blame.
17:13:02FromDiscord<Clyybber> @Arnold Braunchweiger thanks for checking
17:13:28FromGitter<alehander92> ~clyybber
17:13:29disbotno footnotes for `clyybber`. 🙁
17:13:36disruptekthe reason `disruptek` wasn't taken is that no one wants to be confused for the moron that wrote my code.
17:13:38FromGitter<alehander92> come on disbot this is embarassing
17:13:45FromDiscord<Skaruts> I changed it in the settings, though, is there any other way?
17:13:48FromDiscord<Clyybber> ~clyybber is a dick
17:13:49disbotclyybber: 11a dick
17:13:52FromDiscord<Clyybber> lol
17:14:04solitudesf~clyybber
17:14:05disbotclyybber: 11a dick
17:14:07FromGitter<alehander92> ~is is is
17:14:08disbotis: 11is
17:14:30FromGitter<alehander92> i am not sure what i wanted to accomplish
17:14:34FromGitter<alehander92> but i didnt
17:14:51FromGitter<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:07disruptekirc > discord > gitter.
17:15:23narimiran@grantmwilliams there is a direct connection from riot to irc
17:15:28FromDiscord<Skaruts> agree, but for talking about programming discord > irc
17:15:34FromDiscord<Skaruts> because you can paste code
17:15:39disruptek~clyybber is looks like a fish but smells like a weasel.
17:15:40disbotclyybber: 11a dick
17:15:40disbotclyybber: 11looks like a fish but smells like a weasel.
17:15:55solitudesfactual usable but nonexistant text chat >>>>>>>>>>>>>> irc > discord > gitter
17:15:58FromDiscord<Clyybber> oh, so it appends
17:16:22disruptekyes, but you can replace your own footnote.
17:16:24narimiranhttps://matrix.to/#/#freenode_#nim:matrix.org
17:16:48FromDiscord<Clyybber> disruptek: by indexing it?
17:16:51narimiran(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:56disruptekno, just by setting a new footnote.
17:17:03disruptekcome help me fix gittyup.
17:17:10FromDiscord<Clyybber> so how does it figure out if it should replace the old one?
17:17:11solitudesf~& is unreachable
17:17:11disbot&: 11unreachable
17:17:16solitudesf~&
17:17:17disbot&: 11unreachable -- solitudesf
17:17:19solitudesfnot false
17:17:20FromDiscord<Clyybber> disruptek: Sure, whats the problem?
17:17:30FromDiscord<Clyybber> ah you told me before
17:17:30disruptek--gc:arc
17:17:36disruptek~arc
17:17:37disbotarc: 11a new memory manager for Nim; see https://forum.nim-lang.org/t/5734 -- disruptek
17:17:44FromDiscord<Clyybber> thanks, didn't know that
17:17:46FromDiscord<Clyybber> lol
17:17:47disrupteklol
17:18:23disruptekmaybe -- should be a keyword, too. then it could auto-add docs.
17:18:53FromDiscord<Clyybber> disruptek: what do I have to do reproduce your isse?
17:19:02FromDiscord<Clyybber> and *what* is the issue?
17:19:07disruptekclone gittyup and try to run tgit.nim with --gc:arc.
17:19:20FromDiscord<Clyybber> aight
17:19:31disruptekthe issue is a double free and memory corruption.
17:21:19FromDiscord<Clyybber> cant open nimgit2
17:21:50disruptek`nimph doctor`
17:21:51FromDiscord<Clyybber> whispers: submodules
17:21:58FromGitter<matrixbot> `grantmwilliams` Is this better?
17:22:23FromDiscord<Clyybber> disruptek: don't have nimph installed on this machine
17:22:33FromDiscord<Clyybber> don't you have a nimgit2 file you could lend me ?
17:22:36disrupteknimble install nimgit2
17:22:49FromDiscord<Clyybber> don't have nimble installed on this machine
17:22:54FromDiscord<Clyybber> :p
17:23:01FromDiscord<Clyybber> and I can't find the repo
17:23:03disruptekclever boy.
17:23:17FromDiscord<Clyybber> ah found it
17:24:27FromGitter<matrixbot> `grantmwilliams` This is the first time ive ever tried gitter so im sure ive made a mess of it already
17:24:41FromDiscord<Clyybber> ugh
17:24:44FromDiscord<Clyybber> nimterop dependency
17:25:47FromDiscord<Clyybber> aaah regex
17:26:53disruptekit's like this is your first exposure to the ecosystem.
17:27:32FromDiscord<Clyybber> aaah unicodedb
17:27:44FromGitter<alehander92> grantwilliams looks kinda normal
17:27:46FromDiscord<Clyybber> disruptek: I was using nimble and all that jazz
17:27:51FromGitter<alehander92> but it seems you are on matrix
17:28:06FromGitter<alehander92> this is not jazz clyybber its a package manager
17:28:19FromDiscord<Clyybber> disruptek: emeriting from the ecosystem
17:28:19FromGitter<alehander92> you're not in some kind of cabaret!!!
17:28:20FromDiscord<Clyybber> lol
17:28:40FromGitter<alehander92> my puns are consistently getting worse i like it
17:28:49disruptekthat makes one of us.
17:29:10FromGitter<alehander92> like bono sang
17:29:12FromGitter<alehander92> "one"
17:29:50FromGitter<matrixbot> `grantmwilliams` Alexander Ivanov (Gitter):
17:30:12FromDiscord<Clyybber> and now unicode plus
17:30:18FromDiscord<Clyybber> my --paths are getting many
17:30:22FromGitter<matrixbot> `grantmwilliams` maybe i should just use irc...
17:30:24FromDiscord<Clyybber> and my /tmp smaller
17:31:04narimiran@grantmwilliams can you try to connect to `#freenode_#nim` from riot?
17:32:09FromDiscord<Clyybber> disruptek: cannot importc variable at compile time
17:32:26FromGitter<alehander92> grantmwilliams yep
17:32:28FromDiscord<Clyybber> csterr
17:32:31FromDiscord<Clyybber> cstderr
17:32:47disruptekdid you actually install nimterop? it doesn't work unless it is installed in your $NIMBLE_DIR
17:32:50FromDiscord<Clyybber> nimgit2.nim:27
17:32:59FromDiscord<Clyybber> disruptek: WHY?
17:33:08disruptekblame shashlick. 😁
17:33:23FromGitter<alehander92> https://vim-bootstrap.com/ vim people
17:33:28FromGitter<alehander92> where is nim
17:33:49FromDiscord<Clyybber> I don't get why nimgit2 can't be distributed as a *standalone* wrapper
17:34:11FromGitter<alehander92> because you need an orchestra
17:34:13FromGitter<alehander92> for good jazz
17:34:20FromDiscord<Clyybber> disruptek: So can I just do --nimblePath?
17:34:21shashlicki need https://github.com/nim-lang/Nim/pull/13010 to know $NIMBLE_DIR
17:34:22disbotImplement compileSetting() and compileSettingSeq()
17:34:55FromDiscord<Clyybber> shashlick: I mean, why can't you make nimgit2 independent of nimterop
17:34:57FromDiscord<Clyybber> generate once
17:34:58shashlickClyybber - nimgit2 isn't just a wrapper, it also sets up libgit2 if you don't have it
17:35:14FromDiscord<Clyybber> you mean install it on my system??
17:35:39shashlickif you just `nimble install nimgit2` it allows you to get libgit2 working across any OS
17:36:03FromDiscord<Clyybber> so no way to use it without nimble?
17:36:07shashlicknimterop isn't just about wrapping, it also helps with getting libraries downloaded and built
17:36:13FromDiscord<Clyybber> this is nuts
17:36:22shashlickyou can if you want
17:36:40shashlickif you as the dev wants to deal with downloading and setting up libgit2 and just want a wrapper, sure
17:37:01FromDiscord<Clyybber> shashlick: Why can't it just include a few compile pragmas and have the libgit2 repo as a submodule?
17:37:35shashlickthat doesn't work for larger libraries
17:37:59shashlicki played with compile pragmas long enough to realize it is safer to use the lib's build tools to build it
17:38:15FromDiscord<Clyybber> do you link dynamically?
17:39:03disruptekyep.
17:39:13FromDiscord<Clyybber> so why do I need to build libgit2?
17:39:20disruptekso it can be linked.
17:39:45disruptekthe way this works is, the train moves, not the station.
17:40:42FromDiscord<Clyybber> so I need to build libgit2 to link to libgit?
17:40:47FromDiscord<Clyybber> why is that?
17:41:05FromDiscord<Clyybber> why does it not suffice to include the header and link?
17:41:07disruptekbecause linking happens between object files and not source code.
17:41:13FromDiscord<Clyybber> sure thing
17:41:19disruptek👍
17:41:37FromDiscord<Clyybber> so why do I need to build it?
17:41:42disruptekbecause linking happens between object files and not source code.
17:41:49Yardanicodisruptek: that's not the reason really
17:41:52FromDiscord<Clyybber> but I have the so
17:42:05FromDiscord<Clyybber> so why do I need to build it?
17:42:09FromDiscord<Clyybber> lol
17:42:19disruptekwell, there's an option to link against the system's .so but i don't remember what it is.
17:42:34disruptekif you aren't running HEAD of libgit2, it doesn't matter. i require HEAD.
17:42:42FromDiscord<Clyybber> oh no
17:42:44disruptek0.28.4 does not support status iteration.
17:43:01disruptekergo i cannot safely roll repositories.
17:43:24shashlicknimgit2 will look for libgit2.so in the standard system dirs before downloading
17:43:35disruptekjust imagine how much rage you feel right now.
17:43:41disruptekmultiple that by 7.
17:43:43FromDiscord<Clyybber> i feel you
17:43:48disruptekthat's how pissed solitudesf is.
17:43:56solitudesfhow did you know
17:44:01disrupteki feel you.
17:44:04FromDiscord<Clyybber> ~solitudesf is pissed
17:44:05disbotsolitudesf: 11pissed
17:44:13disrupteki feel your seething contempt.
17:44:17shashlicki think offloading the job of looking for lib dependencies and installing, building is worth the compromise
17:44:43shashlickand nimterop is a build dependency, not a runtime dependency
17:44:55disruptektechnically, nimph will link against 0.28.4, but it will refuse to roll your deps.
17:44:58shashlickits like being upset that you need gcc
17:45:01disruptekbecause it cannot do so safely.
17:45:47FromDiscord<Clyybber> disruptek: so to repro I don't need libgit head?
17:46:05lqdev[m]shashlick: does nimterop support checking out tags in gitPull?
17:46:06disruptekno, you don't.
17:46:13disruptekyes, it does, shashlick.
17:46:36shashlickyes, tags, commits, branches are supported
17:46:44disruptekgit2SetVer="v0.28.4" is a tag. "0.28.4" is a version download.
17:46:46FromDiscord<Clyybber> so how do I make it take my system libgit
17:47:36disruptekshashlick alone knows.
17:48:09shashlickyou need to pass `-d:git2Std` if you want it to look
17:48:45shashlickbut right now, using std libs doesn't do any version checking
17:48:51FromDiscord<Clyybber> thanks
17:49:03FromDiscord<Clyybber> but I'm still getting the importc var at ct error
17:49:12FromDiscord<Clyybber> do I need my compiler built with libFFI?
17:49:14shashlicknimarchive does it by default - https://github.com/genotrance/nimarchive/blob/master/nimarchive/archive.nim#L17
17:49:16shashlickno
17:49:30shashlickcan you share a snippet?
17:50:04FromGitter<deech> Yet another warning for the linter: https://forum.nim-lang.org/t/5777.
17:52:02FromDiscord<Clyybber> shashlick: Ah sry
17:52:07FromDiscord<Clyybber> false alarm, it was my compiler
17:52:11FromDiscord<Clyybber> now I'm getting: /tmp/gittyup/nimgit2/nimgit2.nim(27, 10) template/generic instantiation of `getHeader` from here
17:52:11FromDiscord<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:11FromDiscord<Clyybber> # Build configuration failed - No build files found in /home/clyybber/.cache/nim/nimterop/nimgit2/libgit2Dyn
17:52:11FromDiscord<Clyybber> [AssertionError]
17:52:14FromDiscord<Clyybber> fuck
17:52:17FromDiscord<Clyybber> sry for the paste
17:52:33FromDiscord<Clyybber> oh
17:52:40FromDiscord<Clyybber> I guess I need to download libgit2
17:53:10shashlicknimph build should abstract all this - unless you are building it yourself
17:53:20FromDiscord<Clyybber> thats what I'm doing rn
17:53:25disruptekhe doesn't want to run the nimph bootstrap for some reason.
17:53:32shashlicki don't think disruptek is using -d:git2Std since he wants a specific libgit2 version
17:53:43shashlickokay
17:53:47FromDiscord<Clyybber> brb eatin
17:53:52shashlickClyybber - what's your command line
17:54:12disrupteki specify the defines in gittyup.nim.cfg, but you can screw with them if you want.
17:55:14shashlickClyybber 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:15FromGitter<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:11Yardanicocan you give us game_info json example (please use some pasting service for it)?
18:11:44FromGitter<Albus70007> ok
18:13:44FromGitter<Albus70007> https://pastebin.com/fDwcmdxf
18:14:06FromGitter<Albus70007> is_match_ended is one of the last ones
18:16:03Yardanico@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:20nameisjohnhi all :)
18:16:25nameisjohnI learned about Nim a few seconds ago
18:16:26FromGitter<Albus70007> hi
18:16:37*Trustable quit (Remote host closed the connection)
18:16:49disruptekhi, welcome, and what's your name?
18:16:55Yardanicoxd
18:17:02nameisjohnIts 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:06nameisjohnIt's john :)
18:17:17Yardaniconameisjohn: but please refrain from thinking about nim as "compiled python" :)
18:17:18disruptek~nameisjohn is It's john :)
18:17:19disbotnameisjohn: 11It's john :)
18:17:19nameisjohnI used to be "John" on Freenode for about 12 years but some mod on a big room stole my name
18:17:24FromGitter<Albus70007> i also think like you
18:17:27nameisjohnhaha bingo :P
18:17:50narimirannameisjohn: "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:53Yardanicoapart from the whitespace indentation there's not much similarities between nim and python IMO
18:18:00nameisjohnYardanico haha, ok, you're right. Python doesn't have a monopoly on sane syntax
18:18:01FromGitter<Albus70007> @Yardanico THX, it worked!
18:18:44Yardanico@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:17FromGitter<alehander92> well i'd say syntax is still important and there are many syntax python influences
18:19:21FromGitter<Albus70007> i know it, i actually add it, but just in case
18:19:37FromGitter<alehander92> but metaprogramming is probably the other big thing, but its more lisp-like
18:20:28nameisjohnI 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:34disruptekyou're too late.
18:21:52solitudesfwe're opening tomorrow
18:21:55nameisjohnDo 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:42nameisjohnHaha, sorry, i was going to say something and changed my mind
18:23:11Yardanicouhh, 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:27Yardanicoso you get nice binary executables which only depend on C lib
18:23:43Yardanicoand you can also use musl so you get fully static executables
18:24:22disruptekor you can write nim that doesn't even depend on libc.
18:24:41nameisjohnoh nice, you guys have really thought this through
18:24:42nameisjohnthis is ideal
18:25:12disruptekthere are nim kernels and linux module(s?) written in nim.
18:25:18nameisjohnno waay
18:25:23nameisjohncould you write an OS in Nim?
18:25:32disruptekthat's kinda the idea behind a kernel.
18:25:39nameisjohnhah, ok, derp
18:25:41lqdev[m]also, if you want to, you can statically link C libraries
18:25:45FromGitter<alehander92> yes you can, it can get pretty low level
18:26:06FromDiscord<mratsim> that's a mild statement
18:26:15disruptek!repo alehander42/ nim kernel
18:26:15disbotno results 😢
18:26:18FromGitter<alehander92> well you cant verilog it yet!!
18:26:18disruptekboo
18:26:21FromGitter<alehander92> !repo lodka
18:26:23FromDiscord<Clyybber> !repo volka
18:26:23disbothttps://github.com/leinovladimir/LODKA -- 9LODKA: 11 15 0⭐ 0🍴 & 10 more...
18:26:25disbothttps://github.com/DirtyBitz/volkano-frontend -- 9volkano-frontend: 11The React+Next frontend for Volkano 15 3⭐ 0🍴 7& 29 more...
18:26:30FromDiscord<Clyybber> oh, right lodka
18:26:36*endragor quit (Remote host closed the connection)
18:26:39FromDiscord<Clyybber> I was like vodka but with some L
18:26:44FromGitter<alehander92> https://github.com/alehander92/lodka is extremely hacky
18:26:47disruptek!repo alehander42/lodka
18:26:49disbotno results 😢
18:26:54Yardanicoboat
18:26:56disruptekoh, 92
18:26:57FromGitter<alehander92> but https://github.com/samanthadoran/Mero is the original one
18:27:01FromGitter<alehander92> 1) @dom96 's nimkernel
18:27:08FromDiscord<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:24FromGitter<alehander92> Yardanico exactly! good to have slavic lang around
18:27:29Yardanico:P
18:27:46FromDiscord<Clyybber> shashlick: But I need to clone libgit into my .cache I presume?
18:28:31disrupteknimgit2'll do that for you.
18:28:37FromDiscord<Clyybber> hmm
18:28:41FromDiscord<Clyybber> so why does it not
18:28:50FromDiscord<Clyybber> or does it try to use system headers too?
18:29:02FromDiscord<Clyybber> with -d:git2Std
18:29:05disruptekdid you build nimterop and is it in $NIMBLE_DIR?
18:29:10FromDiscord<Clyybber> nope
18:29:44FromDiscord<Clyybber> does nimterop not do its stuff in the VM?
18:29:44disruptekalso, pull
18:29:53disrupteknot yet it doesn't.
18:30:52FromDiscord<Clyybber> disruptek: your mem corruption, does it still occur without actually calling any libgit2 functions?
18:31:01nameisjohnOK 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:10disruptekall true.
18:31:14*madprops left #nim ("Leaving")
18:31:17nameisjohnhaha, i'm in.
18:31:19nameisjohn:P
18:31:19FromDiscord<Clyybber> everyone's a communist
18:31:24Yardaniconameisjohn: no company backing like Google or Mozilla :)
18:31:24FromDiscord<Clyybber> not a downside
18:31:24*madprops joined #nim
18:31:28FromDiscord<Clyybber> fite me
18:31:32FromDiscord<Clyybber> jk
18:31:32Yardanicoalthough that's not really a downside
18:31:37Yardanicoit's the opposite actually
18:31:39nameisjohnYardanico omg really? i'm tingling
18:32:02disrupteki don't think i have any way to test memory allocation without calling libgit2.
18:32:10nameisjohnI hate what Mozilla Foundation did to their browser
18:32:16nameisjohnbig companies ruin everything, eventually
18:32:22solitudesfnameisjohn, https://nim-lang.github.io/Nim/manual.html#lexical-analysis-identifier-equality if you get past this, then you're ok
18:32:24FromDiscord<Clyybber> true I guess
18:32:30FromGitter<alehander92> hm i kinda like mozilla
18:32:40FromGitter<alehander92> i mean at least its not chrome and they do sponsor some good tech
18:32:51FromGitter<matrixbot> `grantmwilliams` So what is the reasoning behind having countup() and countdown() vs just a count() function (similar to range())?
18:32:54nameisjohnThey're trying hard, but the board is now all stacked with Microsoft/etc.
18:33:04FromDiscord<Clyybber> nameisjohn: in some way open source is communism as its intended
18:33:19lqdev[m]then I'm a communist
18:33:24FromGitter<alehander92> ehh i think its very hard to apply it to digital stuff
18:33:37disruptekhuh, it's hard not to.
18:33:42FromDiscord<Clyybber> lqdev[m]: We all are, in our hearts
18:33:45shashlickClyybber: sorry lunching
18:33:51FromDiscord<Clyybber> disruptek: whisper do it
18:34:03shashlickso nimterop calls nim internally but doesn't yet know what flags were passed to the parent process
18:34:04FromDiscord<Clyybber> hearts and...
18:34:11shashlickso it isn't possible to pass it down to the child processes
18:34:23FromDiscord<Clyybber> shashlick: Ah
18:34:32disruptekhammers and sickles, people; hammers and sickles!
18:34:53FromDiscord<Clyybber> nice
18:35:02FromGitter<alehander92> NOEZ
18:35:10shashlickbut i don't know if that's really your issue yet
18:35:17solitudesf@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:17shashlickis it still not finding any files?
18:35:21FromGitter<alehander92> <flashbacks of red army and 45 years of socialism appear>
18:35:31nameisjohnAll 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:52shashlickplus nimterop is untested in --gc:arc
18:36:10disruptekactually, gittyup worked in --gc:arc once.
18:36:26*gmpreussner quit (Ping timeout: 268 seconds)
18:36:36FromDiscord<Clyybber> disruptek: Is your compiler coming from head?
18:36:39disruptekanother problem gittyup demonstrates is that it fails when `sink` is removed.
18:36:40lqdev[m]nameisjohn: honestly, Nim is a friendly language with a friendly community
18:36:42FromGitter<alehander92> i actually .. think we should be more supportive of commercial code
18:36:49nameisjohnThis HTML example is unfair. This language is unfair. You're going to put Angular out of buisness with this
18:36:53disruptekclyybber: as of yesterday, yeah.
18:36:58FromDiscord<Clyybber> ah
18:36:59nameisjohnlqdev[m] seems that way :)
18:37:02disruptekgit hash: ba4fbb63285ce198a9feb62e8058889462a96a87
18:37:03FromGitter<alehander92> because honestly finding ways to make money with open source leads to so much ads + so much saas
18:37:09FromDiscord<Clyybber> disruptek: I'm fixing a few bugs rn
18:37:11FromDiscord<Clyybber> in arc
18:37:18FromDiscord<Clyybber> so maybe it fixes your issue too
18:37:19FromGitter<alehander92> 1) its actually very fine to expect money for software
18:37:28FromDiscord<Clyybber> if not I'mma dig into it I promise :p
18:37:44disrupteki am building a new compiler now.
18:37:50FromDiscord<Clyybber> even worse
18:38:02FromDiscord<Clyybber> oh well
18:38:06FromGitter<alehander92> disruptek do you want your compiler and my os to play together
18:38:06FromGitter<matrixbot> `grantmwilliams` i feel like having a corporate sponsor is the best way to get paid for open source
18:38:10FromDiscord<Clyybber> not exactly, the only thing that can happen is leak
18:38:19FromGitter<matrixbot> `grantmwilliams` like google & golang or mozilla & rust
18:38:38FromDiscord<Clyybber> its also the best way to succumb to gremium-design
18:38:40disrupteki don't see a change with HEAD.
18:38:50FromDiscord<Clyybber> disruptek: ah, fine
18:39:31nameisjohnFromDiscord 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:36disrupteki would just set the const `specing` to false, to start.
18:39:51disruptektagging = true, tagtable = true.
18:40:13disruptekyou should get a double free.
18:40:13FromGitter<alehander92> sounds interesting nameisjohn
18:40:18nameisjohnSo 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:18FromGitter<alehander92> btw .. its your name day in bulgaria
18:40:25FromDiscord<Clyybber> nameisjohn: Did you make the bug public by now?
18:40:26FromGitter<alehander92> somehow random but anyway
18:41:04nameisjohnYou guys have name-days? That's pretty cool :) People don't know how hard it is to be a synonym for toilet
18:41:27FromGitter<alehander92> wat
18:41:41nameisjohnClyybber, 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:31FromDiscord<Clyybber> hmm, I think many software made for academic purposes is buggy, because it is often made and then never touched again
18:44:07FromDiscord<Clyybber> s / many /m uch
18:44:12nameisjohnSo 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:12nameisjohni 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:49disrupteka lot of academic software is made by those untrained in the art, as well.
18:45:11FromGitter<alehander92> ive heard about it sounds interesting
18:45:57nameisjohnClyybber 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:12nameisjohnSo all our tooling rots away
18:46:42nameisjohndisruptek yeah theres a huge difference between writing code academically, and professionally where customers are involved
18:47:13nameisjohnAlthough the former is how we come to understand the world around us, somehow the stakes are higher for the latter :P
18:47:41disrupteki used to run university networks. it was... challenging.
18:48:25nameisjohnok ! i'm done ! i'm going to learn Nim first thing tomorrow. Thank you all for your warm introduction :)
18:48:38disruptekhave fun, whatsyername.
18:49:22FromDiscord<Clyybber> cee ya john
18:49:31nameisjohnOh, 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:43disruptek~manual
18:49:44disbotno footnotes for `manual`. 🙁
18:49:47disruptek~compiler
18:49:48disbotcompiler: 11https://nim-lang.org/docs/nimc.html -- the Nim Compiler User Guide -- disruptek
18:49:52FromDiscord<Clyybber> nameisjohn: Theres nimble and nimph
18:49:56disruptek!repo nimph
18:49:57disbothttps://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future 🧚 15 49⭐ 2🍴 7& 1 more...
18:49:58FromDiscord<Clyybber> those are the big package managers
18:50:09FromDiscord<Clyybber> and nimph is developed by this fella ^^
18:50:15FromDiscord<Clyybber> disruptek
18:50:20narimirannameisjohn: start here: https://nim-lang.org/learn.html
18:50:26nameisjohnah, ok. I forsee saying the word "Nim" a lot in the future. Are we pronouncing it like "Tim"
18:50:47nameisjohnAwesome, thank you :)
18:50:48shashlickwith --gc:arc - `Error: cannot 'importc' variable at compile time; cstderr`
18:51:06FromDiscord<Clyybber> nameisjohn: I think so yeah
18:51:22FromDiscord<Clyybber> shashlick: Yap, but only on latest devel I think
18:51:35shashlickokay was just testing nimterop with --gc:arc
18:51:42shashlickbuilds but that error at runtim
18:51:47disruptek~manual is the Nim Manual is https://nim-lang.org/docs/manual.html
18:51:47disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html
18:52:13FromGitter<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:55FromGitter<Albus70007> fuck, i didnt mean to delete it :(
18:53:12FromDiscord<Clyybber> its not deleted for IRC and discord users 🙂
18:53:16nameisjohnThank 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:41FromGitter<Albus70007> @Clyybber then could you help me with that?
18:53:44FromDiscord<Clyybber> goodnight dovahkin
18:53:46*nameisjohn quit (Remote host closed the connection)
18:53:47FromGitter<Albus70007> i can address the code
18:54:03FromDiscord<Clyybber> Albus70007: Sure
18:54:23disruptekthat guy's name reminded me of a toilet.
18:54:47FromDiscord<Clyybber> I once knew a toilet, beautiful with long hair
18:55:23*seerix quit (Quit: Leaving)
18:58:12FromGitter<Albus70007> the echos inside the recievePacket() and send_inputs() are the ones that affect the number of iterations
18:58:20FromGitter<Albus70007> https://pastebin.com/2nc9Yq7W
18:58:42FromGitter<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:00FromDiscord<Clyybber> Albus70007: Do you get an exception or something? This sounds like an ordering problem
19:06:54FromGitter<Albus70007> nope, it just stops
19:08:09FromDiscord<Clyybber> Hmm, try inserting as much echos as possible so you can see exactly where it stops
19:08:30ZevvAlbus70007: running on linux?
19:08:51*NimBot joined #nim
19:09:22FromGitter<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:46FromGitter<Albus70007> @Zevv no, windows
19:09:54Zevvok
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:13FromGitter<Varriount> Grr, why doesn't posix have any concept of a process handle
19:29:43FromGitter<Varriount> PIDs are so prone to race days races
19:29:47FromGitter<Varriount> *data
19:40:51*Ven`` joined #nim
19:48:45*endragor joined #nim
19:48:53YardanicoI 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:09YardanicoIt's running v1.9.0 now, latest is 1.16.3
19:49:16lqdev[m]no
19:49:20Yardanico:D
19:49:41lqdev[m]I'm not okay that it dumps every line of a Discord paste as a separate IRC message
19:49:45lqdev[m]most people here aren't
19:50:03lqdev[m]no clue if they fixed it, but it's worth checking out
19:50:22Yardaniconeither am I :( I hope I won't have to change matterbridge config a lot
19:50:46lqdev[m]I'm praying you won't, man
19:50:51YardanicoI'll run it on test channel on the Discord and on #nim-web to test
19:52:40lqdev[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:27Yardanicodo we want edited messages from Discord to be sent to other services or not?
19:56:42Yardanicoor 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:46FromGitter<timotheecour> anyone familiar with pegs?
19:57:07disruptekonly npeg
19:57:09disruptek!repo npeg
19:57:10disbothttps://github.com/zevv/npeg -- 9npeg: 11PEGs for Nim, another take 15 76⭐ 4🍴
19:57:12lqdev[m]@timotheecour yeah, I'm one person
19:57:20*marmotini_ joined #nim
19:57:24lqdev[m]Yardanico: is there no setting to use s//?
19:57:29FromGitter<timotheecour> Yay! how do i match ‘begin anything end’ ?
19:57:31Yardanicolqdev[m]: no :(
19:57:55FromGitter<Albus70007> where should i download nim's latest version?
19:58:47lqdev[m]timotheecour: assuming you have a whitespace `ws -> ' '+`, you'd do `block -> 'begin' ws content ws 'end'`
19:59:07lqdev[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:52FromGitter<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:05FromGitter<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:52FromGitter<alehander92> Yardanico do they have diff mode
20:04:56Yardanicono :(
20:04:59FromGitter<alehander92> which just sends the changed part with some context
20:05:11FromGitter<alehander92> no problem, then i guess at least some hint that its an edit is good
20:05:30Yardanicowell, 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:25lqdev[m]@timotheecour are you using the stdlib pegs?
20:11:47FromGitter<timotheecour> yes
20:12:20lqdev[m]you'd do `"begin" ws body ws @"end"`
20:12:26lqdev[m]I think
20:12:29lqdev[m]give me a sec
20:13:34lqdev[m]yeah, should be it
20:14:07FromGitter<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:07Yardanicohttps://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:42disruptekseems like an improvement to me.
20:41:57Yardanicowell, that's using my own old irc-discord bridge in nim :)
20:42:16Yardanicoit'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:33Yardanicoand it's not yet open sourced xd
20:43:45FromDiscord<exelotl> omg that looks epic
20:44:47YardanicoAlso there's a discord feature so that we can display IRC names in discord like this: https://i.imgur.com/03HVAS7.png
20:46:06FromDiscord<exelotl> does it work by changing the name of the bot before each message? 🤔
20:46:50FromDiscord<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:27FromDiscord<exelotl> oh, cool
20:47:42FromDiscord<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:16FromDiscord<exelotl> I think most IRC servers put a limit on the number of users from a single IP address
20:49:38Yardanicooh, right
20:53:44*beshr quit (Read error: Connection reset by peer)
20:54:12YardanicoI'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:06Yardanicoso 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:22FromGitter<matrixbot> `grantmwilliams` How do you guys feela bout a Timsort implementation for Nim? I know python currently uses it as its Sort()
22:16:11Yardanico@grantmwilliams can you please write at least 1 message in https://gitter.im/nim-lang/twitch ? for testing my bridge bot :)
22:16:29Yardanicoand 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:52Yardanicoif 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:43FromGitter<matrixbot> `grantmwilliams` Yardanico (Gitter): can i log in without using gitlab/github/twitter?
22:31:07Yardanico@grantmwilliams ignore my message about twitch, but if you're asking about matrix-irc, yes
22:31:29YardanicoJust follow that github link I gave and you'll be able to have a much more "native" experience with IRC bridge :P
22:31:47FromGitter<matrixbot> `grantmwilliams` will do
22:33:05FromGitter<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:07disbotConverters found after a match not typechecked ; snippet at 12https://play.nim-lang.org/#ix=26KZ
22:33:11unclechuhi, 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:17Yardaniconimble.directory
22:33:26Yardanicohttps://nimble.directory
22:34:13unclechuYardanico: thanks, but why not add it to the https://nim-lang.org/ website menu?
22:34:22Yardanicowell, 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:11deependis there an easy way to print numbers with commas? e.g. 1234567 -> 1,234,567 didn't seem to find it in strformat