<< 24-09-2020 >>

00:11:08*D_ quit (Ping timeout: 260 seconds)
00:14:27*eburk quit (Quit: WeeChat 2.9)
00:31:00*abm quit (Quit: Leaving)
00:35:58FromDiscord<19> is this how i bind this c struct to nim? https://pastebin.com/YCxenvT0
00:41:52FromDiscord<shashlick> Just run c2nim on it and see the output
00:58:58FromDiscord<Elegant Beef> Is there a tool like c2nim for js?
01:04:09FromDiscord<19> @shashlick is it supposed to give usable code instantly?
01:04:36FromDiscord<19> it needs some tweaking right? i am using it in fact to generate
01:09:38*CcxWrk quit (Remote host closed the connection)
01:09:53*CcxWrk joined #nim
01:10:14*my_dude quit (Quit: ZZZzzz…)
01:15:45*Tanger joined #nim
01:21:47*Tanger is now known as Tanker
01:27:47*apahl quit (Ping timeout: 240 seconds)
01:29:59*apahl joined #nim
01:36:51*Zectbumo quit (Remote host closed the connection)
01:45:50FromDiscord<shashlick> @19 sure it works great for simple stuff like your snippet
01:46:12FromDiscord<shashlick> @Elegant Beef not to my knowledge
02:02:36*matlock joined #nim
02:32:01*Zectbumo joined #nim
02:35:51*bozaloshtsh_ quit (Quit: ZNC 1.7.5 - https://znc.in)
02:36:03*bozaloshtsh joined #nim
02:36:03*bozaloshtsh quit (Changing host)
02:36:03*bozaloshtsh joined #nim
02:37:11*muffindrake quit (Ping timeout: 272 seconds)
02:38:58*muffindrake joined #nim
02:57:22*sagax quit (Quit: Konversation terminated!)
03:35:31*rockcavera quit (Remote host closed the connection)
03:48:18*arecacea1 quit (Remote host closed the connection)
03:49:10*arecacea1 joined #nim
04:02:48*waleee-cl quit (Quit: Connection closed for inactivity)
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:33*supakeen joined #nim
04:06:56FromDiscord<juan_carlos> Ive seen a "ts2nim" on github I think...
04:09:09FromDiscord<Elegant Beef> Yea i've seen it aswell, i was curious if there was something to autogenerate bindings
04:10:32*thomasross quit (Ping timeout: 256 seconds)
04:12:01*gangstacat quit (Quit: Ĝis!)
04:12:55*kinkinkijkin joined #nim
04:22:43*vicfred quit (Quit: Leaving)
04:24:22*vicfred joined #nim
04:26:12*gangstacat joined #nim
04:31:01*sagax joined #nim
04:31:17FromDiscord<flywind> It is also in vscode extension.
04:31:48*shad0w_ joined #nim
04:33:54FromDiscord<flywind> If you search `nim` in vscode-extension, you can find many Nim extensions.
04:35:40FromDiscord<JSGRANT> @juan_carlos Seems somewhat active https://github.com/bung87/ts2nim
04:37:33*gour joined #nim
04:41:34*my_dude joined #nim
04:50:38FromDiscord<Avatarfighter> The rust backend is going to be so good guys amirite
04:51:20FromDiscord<Rika> ?
04:51:30FromDiscord<Avatarfighter> what rika
04:51:42FromDiscord<Avatarfighter> you havent heard of this totally real and upcoming backend!?
04:51:46FromDiscord<Rika> whos making a rust backend
04:51:56FromDiscord<Avatarfighter> idk
04:52:05FromDiscord<Avatarfighter> but since ur offering as of now when is ETA 😛
04:52:42FromDiscord<Rika> `since ur offering as of now when is ETA`↵this is shortcircuiting my english processing
04:52:51FromDiscord<Rika> what does this mean
04:53:09FromDiscord<Rika> "since you're offering, as of now, when is ETA"
04:53:09FromDiscord<Rika> okay
04:53:10FromDiscord<Rika> got it
04:53:21FromDiscord<Avatarfighter> Sorry about that I should've included proper grammar
04:54:47*solitudesf joined #nim
04:58:14FromDiscord<JSGRANT> Think pas2nim is pretty much dead sadly; Was toying around with the idea of trying to port some of Castle as learning-project for game-engine architecture
05:00:23FromDiscord<JSGRANT> Find the idea of C2Nim prety funny, step-wise. Going C -> Nim -> C lol
05:00:32FromDiscord<Rika> lol
05:01:09FromDiscord<JSGRANT> I get the intent is for the actual 'interaction level' is to be in Nim (moved from C) but the actual steps is a bit quirky / cute.
05:09:28*narimiran joined #nim
06:01:36*kenran joined #nim
06:04:42*my_dude quit (Quit: ZZZzzz…)
06:09:53*my_dude joined #nim
06:12:55*DecentDev joined #nim
06:19:25*NimBot joined #nim
06:20:28*bung joined #nim
06:20:33*mmohammadi9812 joined #nim
06:24:45*DecentDev quit (Quit: DecentDev)
06:25:56*mmohammadi9812 quit (Ping timeout: 272 seconds)
06:27:23*shad0w_ quit (Ping timeout: 240 seconds)
06:30:32*my_dude quit (Ping timeout: 260 seconds)
06:31:00*Cthalupa quit (Ping timeout: 272 seconds)
06:31:45*Cthalupa joined #nim
06:34:29*PMunch joined #nim
06:53:43FromDiscord<flywind> Can I make docs search work?
06:53:51FromDiscord<flywind> https://planety.github.io/prologue/coreapi/prologue/core/application.html
06:55:02*shad0w_ joined #nim
06:55:50*DecentDev joined #nim
06:55:57FromDiscord<flywind> Is there easy way to generate/host multiple versions of API docs?
06:56:46FromDiscord<hobbledehoy> to make the search work you need to build the index html file from the idx files
06:57:11FromDiscord<hobbledehoy> https://nim-lang.org/docs/docgen.html↵it is shown in the second code block here
07:01:33FromDiscord<flywind> Thanks, But I don't know which code block?
07:02:16FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2yzp
07:02:32FromDiscord<flywind> This is my nimble task to generate docs.
07:02:38FromDiscord<hobbledehoy> that should work
07:03:18FromDiscord<flywind> https://media.discordapp.net/attachments/371759389889003532/758584325297143818/unknown.png
07:03:24FromDiscord<hobbledehoy> if you open up the requests tab in developers tool and try to search on your docs page↵you should see theindex.html be loaded in a xhr request
07:04:02FromDiscord<hobbledehoy> yup 404
07:04:43FromDiscord<hobbledehoy> it is trying to load theindex.html relative to the page↵I tested https://planety.github.io/prologue/coreapi/prologue/core/application.html↵and this was the 404↵https://planety.github.io/prologue/coreapi/prologue/core/theindex.html
07:04:56*Zectbumo_ joined #nim
07:05:08*LuckyMan joined #nim
07:05:50*Zectbumo_ quit (Remote host closed the connection)
07:05:52FromDiscord<flywind> Maybe I generate theindex docs to wrong directories, I will check it. Thanks!
07:06:18FromDiscord<hobbledehoy> I think this might be an issue with the dochack.js or whatever does the searching
07:06:22*LuckyMan quit (Quit: Leaving)
07:06:42FromDiscord<alehander42> hey!
07:09:16FromDiscord<hobbledehoy> wait, wouldn't a 404 would still occur if it loaded at the root wouldn't it?↵cause it is located at https://planety.github.io/prologue/coreapi/theindex.html
07:09:28PMunch@flywind, you can use jsondoc to generate the docs in JSON format
07:09:44PMunchThat should make it easier to ingest into a database and serve it how you like it
07:09:51PMunchIf that is what you're trying to do
07:14:18FromDiscord<flywind> I just want to use the basic function of docs 🙂
07:15:40*shad0w_ quit (Remote host closed the connection)
07:15:48FromDiscord<hobbledehoy> now this is a terrible idea but it might be worth a shot↵you could read the dochack.js file, a replace `theindex.html` which `https://planety.github.io/prologue/coreapi/theindex.html`, then write the updated file back
07:15:56FromDiscord<hobbledehoy> (edit) 'which `https://planety.github.io/prologue/coreapi/theindex.html`,' => 'with`https://planety.github.io/prologue/coreapi/theindex.html`,'
07:16:51FromDiscord<hobbledehoy> (edit) removed 'a'
07:17:47FromDiscord<flywind> Thanks, I will check it.
07:19:24*nyd joined #nim
07:24:04*shad0w_ joined #nim
07:43:09*vicfred quit (Remote host closed the connection)
07:43:30*vicfred joined #nim
07:44:24*DecentDev quit (Quit: DecentDev)
07:45:14*hobbledehoy joined #nim
08:02:05*shad0w_ quit (Ping timeout: 240 seconds)
08:05:52FromDiscord<flywind> Fortunately, I find `dochack.js` will be only built once, it is safe to hack it.
08:06:11FromDiscord<flywind> return absolute path to dochack.js, rebuilding if it doesn't exist or if↵ `forceRebuild`.
08:06:45*shad0w_ joined #nim
08:09:09*shad0w_ quit (Remote host closed the connection)
08:09:31*shad0w_ joined #nim
08:10:37*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:12:08*krux02 joined #nim
08:24:46FromDiscord<flywind> wait, it still rebuilds dohack.js
08:42:09*abm joined #nim
08:43:03*hobbledehoy quit (Quit: hobbledehoy)
08:44:01Araqbenchmark time
08:44:28AraqmarkAndSweep: Requests/sec: 518.46
08:44:37AraqORC: Requests/sec: 13799.44
08:45:04Araqmy benchmark is carefully crafted to make a point :P
08:45:23FromDiscord<Vindaar> Ehm, that is ridiculous in a good way, haha. well done 🙂
08:45:58Araq Latency 764.22us 677.35us
08:46:11Araq(Orc)
08:46:12Araqvs
08:46:13FromDiscord<Rika> looks insane
08:46:16Araq Latency 60.14ms 72.18ms (M&S)
08:46:27FromDiscord<Rika> whats this benchmarking exactly
08:46:30FromDiscord<Rika> like
08:46:31FromDiscord<Rika> rather
08:46:39FromDiscord<Rika> how is the benchmark done or smth
08:47:25Araqhttps://gist.github.com/Araq/7c17558d216488ad45fd6190507a9ad4
08:48:00Araqasync hello world when you also have a liveset of about 130MB
08:49:51FromDiscord<flywind> does orc work with threads?
08:50:02FromDiscord<flywind> (edit) 'threads?' => 'threads well?'
08:50:47Araqsee my RFC for its limitations, but it does work better than the old GCs
08:50:54Araqwith threads
08:53:47*kenran quit (Ping timeout: 260 seconds)
08:57:02FromDiscord<flywind> I can't compile jester with `orc`.
08:57:12Araqwhy not?
08:57:59FromDiscord<flywind> (edit) 'compile' => 'use' | 'usejester with `orc`. ... ' => 'usejester with `orc`.It causes SIGSEGV: Illegal storage access..'
08:58:05*superbia1 joined #nim
08:59:57Araqah so what, use the stdlib
09:00:18Araqor give me a tiny program demonstrating the problem
09:01:09FromDiscord<flywind> https://github.com/planety/prologue/blob/devel/tests/test_readme/b_jester.nim
09:01:22FromDiscord<flywind> Just a simple program.
09:01:25*superbia quit (Ping timeout: 264 seconds)
09:01:27Araqthanks
09:01:40Araqwhat version of jester?
09:01:54FromDiscord<flywind> jester@#head
09:03:25FromDiscord<flywind> Nim Compiler Version 1.3.7 [Linux: amd64]↵Compiled at 2020-09-21
09:03:55Araqyour Nim is 3 days old! you're living in the past!
09:04:00FromDiscord<alehander42> 😄 😄
09:04:23FromDiscord<flywind> Ok, I will update Nim compiler and try again.
09:04:25FromDiscord<Recruit_main707> yikes, i am on 1.3.5
09:04:28*Trustable joined #nim
09:06:11Araqflywind: no need, we didn't change orc in these three days
09:06:22FromDiscord<flywind> lol
09:06:48Araqbut I'm fixing my cursor inference... so you can retry tomorrow
09:07:43FromDiscord<flywind> all right
09:10:05*Tanker quit (Remote host closed the connection)
09:10:57FromDiscord<ShalokShalom> Orc is the new garbage collector?
09:12:35Araqyeah
09:12:50FromDiscord<ShalokShalom> Thanks a lot
09:14:32FromDiscord<flywind> more info
09:14:33FromDiscord<flywind> https://play.nim-lang.org/#ix=2yA1
09:14:44FromDiscord<flywind> It crashed when I benchmark jester with orc.
09:16:51FromDiscord<flywind> It's ok when I use default gc or make threads off.
09:17:58FromDiscord<hobbledehoy> import segfaults↵might give more info
09:18:27Araqyou can also run it under valgrind with -d:useMalloc -g
09:19:40FromDiscord<- D I S A S T E R> hello
09:20:27FromDiscord<- D I S A S T E R> how do i post a multipart data via https and download the file i recive then?
09:21:10FromDiscord<flywind> with `-d:useMalloc -g` and it works now.
09:21:43Araqhah, I'm sure the bug is real
09:22:47FromDiscord<- D I S A S T E R> sent a code paste, see https://play.nim-lang.org/#ix=2yA3
09:23:10FromDiscord<- D I S A S T E R> i am new to nim lel
09:26:35FromDiscord<- D I S A S T E R> here the server code i want to write that client for
09:26:38FromDiscord<- D I S A S T E R> https://git.ucode.space/Phil/youtubedl-webui/src/branch/master/main.py
09:26:51Oddmongermaybe starting with simpler things…
09:27:16FromDiscord<- D I S A S T E R> not an option
09:27:31FromDiscord<lqdev> does {.experimental.} only enable experimental features for a specific scope, eg. in a proc?
09:27:42Araqit's module-wise
09:27:48FromDiscord<lqdev> ok
09:28:29FromDiscord<- D I S A S T E R> i just want to pass a youtube url and get the file
09:28:42FromDiscord<- D I S A S T E R> "should" be simple
09:29:00Araqsure, everything should be simple, especially programming
09:29:05Oddmongeryou cannot get youtube videos that simple, anyway
09:29:07FromDiscord<lqdev> why not just use youtube-dl?
09:29:11Oddmongeruse a dedicated tool
09:30:03FromDiscord<- D I S A S T E R> ?
09:30:19Oddmongerlike youtube-dl, as lqdev suggests
09:30:33FromDiscord<- D I S A S T E R> dude read what i wrote
09:30:57FromDiscord<- D I S A S T E R> i want to write a client for our downloader
09:31:11FromDiscord<hobbledehoy> yeah↵`youtube-dl https://www.youtube.com/watch?v=dQw4w9WgXcQ`
09:31:15FromDiscord<- D I S A S T E R> (((that is using ytdl serverside)))
09:31:22FromDiscord<Rika> yall not listening to the poor lad
09:31:30FromDiscord<hobbledehoy> why make a downloader that downloads from a downloader?
09:31:46Araqplease change your nick, helps to take you more seriously
09:31:47FromDiscord<- D I S A S T E R> because ffmpeg
09:32:11OddmongerAraq, i think the nick is well chosen
09:32:12FromDiscord<alehander42> but what do you want to do with the video
09:32:16AraqP L E A S E C H A N G E Y O U R N I C K
09:32:24FromDiscord<Rika> i dont think the nick is an issue
09:32:28FromDiscord<alehander42> Araq is woke now
09:32:35FromDiscord<Rika> he angery
09:32:44Oddmongernormal state
09:32:48FromDiscord<hobbledehoy> ok I see now↵you are doing extra processing for like mp3 and stuff
09:32:52Araqit's annoying to read
09:32:59*hobbledehoy joined #nim
09:33:08bungthe http response has bodyStream property you can save that stream to file
09:34:13FromDiscord<hobbledehoy> https://nim-lang.org/docs/streams.html↵relevant documentation to help
09:36:55bungthe nick name problem is it wasting viewport, and take much more attension that real content
09:37:34FromDiscord<ucodeLukas> well It was my nick for 2 years but well
09:37:38bungas sent from discord, more worse
09:38:08Araqthank you
09:39:05FromDiscord<ucodeLukas> sure mr woke
09:40:36FromDiscord<ucodeLukas> how do i get the string/stream from the response https://media.discordapp.net/attachments/371759389889003532/758623911175782410/Bildschirmfoto_von_2020-09-24_11-39-42.png
09:40:38Araq"woke" has nothing to do with it, the typography was unpleasant
09:41:17Araqcould have named yourself "Disaster" and I wouldn't have said anything
09:42:01FromDiscord<ache of head> https://tenor.com/view/jon-stewart-eat-eating-popcorn-watching-gif-5102037
09:42:05FromDiscord<hobbledehoy> `postContent` just returns a string↵`post` returns a Response which has a `bodyStream`
09:43:19*krux02_ joined #nim
09:43:20*hobbledehoy quit (Quit: hobbledehoy)
09:43:25FromDiscord<ucodeLukas> oh i see
09:43:39*hobbledehoy joined #nim
09:45:21*krux02__ joined #nim
09:46:15FromDiscord<ucodeLukas> and how do i get the bodyStream from the Response type?
09:46:17*krux02 quit (Ping timeout: 260 seconds)
09:48:02*krux02_ quit (Ping timeout: 260 seconds)
09:48:16FromDiscord<hobbledehoy> ```nim↵let response = client.post("url". , multipart=data)↵let body = response.bodyStream↵```
09:49:16FromDiscord<ucodeLukas> ah so a client.post(x,y).bodyStream does it ? lemme try
09:50:36*krux02__ quit (Ping timeout: 244 seconds)
09:51:20bungah? could be dot chained ?
09:52:09*hobbledehoy quit (Quit: hobbledehoy)
09:53:39bungI dont think so, .post returns Promise
09:53:47*krux02 joined #nim
09:56:32FromDiscord<ucodeLukas> indeed tried it hah
09:56:33FromDiscord<hobbledehoy> ucodeLukas is using the sync httpclient
09:57:13FromDiscord<hobbledehoy> oh it didn't work? never mind then
09:59:13bungI only know js can have Promise.then().then()
10:02:53FromDiscord<Rika> you can do `(await someFut).field`
10:03:15FromDiscord<Rika> depends on the programmer if they find it nice to look at or not
10:05:21FromDiscord<lqdev> or `await(someFut).field`
10:14:05*superbia1 quit (Quit: WeeChat 2.9)
10:30:42*arecacea1 quit (Read error: Connection reset by peer)
10:31:15*arecacea1 joined #nim
10:31:44FromDiscord<ucodeLukas> ok thanks so far helped me much
10:32:08FromDiscord<ucodeLukas> but how do i get the stream to save to a file?
10:32:40FromDiscord<ucodeLukas> the docs dont get me far
10:36:11FromDiscord<lqdev> use a FileStream
10:36:29FromDiscord<lqdev> https://nim-lang.org/docs/streams.html#openFileStream%2Cstring%2CFileMode%2Cint
10:38:35FromDiscord<exelotl> I'm guessing you would do like `while not bodyStream.atEnd: fileStream.writeStr(bodyStream.readStr())`
10:40:17FromDiscord<exelotl> ok I'm a little wrong there: it's `write` not `writeStr`, and `readStr` should take a max length
10:40:22*Zectbumo quit (Remote host closed the connection)
10:44:06FromDiscord<ucodeLukas> i dont get it
10:45:11FromDiscord<alehander42> you open a file stream to the file you need
10:45:25FromDiscord<alehander42> or create a new file with a certain name
10:45:28FromDiscord<alehander42> and open a stream to it
10:45:42FromDiscord<ucodeLukas> sent a code paste, see https://play.nim-lang.org/#ix=2yAp
10:45:43FromDiscord<alehander42> and then you start writing to it in a loop
10:46:00FromDiscord<alehander42> ok man: obviously you need to provide a path to the file stream
10:46:25FromDiscord<ucodeLukas> i know but where
10:46:43FromDiscord<alehander42> please read the examples in the docs
10:46:51FromDiscord<alehander42> they show very well what to do
10:47:36FromDiscord<alehander42> https://nim-lang.org/docs/streams.html#basic-usage-filestream-example
10:47:45FromDiscord<alehander42> browse a bit for the different methods
10:48:45FromDiscord<alehander42> newFileStream takes a path 🙂
10:48:57FromDiscord<ucodeLukas> ok and still got the same error
10:49:20FromDiscord<alehander42> what is the error telling you
10:49:27FromDiscord<ucodeLukas> sent a code paste, see https://play.nim-lang.org/#ix=2yAq
10:49:32*kenran joined #nim
10:49:54FromDiscord<ucodeLukas> missing parameter "result"
10:50:05FromDiscord<ucodeLukas> what is "result"?
10:50:34FromDiscord<alehander42> ah i see
10:50:43FromDiscord<alehander42> well ok, look at the signature
10:50:48FromDiscord<alehander42> and the docs of the read function
10:50:56FromDiscord<alehander42> that's how you debug errors
10:51:35FromDiscord<alehander42> the read function stores its result in a second variable (to reuse a buffer ? )
10:51:52FromDiscord<alehander42> so you'd need to add a `var chunk`
10:52:11FromDiscord<alehander42> `var chunk: string`
10:53:21FromDiscord<ucodeLukas> so i have to count the chunks and do a for loop on it?
10:53:49FromDiscord<alehander42> no
10:54:08FromDiscord<alehander42> you do a while loop
10:54:12FromDiscord<alehander42> but you need two steps inside
10:54:19FromDiscord<alehander42> `stream.read(chunk)`
10:54:25FromDiscord<alehander42> and then `file.write(chunk)`
10:55:08*kenran quit (Ping timeout: 260 seconds)
10:56:47FromDiscord<alehander42> ugh this video is horrible
10:59:55federico3https://facebook.github.io/zstd/
11:08:17Araqfederico3, nice :-)
11:08:27Araqexactly what we need for IC
11:08:49FromDiscord<dom96> pleasently surprised to see a nim library listed 😄
11:09:15*opal quit (Remote host closed the connection)
11:10:23FromDiscord<dom96> it looks like a high quality wrapper too
11:10:31*opal joined #nim
11:12:22FromDiscord<ShalokShalom> https://github.com/wltsmrz/nim_zstd
11:15:37*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
11:19:19*ehmry joined #nim
11:28:20Araqbah a wrapper. I need native Nim code
11:49:32FromDiscord<alehander42> what is the opposite of dependency
11:49:37FromDiscord<alehander42> is dependant the right word
11:50:03FromDiscord<alehander42> (e.g. a <- b : b is a dependency for a, but a is ? for b)
11:50:20FromDiscord<alehander42> dependent is the relationship
11:50:25FromDiscord<alehander42> i was looking for a nou
11:50:27FromDiscord<alehander42> (edit) 'nou' => 'noun'
11:51:55*rockcavera joined #nim
11:51:59narimirandependee?
11:52:53narimiranhttps://english.stackexchange.com/questions/25575/what-is-the-correct-word-for-dependee
11:54:05narimiranhttps://en.wiktionary.org/wiki/dependee#English
11:54:07FromDiscord<alehander42> https://english.stackexchange.com/questions/25575/what-is-the-correct-word-for-dependee
11:54:08FromDiscord<alehander42> haha same
11:54:31FromDiscord<ShalokShalom> dependee sounds cute 🥰
11:54:34FromDiscord<shirleyquirk> Checked usage in pacman. You can see a list of "dependencies" or what the package is "required by". Alternatively you search for "reverse dependencies"
11:55:33FromDiscord<alehander42> it looks confusing tho
11:55:50FromDiscord<alehander42> the dependee thing because .. we need a dictionary to figure it out 😄
11:56:10FromDiscord<alehander42> requiredBy sounds a bit more clear but not for my usage
11:56:34FromDiscord<shirleyquirk> It's all horrible. dependee is a constructed word. Can we steal a word from German or something?
11:56:53FromDiscord<alehander42> maybe i need to use just ``dependent`` or ``derived``
11:57:43FromDiscord<alehander42> i want to name the relationship between X and stuff based on X e.g. X -> [X.field, X()]
11:58:30FromDiscord<alehander42> in the manual/code
11:59:59FromDiscord<Clyybber> german doesn't have a better word either: Abhaengiger
12:00:02FromDiscord<ShalokShalom> #discoveryoftheday
12:00:05FromDiscord<ShalokShalom> https://amulet.works/
12:00:15FromDiscord<ShalokShalom> @Clyybber Oh, you are German?
12:00:19FromDiscord<Clyybber> Yeah
12:00:29FromDiscord<ShalokShalom> Austria 🇦🇹 here
12:00:33FromDiscord<Clyybber> nice
12:00:55FromDiscord<ShalokShalom> Soon US 🇺🇸
12:02:26FromDiscord<Clyybber> freiwillig?
12:02:57FromDiscord<alehander42> Bulgaria 🇧🇬
12:03:49Araqwhat's wrong with Abhängiger?
12:04:02FromDiscord<ShalokShalom> @Clyybber Frau
12:04:03FromDiscord<Clyybber> its no better than dependee
12:04:18FromDiscord<ShalokShalom> I would rather stay here 😱
12:04:29FromDiscord<ShalokShalom> And I see it as challenge and opportunity
12:04:48FromDiscord<alehander42> there should be a language term
12:04:56FromDiscord<alehander42> about it, i am going to aks
12:04:58FromDiscord<alehander42> ask around
12:05:56FromDiscord<ShalokShalom> @Clyybber Did you get documentation wise something along, like to discussed size of the gaps?
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:08FromDiscord<ShalokShalom> (edit) 'to' => 'the'
12:06:13FromDiscord<shirleyquirk> The problem is the English words are 'dependent' and 'dependency'
12:06:24FromDiscord<alehander42> but i think they are not great for this particular thing
12:06:33FromDiscord<Clyybber> @ShalokShalom I'm working on other things ATM
12:06:38FromDiscord<shirleyquirk> But in software the meaning is already reversed
12:06:44*supakeen joined #nim
12:06:55FromDiscord<Clyybber> @ShalokShalom Feel free to have a try at it :D
12:07:04FromDiscord<alehander42> maybe its more prefix and thigns with the same prefix
12:07:10FromDiscord<alehander42> prefix-siblings?
12:07:14FromDiscord<alehander42> prefix-children?
12:07:27FromDiscord<ShalokShalom> I would rather change the whole thing...
12:07:29FromDiscord<Clyybber> @ShalokShalom I also don't know too much about webdev, so it was all just ideas basically
12:07:36FromDiscord<ShalokShalom> And especially an index.
12:08:27FromDiscord<alehander42> uh?
12:08:29FromDiscord<alehander42> (edit) 'uh?' => 'eh?'
12:09:04FromDiscord<alehander42> ah sorry, probably other topic
12:11:37FromDiscord<ShalokShalom> @alehander42 Yes, I am still fighting for a cleaner documentation
12:11:59FromDiscord<ShalokShalom> Especially an index, that sums it all up
12:12:26FromDiscord<ShalokShalom> Now, it's pretty scattered across different places
12:24:59*shad0w_ quit (Quit: shad0w_)
12:33:04*nyd quit (Quit: nyd)
12:33:38Araqwell Nim is a programming language. Maybe it's documented in different places like C++, Python, ... is.
12:35:28FromDiscord<mratsim> https://nim-lang.org/docs/theindex.html
12:35:43FromDiscord<mratsim> though it would help if goole returned that more often
12:35:59FromDiscord<ShalokShalom> No, I mean spread across the own homepage and not sorted very well
12:36:12FromDiscord<ShalokShalom> I think the documentation harder than the language.
12:36:38Araqhttps://nim-lang.org/learn.html
12:36:39FromDiscord<ShalokShalom> It gives me more headache and more reason to quit then the language, the community or any other aspect of Nim.
12:36:45Araqhttps://nim-lang.org/documentation.html
12:36:47FromDiscord<ShalokShalom> Yeah, yeah....
12:37:08Araqmake a productive suggestion
12:37:09*kenran joined #nim
12:37:22FromDiscord<shirleyquirk> The search box is pretty great imho
12:38:02FromDiscord<ShalokShalom> @Araq[IRC]#0000 I did speak about that with @Clyybber
12:38:21FromDiscord<ShalokShalom> Yesterday
12:38:36Araqalright
12:38:42FromDiscord<ShalokShalom> Thanks
12:39:30Araqclyybber: any progress on https://github.com/nim-lang/Nim/issues/14844 ?
12:39:31disbotIllegal symbol reuse in template with method call syntax ; snippet at 12https://play.nim-lang.org/#ix=2qtK
12:40:42*pangey quit (Ping timeout: 260 seconds)
12:41:48FromDiscord<ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/758669512965881916/IMG_20200924_144133.jpg
12:42:26*pangey joined #nim
12:42:52FromDiscord<Clyybber> Araq: I just thought about picking it up again
12:42:54FromDiscord<ShalokShalom> All content is in this index. It is not spread across 49 million pages. It is all *accessible* from here and I can use one search function, that doesn't call thousands of unrelated API docs and stuff like that.
12:43:14FromDiscord<alehander42> ehh, this is only the book
12:43:20FromDiscord<alehander42> the reference is separate
12:43:49FromDiscord<ShalokShalom> It is sorted, by categories and I can see immediately all the content
12:44:04FromDiscord<alehander42> this is very separate https://doc.rust-lang.org/std/
12:44:07Araqhow do you know if you see "all" the content
12:44:14FromDiscord<ShalokShalom> No need to exit, look across different tabs, reading, clicking, exiting again.
12:44:14Araqyou can never know that. ;-)
12:44:19FromDiscord<alehander42> so it's not "all the content"
12:44:24FromDiscord<ShalokShalom> @Araq[IRC]#0000 I scroll
12:44:31FromDiscord<ShalokShalom> All the content I am interested in
12:44:37FromDiscord<ShalokShalom> It is a complete package
12:45:00FromDiscord<ShalokShalom> All modern languages do it like that, tons of projects and frameworks.
12:45:04FromDiscord<Rika> again, that is the book, not the reference
12:45:16FromDiscord<alehander42> ok, but this is https://nim-lang.org/docs/manual.html
12:45:19FromDiscord<ShalokShalom> @Rika Where is the Nim book?
12:45:25FromDiscord<alehander42> ^
12:45:27FromDiscord<lqdev> @ShalokShalom the nim book doesn't exist
12:45:28FromDiscord<alehander42> literally
12:45:33FromDiscord<lqdev> there's the manual
12:45:33FromDiscord<alehander42> is a similar format
12:45:45FromDiscord<alehander42> i agree: maybe not as nice stylistically
12:45:51FromDiscord<alehander42> but it describes most features
12:45:53FromDiscord<ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/758670542994931722/Screenshot_2020-09-24-14-45-47-45_3aea4af51f236e4932235fdada7d1643.jpg
12:45:57FromDiscord<alehander42> has a content section in left
12:45:58FromDiscord<lqdev> and can be opened without CSS
12:46:00FromDiscord<ShalokShalom> Please show me the index
12:46:00FromDiscord<lqdev> and doesn't have any bloat
12:46:13FromDiscord<ShalokShalom> @alehander42 I cant see it
12:46:16FromDiscord<alehander42> it's in the left, but hm
12:46:18FromDiscord<alehander42> in the browser
12:46:19FromDiscord<lqdev> @ShalokShalom yeah the index doesn't appear on mobile for some reason
12:46:26FromDiscord<Rika> https://media.discordapp.net/attachments/371759389889003532/758670682296549396/unknown.png
12:46:29FromDiscord<lqdev> i noticed that too
12:46:36FromDiscord<lqdev> but how often do you program on mobile anyways
12:46:44Araqprobably a feature of our CSS
12:46:44FromDiscord<Rika> thats not a valid argument
12:46:51FromDiscord<Rika> a lot of people open docs on phone
12:46:56FromDiscord<exelotl> I look at the nim docs often on mobile and yes this is a real problem
12:47:04narimiranPRs welcome
12:47:09FromDiscord<lqdev> @Rika i'm not using this as an argument, just pointing out facts
12:47:14FromDiscord<Rika> okay
12:47:14FromDiscord<ShalokShalom> Ok, then we have some point.
12:47:15FromDiscord<shirleyquirk> Yes, for that search bar available on mobile would be great
12:47:15FromDiscord<alehander42> ok this is a valid thing
12:47:19narimiranhacktoberfest starts soon ;)
12:47:43Araqit's probably a concious design decision of the one who updated the CSS to do just that
12:47:56Araqbut surely we can change it.
12:48:16narimiranif index was there at the top, we would hear "i don't want to scroll through whole index to get to the content i'm interested in"
12:48:29FromDiscord<alehander42> how does it look in rust book on mobile?
12:48:33FromDiscord<alehander42> i forgot how to check on firefox
12:48:51FromDiscord<exelotl> of course, but it should be possible to reveal it on mobile
12:48:52FromDiscord<ShalokShalom> And I would still argue, that a combined Learn and Documentation section makes sense. Just lower the font size, gap size and order it differently.
12:49:05FromDiscord<shirleyquirk> cppreference.com is defacto c++ reference and that's not single page
12:49:12FromDiscord<alehander42> but the manual is literally the equivalent of rust book
12:49:13FromDiscord<alehander42> imho
12:49:16FromDiscord<ShalokShalom> > how does it look in rust book on mobile?↵@alehander42 I send that screenshot above from mobile
12:49:39FromDiscord<alehander42> ah i see, thanks
12:49:51FromDiscord<ShalokShalom> The search in the Nim version is looking for more than just the manual
12:50:16FromDiscord<ShalokShalom> Which is highly confusing, when you are looking in the manual, and then you get API design and whatnot.
12:50:27FromDiscord<alehander42> yeah this is a bit strange i admit
12:50:33FromDiscord<alehander42> i usually use ctrl+f
12:50:37FromDiscord<alehander42> but no ctrl+f on mobile probably
12:50:44FromDiscord<ShalokShalom> Those are all little issues, who pile up
12:50:53FromDiscord<alehander42> i just open it in my editor 😄 😄
12:50:59FromDiscord<ShalokShalom> There is a find in my browser.
12:51:32FromDiscord<alehander42> ok, this is much more useful now: so a way to access index on mobile
12:51:48FromDiscord<alehander42> and seach only in manual
12:51:51FromDiscord<alehander42> two concrete issues
12:52:10FromDiscord<alehander42> that's why concrete feedback is important
12:52:57FromDiscord<ShalokShalom> @alehander42 Yeah, the thing is that I also prefer the look and feel of something like Gitbook, readthedocs and so on and this is why I wanted to port over all
12:53:13FromDiscord<ShalokShalom> I saw 7 tiny issues and thought I solve them all in one swap
12:53:18FromDiscord<ShalokShalom> And to standardize
12:53:19FromDiscord<Clyybber> Araq: https://github.com/nim-lang/Nim/issues/15324 has been fixed, cooldomes project compiles
12:53:21disbotSymbols lookup regression ; snippet at 12https://play.nim-lang.org/#ix=2yB1
12:53:43FromDiscord<alehander42> @ShalokShalom i see
12:55:52FromDiscord<ShalokShalom> Araq: Did you really name it according to a King? Since there is Nimrod, a computer that beat a human in the Nim game, and it was demonstrated first in Germany, the country of your origin https://media.discordapp.net/attachments/371759389889003532/758673051856011264/Screenshot_2020-09-24-14-55-25-62_3aea4af51f236e4932235fdada7d1643.jpg
12:56:19FromDiscord<ShalokShalom> So I was very surprised to see, that you choose it for the seemingly unrelated King
12:57:30FromDiscord<ShalokShalom> Looks like Python, who was initially named according to the comedians and then swifted in its meaning over time.
12:57:33FromDiscord<shirleyquirk> Surely both named for the king
12:57:43FromDiscord<ShalokShalom> Yeah, thats true.
12:59:24FromDiscord<ShalokShalom> I assumed that the fact that an early computer beat a human in a game, is an early reminiscence of DeepBlue and Co, and so a fitting name. I found it actually very clever, until I discovered its not the cause for the naming 😅
12:59:57FromDiscord<alehander42> sadly not
13:00:47FromDiscord<shirleyquirk> https://unrememberedhistory.com/2017/01/09/the-nimrod-effect-how-a-cartoon-bunny-changed-the-meaning-of-a-word-forever/
13:02:39FromDiscord<alehander42> i am not sure if it was really positive before as well
13:04:38FromDiscord<shirleyquirk> Shackleton wouldn't named his boat Nimrod if it wasn't positive I reckon
13:14:04FromDiscord<Clyybber> @alehander42 let me guess, you don't like prometheus as well? :p
13:17:45FromDiscord<alehander42> meh
13:17:49FromDiscord<alehander42> i dislike it obviously
13:17:58FromDiscord<alehander42> but i don't really use it 😄
13:18:05FromDiscord<Clyybber> oh, I meant the fiture
13:18:10FromDiscord<Clyybber> *character
13:18:15FromDiscord<Clyybber> not the program :P
13:18:27FromDiscord<alehander42> the greek character?
13:18:53FromDiscord<Clyybber> yeah, or as depicted in goethes poem
13:19:16FromDiscord<alehander42> i haven't read the goethe's poem
13:19:23FromDiscord<alehander42> i dislike greek mythology as a whole , yes
13:19:28FromDiscord<alehander42> him included
13:20:09FromDiscord<Clyybber> he is rebellious against god, is what I'm getting at
13:20:33FromDiscord<alehander42> i honestly didn't remember exactly his story
13:20:44*d_ment joined #nim
13:21:06FromDiscord<alehander42> well, his god is not really a god anyway probably
13:21:15FromDiscord<alehander42> so i don't really care for that
13:25:42*d_ment left #nim (#nim)
13:26:32*_M quit (Quit: _M)
13:26:52*eburk joined #nim
13:27:31FromDiscord<alehander42> do you like it?
13:27:48*waleee-cl joined #nim
13:29:58*dgb quit (Quit: WeeChat 2.7.1)
13:36:14FromGitter<iffy> `newConsoleLogger` only flushes the file for errors and fatal messages; I'd like to change that to be configurable -- any objections?
13:38:45FromDiscord<ucodeLukas> the code still doesnt ↵↵work i think nim is not the right tool for me
13:39:49FromDiscord<shirleyquirk> Send the current code?
13:40:04FromGitter<iffy> ah nevermind, I'll just `setStdioUnbuffered()`
13:40:40FromDiscord<ucodeLukas> sent a code paste, see https://play.nim-lang.org/#ix=2yBd
13:41:02FromDiscord<ucodeLukas> i switched from ruby btw
13:42:59FromGitter<iffy> ucodeLukas: when you compile it, add `-d:ssl` to the compile flags
13:43:21FromGitter<iffy> like this: `nim c -d:ssl nameofyourfile.nim`
13:44:49FromDiscord<ucodeLukas> did that
13:45:17FromDiscord<ucodeLukas> the error is ↵SIGSEGV: Illegal storage access. (Attempt to read from nil?)
13:47:44FromDiscord<Rika> are there no other error lines
13:50:29*Vladar joined #nim
13:53:05FromGitter<iffy> ucodeLukas, instead of using read, use stream.readData or stream.readDataStr: https://nim-lang.org/docs/streams.html#readDataStr%2CStream%2Cstring%2CSlice%5Bint%5D
13:53:08*shad0w_ joined #nim
13:54:39FromDiscord<shirleyquirk> I was just using io, no streams, and client.postContent
13:55:31FromDiscord<shirleyquirk> but http request error bad request
13:58:13*Kaivo quit (Ping timeout: 246 seconds)
14:00:21YardanicoAraq: believe it or not, combparser tests still crash with orc :P so I'll try to minimize it again
14:00:33FromDiscord<shirleyquirk> You forgot data["qal"]
14:00:49*Kaivo joined #nim
14:00:54AraqYardanico, ok, I don't care much but ok
14:02:38Yardanicowell, as I
14:02:52Yardanicoas I understand in we end we'll want to run important packages with orc (of course not now, but later)
14:02:59Yardanicoand combparser is in important pkgs list
14:03:02PMunchWhat's the easiest way of turning an array[N, char] into a string?
14:03:33AraqYardanico, sure
14:05:35FromDiscord<shirleyquirk> @ucodeLukas and response is "Error no valid YouTube link"
14:07:12FromDiscord<shirleyquirk> data["url"] wants string, not encodeUrl
14:10:15FromDiscord<shirleyquirk> play.nim-lang.org/#ix=2yBl
14:10:45FromDiscord<shirleyquirk> you definitely need to handle all the myriad exceptions that will almost certainly happen.
14:10:58FromDiscord<shirleyquirk> Just as you would in python
14:11:19*eburk quit (Quit: WeeChat 2.9)
14:11:21AraqPMunch, newString + a loop
14:11:39PMunchAh, there is no casting and $ I can use?
14:12:14Araq$cast[cstring](addr arr)
14:12:23Araqif it's zero terminated
14:12:44PMunchIt is :)
14:13:04PMunchAh, I cast that to ptr cstring and tried to access it
14:17:41*PMunch quit (Quit: leaving)
14:20:23AraqYardanico, does it work without cursor inference?
14:47:27*Vladar quit (Quit: Leaving)
15:10:37*hnOsmium0001 joined #nim
15:21:00*Vladar joined #nim
15:24:48FromDiscord<haxscramper> @alehander42 I updated draft with some clarification about types of injected variables, but otherwise I think it is more or less complete at this point. Potential expansion points might be discussed later, but I don't think it is necessary in the initial version.
15:25:34FromDiscord<haxscramper> I will redesign my current implementation to make it match the behaviour described in the RFC
15:25:48*shad0w_ quit (Ping timeout: 260 seconds)
15:26:07FromDiscord<haxscramper> Maybe something else should be clarified, but most likely I will do additional edits when I will have more or less conforming implementation
15:27:35FromDiscord<haxscramper> I replaced `opt @var ? "default"` with `opt @var or "default"` because it just looks more natural.
15:28:27FromDiscord<haxscramper> If some additional functionality is added it can be done via more keywords. Not all of them are self-contained (e.g. there is no `any ..., until`)
15:28:38FromDiscord<pygoscelis> hi. What is ARC ?
15:29:01FromDiscord<haxscramper> Memory management
15:29:03FromDiscord<haxscramper> ~arc
15:29:03disbotarc: 11a new memory manager for Nim; see https://forum.nim-lang.org/t/5734
15:29:15FromDiscord<pygoscelis> thanks
15:31:55*bung quit (Quit: Lost terminal)
15:33:23FromDiscord<pygoscelis> What kind of stuff do you guys build with Nim?
15:34:11Prestigeso far, just a window manager
15:34:48FromDiscord<pygoscelis> "just"
15:34:50FromDiscord<haxscramper> Mostly parsers and helper tools
15:35:19FromDiscord<haxscramper> It is better than python/perl/bash for any kind of quick one-time-use programs
15:37:38FromDiscord<pygoscelis> the way I see it, the languages of the future are: kotlin, dart(flutter), julia and nim
15:37:46*shad0w_ joined #nim
15:37:57FromDiscord<haxscramper> And wrapping C++ libraries into something useful. But that is mostly WIP
15:42:00FromDiscord<lqdev> @pygoscelis i'm trying to make video games with it, so far i released one
15:44:58*gour_ joined #nim
15:45:46FromDiscord<pygoscelis> @lqdev what is it called?
15:46:08FromDiscord<lqdev> https://lqdev.itch.io/memrecall
15:46:15FromDiscord<lqdev> and right now i'm working on another onw
15:46:16FromDiscord<lqdev> (edit) 'onw' => 'one'
15:48:05*gour quit (Ping timeout: 240 seconds)
15:52:38*kenran quit (Ping timeout: 256 seconds)
15:54:22FromDiscord<pygoscelis> ahaha it's nice
15:54:34FromDiscord<pygoscelis> but it's hard to play
15:54:53FromDiscord<pygoscelis> thank god I have infinite lifes
15:58:26FromDiscord<pygoscelis> Strangely when I pressed ESC it freezed, music still playing. I had to force quit the terminal.
15:58:35FromDiscord<pygoscelis> or the window
15:59:22FromDiscord<lqdev> yea it's glitched
15:59:36FromDiscord<lqdev> because it's stuck on an outdated window of GLFWW
15:59:37FromDiscord<lqdev> (edit) 'GLFWW' => 'GLFW'
15:59:47FromDiscord<lqdev> which doesn't properly clean up resources on segfault
16:00:13FromDiscord<lqdev> that's right; segfault. it's intentional. https://github.com/liquid600pgm/memrecall/blob/master/src/memrecall.nim#L39
16:02:44*noonien quit (Quit: Connection closed for inactivity)
16:05:00FromDiscord<pygoscelis> so, I've been trolled
16:05:54FromDiscord<pygoscelis> what does zeromem do?
16:06:08Araqset the memory to 0
16:10:30FromDiscord<pygoscelis> Overwrites the contents of the memory at p with the value 0.
16:11:02FromDiscord<pygoscelis> Strangely it didn't show any side effects yet outside the game
16:12:55Araqmaybe your OS provides process isolation
16:13:44*shad0w_ quit (Remote host closed the connection)
16:14:22FromDiscord<lqdev>
16:14:27FromDiscord<lqdev> the game expects the OS to do that
16:14:34FromDiscord<lqdev> any modern OS has this behavior
16:15:18FromDiscord<lqdev> after all, address 0 is the null pointer. reading/writing to it is most likely not what you want
16:15:20FromDiscord<Rika> have fun if it doesnt lol
16:16:34FromDiscord<lqdev> @Rika it's just a zeroMem, shouldn't cause any trouble *i hope*
16:16:34FromDiscord<lqdev> it quits the program and tells you your OS is broken if it doesn't crash anyways, so at least there's that
16:16:42AraqLinux allows you to remap 0 to a valid address. And then they blame the C compiler optimizer for not handling this case
16:18:21FromDiscord<pygoscelis> I'm on Linux
16:18:39FromDiscord<pygoscelis> it only freezed the window of the game
16:19:26FromDiscord<pygoscelis> I started it by simply executing the file
16:19:28*kenran joined #nim
16:19:39FromDiscord<pygoscelis> on nautilus
16:20:35FromDiscord<pygoscelis> well at least it looks like a nice game, it will be fun hacking it to see how it's done
16:21:25FromDiscord<lqdev> good luck with that
16:21:38FromDiscord<lqdev> because i haven't updated it since last year
16:21:48FromDiscord<lqdev> and the source code uses an outdated version of my engine
16:22:04FromDiscord<lqdev> so it probably doesn't even compile nowadays
16:22:08FromDiscord<lqdev> but contributions are welcome :)
16:23:06FromDiscord<pygoscelis> I'm new to Nim, so it anything seems good as a start point 😄
16:24:15FromDiscord<pygoscelis> I'm actually learning flutter at the same time
16:24:15*natrys joined #nim
16:24:26*kenran quit (Ping timeout: 272 seconds)
16:24:50FromDiscord<lqdev> you can start by fixing this. it should specify a static version `rapid 0.1.0` https://github.com/liquid600pgm/memrecall/blob/master/memrecall.nimble#L18
16:26:56FromDiscord<lqdev> i think i'll be porting this game over to a newer version of my engine at some point, but not yet. i want the engine to at least be usable
16:27:17FromDiscord<ShalokShalom> How does factorial look like in Nim in the most concise way?
16:27:32FromDiscord<ShalokShalom> fac n = product [1..n] is it in Haskell
16:28:13FromDiscord<lqdev> hm, let's see
16:29:30FromDiscord<ShalokShalom> There is a fac 👀
16:29:44FromDiscord<lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2yBZ
16:29:50FromDiscord<lqdev> that would be a simple imperative approach
16:29:57FromDiscord<ShalokShalom> Is this also possible with type inference?
16:30:01FromDiscord<lqdev> wdym?
16:30:09FromDiscord<lqdev> like, without specifying types?
16:30:13FromDiscord<lqdev> you can use `auto`
16:30:27FromDiscord<haxscramper> You can have `[T]` generic parameter, but nim uses inferred types
16:30:27FromDiscord<ShalokShalom> Yeah, I mean with functional ways?
16:30:45FromDiscord<ShalokShalom> @haxscramper Yeah, so I can simply omit them?
16:31:01FromDiscord<haxscramper> no
16:31:20FromDiscord<haxscramper> You either specify concrete type or use `func fac[T]()`
16:31:22PrestigeI like using ! like this https://play.nim-lang.org/#ix=2yC0
16:31:48FromDiscord<lqdev> nim doesn't have a complex type inference algorithm in place so there isn't really a more concise way of doing this
16:31:49FromDiscord<haxscramper> There is no ocaml-like type inference when you can omit types everywhere and make compiler figure it out
16:31:50FromDiscord<ShalokShalom> As said, I would prefer if each type would just get inferred based on the name, but in this case fac is essentially anonymous, so..
16:31:59FromDiscord<ShalokShalom> @haxscramper Oh sorry
16:32:12FromDiscord<ShalokShalom> 😢
16:33:02FromDiscord<haxscramper> ```nim↵ func fac(n: int): int = (if n <= 1: 1 else: n * fac(n - 1))↵ echo fac 1↵```
16:33:04FromDiscord<haxscramper> Recursive
16:33:12FromDiscord<ShalokShalom> @Prestige[IRC]#0000 Oh, that looks cool
16:33:36FromDiscord<ShalokShalom> So [T] does what?
16:33:41FromDiscord<Yardanico> generics
16:33:50FromDiscord<Yardanico> Don't you know Nim? :P
16:33:52FromDiscord<ShalokShalom> Sorry, I am new to programming.
16:34:00FromDiscord<ShalokShalom> No, just a little.
16:34:18FromDiscord<ShalokShalom> I know what Generics are: What Go is missing 😋
16:34:42PrestigeIs there a way to have a generic (like other langs) like: [T extends int] or something similar?
16:34:42FromDiscord<haxscramper> Go is missing about 95% of the normal language, so this isjust minor detail
16:34:56FromDiscord<Yardanico> What does that mean?
16:35:21FromDiscord<ShalokShalom> [T] is like a placeholder?
16:35:22Prestigewhere T would have to be an int type. Maybe int was a bad example
16:35:27FromDiscord<ShalokShalom> Or does anything specific?
16:35:42FromDiscord<Yardanico> @ShalokShalom well you were talking about Nim docs quite a lot so I thought that you read them :)
16:35:43FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#generics
16:36:16FromDiscord<ShalokShalom> @Yardanico Yes I did, but I stumbled across couple of interesting things
16:36:35Prestigeah Yardanico thanks - it would be [T: Foo]
16:36:43FromDiscord<ShalokShalom> Ok, this doesn't tell me anything
16:36:55FromDiscord<ShalokShalom> So [T] does something
16:37:16FromDiscord<Yardanico> It tells the compiler that this type or a proc is generic
16:37:32FromDiscord<haxscramper> > Sorry, I am new to programming.↵@ShalokShalom Oh, by the way, maybe your argument is mostly based on nim tutorial being not really good for beginner /programmers/? because generic section is just 7 lines of text and 30+ lines of code for generic binary tree.
16:37:36FromDiscord<Yardanico> And T is the generic type
16:37:58FromDiscord<haxscramper> Which is good if you know what generic is in general, but not really helpful if you are starting with programming in general
16:38:06FromDiscord<ShalokShalom> @haxscramper How most of the documentation is
16:38:18FromDiscord<Yardanico> For a complete programming newbie?
16:38:20FromDiscord<Yardanico> Maybe
16:38:20FromDiscord<ShalokShalom> The beginner tutorial is quite nice, everything after is noise.
16:38:32FromDiscord<Yardanico> But not for people who already do programming :)
16:38:47FromDiscord<lqdev> i never had problems with the docs
16:38:50PrestigeMaybe we should make more beginners tuts
16:39:00FromDiscord<lqdev> they're at least as good as the MDN is on HTML/CSS/JS
16:39:03FromDiscord<lqdev> the layout is similar
16:39:11FromDiscord<lqdev> easy to navigate
16:39:37FromDiscord<haxscramper> Writ series of useless articles like "getting started with nim procs". Although i can easily see how this gets converted into 10-page essay
16:39:56FromDiscord<haxscramper> Because pragmas, side effects, raise annotations, static parameters, binding rules, generics
16:40:00FromDiscord<ShalokShalom> > And T is the generic type↵@Yardanico What does this mean
16:40:02Prestigenitpicking, but I wish the links on the left side of the page scrolled so they are always in view
16:40:05FromDiscord<ShalokShalom> I know what types are
16:40:12FromDiscord<Yardanico> Google it :)
16:40:13FromDiscord<ShalokShalom> Generic means, it can be any type?
16:40:19FromDiscord<ShalokShalom> Thats not helping.
16:40:20FromDiscord<haxscramper> And tons of little details, like when exactly proc will be checked for correctnes
16:40:20FromDiscord<Yardanico> Generics aren't exclusive to Nim
16:40:27FromDiscord<ShalokShalom> Yeah, I know.
16:40:37FromDiscord<Yardanico> Well, Nim docs aren't meant to cover every possible CS question
16:41:02FromDiscord<pygoscelis> Generic means the procedure can be called with any type
16:41:11FromDiscord<ShalokShalom> Nim is suitable for simple code due to its simple syntax and quite convenient features
16:41:14FromDiscord<Yardanico> Generic procedures/types have at least one argument/field which is generic
16:41:17FromDiscord<ShalokShalom> And it can grow with you
16:41:33Prestigemaybe https://dev.to/designpuddle/coding-concepts---generics-34cf would be a good read ShalokShalom
16:41:41FromDiscord<ShalokShalom> > Generic means the procedure can be called with any type↵@pygoscelis So I essentially make soft typing from it?
16:41:46FromDiscord<ShalokShalom> Like Javascript?
16:41:57FromDiscord<Yardanico> But I wouldn't go as far as saying "Nim has bad documentation" if what you actually mean is "Nim has bad documentation for people who didn't program before"
16:41:57FromDiscord<ShalokShalom> Thanks a lot Prestige
16:42:06FromDiscord<Yardanico> @ShalokShalom not at all
16:42:13FromDiscord<Yardanico> Generics are still type checked
16:42:17Prestigenp
16:42:35FromDiscord<pygoscelis> > @pygoscelis So I essentially make soft typing from it?↵@ShalokShalom You have to choose a type when you call it
16:42:36FromDiscord<Yardanico> It just allows to makes your code work for multiple types without repetition
16:42:59FromDiscord<Rika> sometimes you dont need to choose a type
16:43:15FromDiscord<pygoscelis> > sometimes you dont need to choose a type↵@Rika true
16:43:23FromDiscord<Yardanico> Yeah, if one of the arguments is the generic one
16:44:07FromDiscord<ShalokShalom> > @ShalokShalom You have to choose a type when you call it↵@pygoscelis Aaaah, ok
16:44:18FromDiscord<ShalokShalom> That doesn't help me further with my case
16:44:36FromDiscord<ShalokShalom> I would need a real, HMD type system
16:44:52FromDiscord<ShalokShalom> Is there anything in plan? 😋
16:44:55FromDiscord<Yardanico> A type system doesn't have to be HMD to be "real"
16:44:56FromDiscord<Yardanico> No
16:45:04FromDiscord<ShalokShalom> Yeah, for me it does
16:45:10FromDiscord<ShalokShalom> Doesn't help me, if not
16:45:10FromDiscord<Yardanico> Well, then Nim isn't for you
16:45:15FromDiscord<ShalokShalom> Yes, sorry
16:45:38FromDiscord<Yardanico> Nim doesn't have a HM type system, you need to specify types in procedures or objects
16:45:56FromDiscord<Yardanico> There is no return type overloading or similar things
16:46:05FromDiscord<Yardanico> But there are generics, macros, templates, etc
16:47:37*mmohammadi98127 joined #nim
16:47:42FromDiscord<ShalokShalom> Sad
16:47:55FromDiscord<Yardanico> But are you sure that you actually need a HM type system?
16:48:02FromDiscord<ShalokShalom> A type system that infers its types, helps me to keep my code clean
16:48:05FromDiscord<Yardanico> I'm asking because you said you are new to programming
16:48:09FromDiscord<Yardanico> Does it?
16:48:18FromDiscord<ShalokShalom> Its the same reason, why I choose indentation for block building
16:48:24FromDiscord<ShalokShalom> Yes, clearly
16:48:33FromDiscord<ShalokShalom> Do you not think so?
16:48:35FromDiscord<Yardanico> No
16:48:37FromDiscord<Yardanico> Not at all
16:48:41FromDiscord<ShalokShalom> Why no HM type system?
16:48:43FromDiscord<ShalokShalom> Aha, ok
16:48:49FromDiscord<ShalokShalom> Then we are very different people.
16:48:53FromDiscord<Yardanico> Exactly
16:48:59FromDiscord<ShalokShalom> I want so less noise in my code as possible
16:49:08FromDiscord<ShalokShalom> Nothing that doesn't belong there.
16:49:25FromDiscord<haxscramper> > A type system that infers its types, helps me to keep my code clean↵@ShalokShalom Never understood how HMD can actually help doing anything. Certainly not a helper for readability. When I tried to undestand earley parser written in ocaml I spent about 50% of the time just figuring out actual types;
16:49:30FromDiscord<ShalokShalom> Could I just infer from the name of the binding, etc?
16:49:48FromDiscord<Rika> omitting types makes it faster to write code but much slower to read it
16:49:57FromDiscord<Yardanico> Well, maybe @ShalokShalom only cares about writing code, not reading it
16:50:00FromDiscord<ShalokShalom> @haxscramper You can hover over the code and it shows them
16:50:01FromDiscord<Yardanico> Like Rika said :)
16:50:02FromDiscord<haxscramper> You have to know where function is called to understand what type it operates on
16:50:06FromDiscord<Rika> you're adding extra load for certain programmers to figure types out
16:50:06*thomasross joined #nim
16:50:18FromDiscord<ShalokShalom> F# does it all the time 🤷‍♂️
16:50:43FromDiscord<ShalokShalom> And Haskell has HM despite its annotation
16:50:49FromDiscord<Rika> "hover over the code" sounds like an IDE specific feature
16:50:49FromDiscord<haxscramper> > @haxscramper You can hover over the code and it shows them↵@ShalokShalom well, yes, of course, my favourite argument - you can isntall like "REAL" IDE to actually get some work done with this "very readable" programming language
16:50:56FromDiscord<ShalokShalom> It helps to keep track of the type order
16:51:04*opal quit (Quit: i'm never coming back)
16:51:06FromDiscord<haxscramper> I dumped types used ocamlc
16:51:16FromDiscord<ShalokShalom> @haxscramper I dont like an IDE that doesnt can this
16:51:24FromDiscord<Rika> thats a preference thing
16:51:26FromDiscord<lqdev> @ShalokShalom i'd actually argue that specifying types explicitly makes code much more readable
16:51:29FromDiscord<haxscramper> But i would prefer that language is readable anywhere, not only in specific IDE
16:51:32FromDiscord<ShalokShalom> Heck, there is even a gist webpage that can do that
16:51:36FromDiscord<haxscramper> That has support for particular language
16:51:47FromDiscord<ShalokShalom> @lqdev Yes, lots of people feel so
16:51:53FromDiscord<ShalokShalom> I just dont like that.
16:53:13FromDiscord<Rika> then as someone said already, maybe nim isnt for you
16:53:21*mmohammadi98127 quit (Quit: I quit (╯°□°)╯︵ ┻━┻)
16:53:54FromDiscord<haxscramper> And on top of that - generic types don't make code **that** more unreadable. You dont' have to specify types in most cases in variable assigment
16:53:59Araqif you cannot goto definition with a single click or less you're burning money
16:54:05*mmohammadi9812 joined #nim
16:54:17FromDiscord<Yardanico> Well, we're talking about types :)
16:54:20FromDiscord<ShalokShalom> @haxscramper I am not against generic types
16:54:22AraqI cry everytime it doesn't work
16:54:29FromDiscord<haxscramper> Well I just have 4 screens and I always have definition for everything at once
16:54:31FromDiscord<Yardanico> And if it's good to not specify them so they're inferred
16:54:39FromDiscord<ShalokShalom> I just dont think they are capable to replace me a HM type system
16:54:42FromDiscord<pygoscelis> without types how would you create objects?
16:54:59FromDiscord<ShalokShalom> If you dont have one, cuz you can't or won't implement it, thats fine
16:55:06FromDiscord<lqdev> araq we need to hire someone to fix nimsuggest
16:55:16FromDiscord<lqdev> everybody wants it to be fixed but nobody wants to fix it
16:55:25FromDiscord<haxscramper> For example I don't understand how to code on <3 screens, so I need IDE that can handle this workflow well
16:55:26FromDiscord<Yardanico> Hey i PRed a few fixed
16:55:32FromDiscord<Yardanico> Fixes*
16:55:34FromDiscord<ShalokShalom> > then as someone said already, maybe nim isnt for you↵@Rika Which is said, since it looks so perfect otherwise
16:55:38FromDiscord<lqdev> @Yardanico coolio
16:55:43FromDiscord<Yardanico> and nimsuggest is closely tied to the compiler
16:55:47FromDiscord<lqdev> it's on devel, i guess?
16:56:02FromDiscord<Yardanico> It was a few months ago
16:56:37FromDiscord<haxscramper> > Which is said, since it looks so perfect otherwise↵@ShalokShalom you only used functional languages with HM type system before?
16:56:44FromDiscord<ShalokShalom> Yes
16:56:51FromDiscord<ShalokShalom> F# mostly
16:57:01FromDiscord<ShalokShalom> I love all of them 🥳
16:57:30FromDiscord<ShalokShalom> But F#'s .Net integration is so tedious and badly implemented in Godot
16:57:32FromDiscord<Yardanico> Well Nim is mostly an imperative language
16:57:40FromDiscord<Yardanico> Although you can do functional style of course
16:57:43FromDiscord<ShalokShalom> And I really like the syntax here even more than in F#
16:57:49FromDiscord<haxscramper> Well, you get generics in pretty much any non-functional programming language. Rust has type inference, but you still have to write `<T>` so
16:57:57FromDiscord<ShalokShalom> Yes, I am actually fine with the functional support here
16:58:10FromDiscord<ShalokShalom> Since func is truly functional
16:58:13FromDiscord<Yardanico> Oh right, Rust has a variant of an HM type system
16:58:20FromDiscord<Yardanico> Yet they use types :)
16:58:27FromDiscord<Yardanico> Even in function arguments!!11
16:58:41FromDiscord<ShalokShalom> I dont need all the hugely complicated Haskell abstractions and tons of functional features
16:58:54FromDiscord<ShalokShalom> Yes, Rust is just too strict
16:59:11FromDiscord<Rika> which is their selling point
16:59:15FromDiscord<ShalokShalom> And I dont like curly braces and they also ask for annotations left and right
16:59:37FromDiscord<ShalokShalom> @Rika Strict in the sense of letting me create no new operators and stuff
16:59:42FromDiscord<Rika> the language is safe because you're put on basically programmer's training wheels or smth
16:59:43FromDiscord<ShalokShalom> I am very flexible here
16:59:52FromDiscord<haxscramper> Well, this is a ~85% functional language, so it really fits this good spot where you can write in functional style without actually *forcing* you to do so
16:59:54FromDiscord<ShalokShalom> What is impossible in Rust, is one line in Nim.
17:00:02FromDiscord<haxscramper> https://prog21.dadgum.com/55.html
17:00:16FromDiscord<ShalokShalom> @haxscramper Yes, I am actually fine with 60% already
17:00:22FromDiscord<ShalokShalom> That is not the problem
17:00:31FromDiscord<ShalokShalom> Persistent data structures would be fine
17:00:40FromDiscord<ShalokShalom> While I could live without them
17:00:49*Vladar quit (Quit: Leaving)
17:01:02FromDiscord<haxscramper> we have immutable variables and deep immutability for ref objects
17:01:07FromDiscord<Yardanico> But why are you so keen on not having to specify types of arguments
17:01:10FromDiscord<pygoscelis> @ShalokShalom have you peeked red lang?
17:01:25FromDiscord<Yardanico> In procedures at definition
17:01:41FromDiscord<ShalokShalom> Could I just infer types like this:↵↵const name = 1
17:01:45FromDiscord<haxscramper> yes
17:01:48FromDiscord<ShalokShalom> In this case, name would be the type
17:01:50FromDiscord<ShalokShalom> Not int
17:01:57FromDiscord<ShalokShalom> I could live with this
17:01:58FromDiscord<haxscramper> !eval const name = 1; echo typeof(name)
17:02:00FromDiscord<ShalokShalom> Actually prefer it
17:02:01NimBotint
17:02:35FromDiscord<ShalokShalom> @pygoscelis No? Isnt that a gpu language?
17:02:43FromDiscord<ShalokShalom> But I need something with Godot bindings.
17:02:54FromDiscord<Yardanico> lol
17:03:00FromDiscord<ShalokShalom> > But why are you so keen on not having to specify types of arguments↵@Yardanico Because it keeps the code clean
17:03:08FromDiscord<Yardanico> How?!?11
17:03:14FromDiscord<Yardanico> it makes it less clean
17:03:15FromDiscord<haxscramper> Very dubious statement
17:03:21FromDiscord<ShalokShalom> Not putting noise in
17:03:26FromDiscord<Yardanico> you have to hover over arguments to see their types
17:03:29FromDiscord<ShalokShalom> Type annotations are just noise to me
17:03:31FromDiscord<Yardanico> You're not putting noise
17:03:34FromDiscord<ShalokShalom> I dont wanna see yhem
17:03:38FromDiscord<Yardanico> You're putting actual valuable info
17:03:38FromDiscord<ShalokShalom> Yes 👌
17:03:41FromDiscord<ShalokShalom> I like that
17:03:44FromDiscord<Yardanico> about what you expect
17:04:06FromDiscord<Yardanico> meh, whatever, I'm out of this discussion
17:04:15FromDiscord<ShalokShalom> You like the annotations in code, I like them in IDE, why do you wanna cut me head off over this?
17:04:47FromDiscord<Rika> hey man whatever, its a preference thing
17:04:59FromDiscord<haxscramper> Well, this is really pointless discussion indeed, but IDE is should not be a part of a language.
17:05:14FromDiscord<ShalokShalom> > !eval const name = 1; echo typeof(name)↵@haxscramper So, in which case works the inference and in which cases not?
17:05:26FromDiscord<pygoscelis> > @pygoscelis No? Isnt that a gpu language?↵@ShalokShalom it's a full-stack language, but it has types 😄
17:05:33FromDiscord<ShalokShalom> @pygoscelis Ok, thanks a lot
17:05:38FromDiscord<ShalokShalom> I will see.
17:05:45FromDiscord<ShalokShalom> Out of curiosity 👀
17:06:08FromDiscord<haxscramper> for `let/var/const` you don't have to specify the types. If you call generic proc `func gen[T](a: T)` with `gen(12)` or something else it will automatically infer type for `T` as `int` (or something else)
17:06:09FromDiscord<ShalokShalom> See what I found today: https://amulet.works/
17:06:20FromDiscord<ShalokShalom> @haxscramper thanks a lot
17:06:38FromDiscord<haxscramper> so you have to write type only in **declarations**
17:07:05FromDiscord<haxscramper> it is not like in C++ where you have `std::vector<uniuque_pointer<T>>::iterator` all over the place
17:07:12FromDiscord<ShalokShalom> But when I annotate it with [T] do I need to do anything else when I later interact with it?
17:07:14FromDiscord<haxscramper> And even C++11 has `auto`
17:07:21FromDiscord<haxscramper> > But when I annotate it with [T] do I need to do anything else when I later interact with it?↵@ShalokShalom no
17:07:22FromDiscord<ShalokShalom> Yes, I know that
17:07:26FromDiscord<pygoscelis> > See what I found today: https://amulet.works/↵@ShalokShalom reminds me of haskell
17:07:28FromDiscord<ShalokShalom> Ok, thanks
17:07:36FromDiscord<ShalokShalom> @pygoscelis Yes, totally.
17:07:45FromDiscord<ShalokShalom> The whole ML family looks like this.
17:07:51FromDiscord<haxscramper> You can explicitly specify `gen[T]()` if there is no parameters to infer type from
17:07:55FromDiscord<ShalokShalom> They all have it from Miranda and SML.
17:08:34FromDiscord<ShalokShalom> I will read about generic functions
17:08:50FromDiscord<ShalokShalom> > for `let/var/const` you don't have to specify the types. If you call generic proc `func gen[T](a: T)` with `gen(12)` or something else it will automatically infer type for `T` as `int` (or something else)↵@haxscramper Why gen*12*?
17:08:58FromDiscord<ShalokShalom> (edit) 'gen*12*?' => 'gen*(12)*?'
17:09:06FromDiscord<ShalokShalom> So, explicitly 12
17:09:42FromDiscord<Rika> no, can be any int
17:09:47FromDiscord<ShalokShalom> https://nim-lang.org/docs/manual.html#generics
17:09:53FromDiscord<haxscramper> `gen(@[("hello, 3), ("world", 2)]` will make `seq[(string, int)]`
17:09:55FromDiscord<Rika> so like `gen(aVal)` if aVal were an int would work too
17:10:01FromDiscord<ShalokShalom> fun gen brings me no results
17:10:07FromDiscord<ShalokShalom> gen has like 136
17:10:09FromDiscord<Rika> its just an example
17:10:28FromDiscord<ShalokShalom> Where would I find docs on func gen now?
17:10:29FromDiscord<Rika> the generic part is the `[T]` part
17:10:34FromDiscord<ShalokShalom> (edit) 'fun' => 'fuc'
17:10:38FromDiscord<ShalokShalom> I know
17:10:44FromDiscord<ShalokShalom> (edit) 'fuc' => 'func'
17:10:59FromDiscord<ShalokShalom> I am now trying to find documentation on func gen
17:11:06FromDiscord<ShalokShalom> gen is a keyword?
17:11:10FromDiscord<Rika> uh noi
17:11:14FromDiscord<Rika> its just the function name
17:11:16FromDiscord<ShalokShalom> Ah, ok
17:11:20FromDiscord<Rika> just an example
17:11:29FromDiscord<Rika> the important part is the `[T`]
17:11:31FromDiscord<Rika> (edit) '`[T`]' => '`[T]`'
17:11:49FromDiscord<ShalokShalom> > for `let/var/const` you don't have to specify the types. If you call generic proc `func gen[T](a: T)` with `gen(12)` or something else it will automatically infer type for `T` as `int` (or something else)↵@haxscramper Aaah, so generic proc is it called, because it has a generic type
17:11:58FromDiscord<ShalokShalom> I thought the gen is doing that.
17:12:10FromDiscord<ShalokShalom> Thanks a lot.
17:12:54FromDiscord<ShalokShalom> Is there an option type in Nim?
17:13:13solitudesfhttps://nim-lang.org/docs/options.html
17:13:16FromDiscord<Rika> https://nim-lang.org/docs/options.html ?
17:13:19FromDiscord<Rika> fuck, im slow
17:13:24FromDiscord<Rika> damn you solitude
17:13:28solitudesfi even gave you a head start
17:13:32FromDiscord<Rika> smh
17:13:49*superbia joined #nim
17:14:02FromDiscord<ShalokShalom> https://github.com/vegansk/nimfp
17:14:14FromDiscord<ShalokShalom> This one has also one
17:17:44FromDiscord<ShalokShalom> Hnn, I am confused
17:17:50FromDiscord<ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/758738980933206026/Screenshot_2020-09-24-19-17-30-69_3aea4af51f236e4932235fdada7d1643.jpg
17:17:58FromDiscord<ShalokShalom> Isn't var declaring it?
17:18:27FromDiscord<ShalokShalom> Thats from the examples. I am aware, that they are not meant, to be running like that.
17:18:28FromDiscord<Rika> import options
17:18:32FromDiscord<ShalokShalom> Ok
17:18:35FromDiscord<Rika> thats all you need to change
17:18:35FromDiscord<ShalokShalom> Of course
17:18:38FromDiscord<Rika> should work after that
17:18:38FromDiscord<ShalokShalom> Ah, oo
17:18:49FromDiscord<ShalokShalom> But why isn't the error saying that?
17:18:57FromDiscord<Rika> it is, just in a roundabout way
17:19:04FromDiscord<ShalokShalom> Because some become a keyword?
17:19:10FromDiscord<Rika> no
17:19:11FromDiscord<ShalokShalom> (edit) 'become' => 'becomes'
17:19:14FromDiscord<ShalokShalom> So why?
17:19:17FromDiscord<Rika> its just saying that `some` doesnt exist
17:19:54FromDiscord<ShalokShalom> It can not import option
17:20:04FromDiscord<ShalokShalom> Seems like the playground has no access to it
17:20:27FromDiscord<ShalokShalom> Yeah, but why is importing option "declaring" some?
17:20:59FromDiscord<Rika> no, `options`, not `option`
17:21:02FromDiscord<Rika> with an s
17:21:02solitudesf`some` is a function in options module
17:21:49FromDiscord<ShalokShalom> Ah
17:21:56FromDiscord<ShalokShalom> @solitudesf[IRC]#0000 thats what I meant
17:22:08FromDiscord<ShalokShalom> > Because some becomes a keyword?↵@ShalokShalom
17:22:13FromDiscord<ShalokShalom> Or doesn't it?
17:22:23FromDiscord<Rika> no, some is not a keyword
17:22:24solitudesfno, your terminology is all kinds of fucked up
17:22:34solitudesfplease, read the tutorial
17:22:41FromDiscord<Rika> yeah, i think you have wrong definitions
17:23:15FromDiscord<ShalokShalom> So what is some called in this instance?
17:23:28FromDiscord<Yardanico> A procedure
17:23:37FromDiscord<ShalokShalom> Thanks a lot
17:23:48FromDiscord<ShalokShalom> Ah, as a lib.
17:23:59FromDiscord<haxscramper> `proc some[T](val: T): Option[T] {...}` - the word `proc` means it is a procedure
17:23:59FromDiscord<ShalokShalom> Like, could I also import just some?
17:24:01FromDiscord<Yardanico> https://nim-lang.org/docs/options.html#some%2CT
17:24:06FromDiscord<Yardanico> Yes, you can
17:24:06FromDiscord<Vindaar> on my phone, someone link PMunch's option utils lib
17:24:07FromDiscord<ShalokShalom> And not whole options?
17:24:14FromDiscord<ShalokShalom> Ah, understand
17:24:31FromDiscord<Yardanico> but there wouldn't be any difference in performance
17:24:35FromDiscord<ShalokShalom> I still think, it should have its own distinctive color then
17:24:38FromDiscord<Yardanico> ??
17:24:45FromDiscord<haxscramper> just install emacs
17:24:46FromDiscord<Yardanico> it's just a normal procedure call
17:24:50FromDiscord<ShalokShalom> When its not just another name that I give it
17:24:58FromDiscord<Solitude> every function should have its own color?
17:25:02FromDiscord<Yardanico> You can create your own some
17:25:03FromDiscord<Yardanico> Easily
17:25:07FromDiscord<ShalokShalom> Yeah, but its not something that I specify
17:25:25FromDiscord<Avatarfighter> https://github.com/PMunch/nim-optionsutils
17:25:28FromDiscord<haxscramper> And then `(" \\(some\\)" . 'font-lock-keyword-face)` - problem solved
17:25:30FromDiscord<ShalokShalom> No, just import functions could have the color of import functions.
17:25:39FromDiscord<Yardanico> Wat
17:25:39FromDiscord<ShalokShalom> Or anything, just not white
17:25:51FromDiscord<ShalokShalom> @haxscramper Thanks a lot
17:25:56FromDiscord<Avatarfighter> I hope that was what Vindaar meant by PMunch's option helper lib
17:26:01FromDiscord<ShalokShalom> Those things work really nice in Nim
17:26:09FromDiscord<ShalokShalom> @Avatarfighter Thanks a lot
17:26:23FromDiscord<Avatarfighter> I did nothing 😛
17:27:15FromDiscord<Solitude> why, in generic context its not even known if function is imported or local
17:28:06FromDiscord<Vindaar> yes, thank you!
17:28:15FromDiscord<ShalokShalom> I know, I am asking for too much, but could I use it that way: https://media.discordapp.net/attachments/371759389889003532/758741601349664768/Screenshot_2020-09-24-19-27-46-66.jpg
17:28:48FromDiscord<Yardanico> hasVal is already there
17:28:49FromDiscord<haxscramper> Pattern matching is WIP
17:28:54FromDiscord<Rika> look at `withSome` in PMunch's `optionsutils` library
17:29:26FromDiscord<haxscramper> Oh, I actually need to special-case options
17:29:35FromDiscord<Rika> https://media.discordapp.net/attachments/371759389889003532/758741934226669578/unknown.png
17:29:39FromDiscord<ShalokShalom> Ah, ok
17:29:44FromDiscord<ShalokShalom> I am fine now
17:29:47FromDiscord<ShalokShalom> Thanks a lot
17:30:11FromDiscord<Yardanico> @haxscramper ah right wanted to ask you - are there any plans for some user defineable hooks to pattern matching?
17:30:21FromDiscord<ShalokShalom> > Oh, I actually need to special-case options↵@haxscramper You mean to consider uppercase, as in this example?
17:30:22FromDiscord<Yardanico> So people can add other extensions like json or ootions
17:30:38FromDiscord<Yardanico> @ShalokShalom no
17:30:48FromDiscord<ShalokShalom> I think jsons are possible by default?
17:30:55FromDiscord<Yardanico> To add additional support to options
17:30:59FromDiscord<Yardanico> For*
17:31:11FromDiscord<haxscramper> Well, the issue is that I don't really know how it would look like exactly. If you have any specific use case in mind then I might try to think about it
17:31:18FromDiscord<haxscramper> You can use key-value pairs
17:31:23FromDiscord<haxscramper> And custom predicates
17:31:37FromDiscord<haxscramper> But for user hooks I first need to know at least some use cases
17:31:53FromDiscord<haxscramper> Because I personally don't really have anything of that sort
17:31:57*superbia quit (Read error: Connection reset by peer)
17:32:16FromDiscord<haxscramper> So I need an example of what/how you would like to do it
17:32:22FromDiscord<haxscramper> And then play around it
17:33:03FromDiscord<haxscramper> like you can already do `{"name": _(it.startsWith("hello"))`
17:33:08FromDiscord<ShalokShalom> How you mean special case options.
17:33:14FromDiscord<ShalokShalom> (edit) 'options.' => 'options?'
17:33:18FromDiscord<Yardanico> Add additional code
17:33:18FromDiscord<haxscramper> And `{"name": @val is JString()}`
17:33:23FromDiscord<Yardanico> To support options better
17:33:34FromDiscord<Yardanico> That's what "special case something" means
17:33:41FromDiscord<Yardanico> To add support specifically for something
17:34:03FromDiscord<haxscramper> Yes, I though you had some ideas for user-defined extensions
17:34:05FromDiscord<ShalokShalom> Ah, ok ^^
17:34:17*mmohammadi9812 quit (Ping timeout: 256 seconds)
17:34:24FromDiscord<ShalokShalom> I am actually quite pleased
17:34:45FromDiscord<ShalokShalom> I need to bend somewhat, but Nim looks really very bendable
17:34:59FromDiscord<ShalokShalom> Lots of other languages either support those things, or they dont
17:35:09FromDiscord<haxscramper> For options I might just rewrite `Some(x)` to `(isSome: true, get: @x)`
17:35:41FromDiscord<ShalokShalom> Nim is somehow the very first language that lets me do all those things with one line of code or by simply importing a library
17:35:54*rockcavera quit (Remote host closed the connection)
17:36:08FromDiscord<haxscramper> And this is will make it support things like `[all (Some(@vals) | _)]`, `Some(@x)` etc.
17:36:12FromDiscord<haxscramper> Basically for free
17:36:17FromDiscord<ShalokShalom> And also: I dont need so much annotations and everything explicit, since I write very simple code
17:36:44FromDiscord<ShalokShalom> I can understand, that when I add up 10.000 lines, that I will enjoy these type annotations
17:36:53FromDiscord<ShalokShalom> But not, if I write a simple script.
17:36:57FromDiscord<ShalokShalom> 🤷‍♂️
17:37:24FromDiscord<haxscramper> Might fuck up your day a little if you have something like `enSome` or en `enNone()`, but whatewher
17:37:25FromDiscord<ShalokShalom> That was specifically, what I disliked about Rust.
17:37:41FromDiscord<ShalokShalom> There was/is no way to keep the language concise.
17:37:55FromDiscord<ShalokShalom> Nim seems to bend.
17:38:17FromDiscord<haxscramper> Just write macro that implements HM type inference
17:38:30FromDiscord<haxscramper> I'm sure it might be possible to implement
17:38:40FromDiscord<ShalokShalom> Haha
17:38:50FromDiscord<ShalokShalom> I am not capable of doing that
17:38:55FromDiscord<ShalokShalom> And you know that
17:39:00FromDiscord<haxscramper> Good first project
17:39:05FromDiscord<ShalokShalom> Haha
17:39:19FromDiscord<ShalokShalom> Good first project is something in Godot.
17:39:19FromDiscord<haxscramper> My first thing I wrote in nim was ipynb -> word/latex converter
17:39:38FromDiscord<ShalokShalom> Yeah nice
17:39:46FromDiscord<ShalokShalom> You first thing in programming?
17:40:20FromDiscord<haxscramper> Don't remember. Something related to Arduino
17:40:44FromDiscord<ShalokShalom> Comparable to the implementation of a HM type system?
17:40:44FromDiscord<ShalokShalom> 😅
17:42:01FromDiscord<ShalokShalom> Thanks a lot. I will see, I think I can live with it, how it is now. Pattern matching is available as library, did you look at that:
17:42:01FromDiscord<ShalokShalom> https://github.com/andreaferretti/patty
17:43:11FromDiscord<ShalokShalom> I also dont want to think about types 😳
17:43:34FromDiscord<ShalokShalom> It should just run in the background and warn me, when I am about to do shit.
17:44:13*NimBot joined #nim
17:44:42Araqthere you go, no thinking required, you simply look even less at the screen
17:45:46*shad0w_ joined #nim
17:45:57Araqyou can do even better than that by switching off your computer and watching TV instead
17:46:06FromDiscord<ShalokShalom> Semi funny
17:52:59Araqwhat isn't funny is a decade of experience with "I don't want to think" "programmers"
17:54:15FromDiscord<ShalokShalom> Its not about that
17:54:22shad0w_look's like Araq's seem some shit (if that's alright to say here?)
17:54:28FromDiscord<ShalokShalom> I dont want to think about it right from the start
17:54:29shad0w_seen*
17:54:38FromDiscord<ShalokShalom> I dont plan to start on that level
17:54:57FromDiscord<Yardanico> Uh wat
17:54:58FromDiscord<Rika> youre not making yourself sound any less like what araq described
17:55:04FromDiscord<ShalokShalom> But that's what support wheels are for
17:55:22FromDiscord<ShalokShalom> @Rika I dont plan to. I dont wanna think about everything
17:55:24FromDiscord<Yardanico> Support wheels exist in Nim
17:55:27FromDiscord<Yardanico> auto type
17:55:37FromDiscord<ShalokShalom> Most here dont wanna think about manual memory control
17:55:54FromDiscord<Yardanico> Apples and oranges yay
17:55:59FromDiscord<ShalokShalom> If you would be the opposite of what he describes, what you all coding in machine code
17:56:06FromDiscord<ShalokShalom> No, just extending the example.
17:56:10FromDiscord<ShalokShalom> I am a newbie.
17:56:16*mmohammadi9812 joined #nim
17:56:32FromDiscord<Yardanico> Yes, and it's much better to learn the correct way from the start
17:56:38FromDiscord<ShalokShalom> I don't wanna think about the same complexity than a decade long coder
17:56:47FromDiscord<Yardanico> Well you don't have to
17:56:50FromDiscord<Yardanico> You do simple programs
17:56:57FromDiscord<ShalokShalom> Yeah, correct is what feels correct to me
17:57:39FromDiscord<Yardanico> Not to the compiler?
17:57:52FromDiscord<Rika> well, use a language that's 100% conforming to what you deem correct
17:58:12FromDiscord<haxscramper> https://play.nim-lang.org/#ix=2yCs why converter doesn't work if I use it on multiple arguments at once
17:58:13FromDiscord<Rika> and if you cant, then the only other option is to make that language or deal with a language that is less conforming
17:58:50FromDiscord<ShalokShalom> That language has no bindings to Godot
17:59:10FromDiscord<Rika> see second option
17:59:38FromDiscord<Rika> @haxscramper second failing line gives an internal error, likely a compiler bug?
17:59:58FromDiscord<Rika> fun stuff
18:00:16FromDiscord<Yardanico> <@208199869301522432> sorry, but it's just starting to feel like you're blaming _Nim_ because it's not the language suitable for _you_
18:02:03FromDiscord<Yardanico> Also real world is real world, you might not be able to find exactly what you want, so you'll have to give up some of your requirements
18:06:12FromDiscord<haxscramper> How can I put `array` in typeclass together with other types that don't have generic parameters? Like `A = int | array[int, N]` - but I can't omit `N`. `openarray` seems not to be working - https://play.nim-lang.org/#ix=2yCv
18:06:28FromDiscord<haxscramper> Just different approach to implicit conversion
18:07:21FromDiscord<Yardanico> Well, i know your issue there I think
18:08:00FromDiscord<Yardanico> Ah no, I get what I mean
18:08:10*gmaggior joined #nim
18:08:54FromDiscord<Yardanico> you*
18:09:19FromDiscord<Yardanico> You'll probably have to use overloads there?
18:09:35*muffindrake quit (Ping timeout: 272 seconds)
18:11:34*opal joined #nim
18:13:11FromDiscord<haxscramper> https://play.nim-lang.org/#ix=2yCA for different parameters I need to explicitly specify that I have different generic types
18:13:31*NimBot joined #nim
18:13:59Araqwhat's common between int and array?
18:14:15*superbia joined #nim
18:14:40FromDiscord<haxscramper> My real use case is `char`, `set[char]` and `openarray[string]` but I just have habit of using `int` for all exambles
18:14:56FromDiscord<haxscramper> And also just `string`
18:15:03FromDiscord<Yardanico> @haxscramper you can do the same with "a: StrIn, b: StrIn", no?
18:15:10FromDiscord<haxscramper> No
18:15:43*superbia quit (Client Quit)
18:15:47FromDiscord<haxscramper> Like, I would expect it to work like this too, but - https://play.nim-lang.org/#ix=2yCB
18:18:56FromDiscord<haxscramper> `StrPartConv[T] = char | set[char] | string | seq[string] | openarray[string] | array[T, string]` seems to just kill compiler too
18:20:21*muffindrake joined #nim
18:21:59FromDiscord<haxscramper> @Yardanico my `Some(@x)` idea is close enough to what you had in mind or there is something else? I just got impression you want to have some kind of mechanism for completely arbitrary user-defined matching mechanisms
18:22:13FromDiscord<Yardanico> Well I don't have any specific in mind :(
18:22:21FromDiscord<Yardanico> anything*
18:23:34*muffindrake quit (Client Quit)
18:24:03*muffindrake joined #nim
18:32:03*opal quit (Ping timeout: 240 seconds)
18:37:06*shad0w_ quit (Remote host closed the connection)
18:37:56*opal joined #nim
18:38:27Araqwow system.add(var seq[T], openArray[T]) is really extensively used in npeg
18:44:23federico3Araq: for "IC"?
18:44:27federico3wht's IC?
18:44:36Araqincremental compilation
18:44:48federico3using... zstd?
18:45:45Araqstoring the internal datastructures to disk using some compression cannot be a bad idea
18:45:48FromDiscord<Yardanico> For compressing data?
18:46:01FromDiscord<Yardanico> @Araq we have pure Nim snappy compression
18:46:04*Zectbumo joined #nim
18:46:42federico3I wonder what's the level of redundancy of a binary-packed AST
18:47:00FromDiscord<Yardanico> https://github.com/status-im/nim-snappy and https://github.com/guzba/supersnappy
18:48:05FromDiscord<Yardanico> Second one has no dependencies outside of the stdlib
18:48:54Araqfederico3, reduced by a factor of 4, iirc
18:49:52*a_chou joined #nim
18:50:20federico3then I wonder what AST structures are most common
18:50:37Araqdot expressions and function calls
18:56:07*aenesidemus quit (Quit: Leaving)
19:09:54ZevvAraq: how is this "wow"?
19:10:51Araqproc `+`*(p: Patt): Patt =
19:10:51Araq result.add p
19:10:51Araq result.add *p
19:11:14Araqfeels strange to me but ok
19:11:32Zevvhaha
19:11:42Zevv'*p' is 'zero or more'
19:11:57Zevv'+p' is 'one or more'. So that's first one, followed by zero or more
19:12:00Zevvmakes perfect sense
19:15:06*kenran joined #nim
19:26:24federico3Araq: zstd makes it easier to share a pregenerated dictionary to compress small chunks of data efficiently
19:40:53ZevvAraq: npeg has no AST, it has an IR that gets recursively built, each operator takes one or more chunks of 'child IR' which gets encapsulated in some more IR, and at the end there's some simple peephole optimizations done.
19:41:05Zevvit's not efficient at all, but it's done at compile time only once.
19:48:09leorize@haxscramper how's your libclang project going?
19:48:13FromDiscord<haxscramper> Because pattern matching is not implemented using keywords mostly (like `all`, `until`, `opt`) and so on, it might be possible to adapt it into some kind of higher-level abstraction while retaining all syntax. Like `linq` for exampl
19:48:56FromDiscord<haxscramper> > @haxscramper how's your libclang project going?↵@leorize Clang itself is usable, right now I'm writing own wrapper generator to find out missing parts in the API↵Basically trying to provide helper procs that will make C++ less horrible to work with↵But parsing itself is done completely
19:51:19leorizethat's nice \o/
19:51:35leorizehopefully this can be made into a nimterop backend or as a standalone tool
19:52:15*rockcavera joined #nim
19:52:16*kenran quit (Ping timeout: 260 seconds)
19:54:06FromDiscord<shashlick> i was just chatting with @haxscramper about it
19:54:13FromDiscord<shashlick> one less thing for me to worry about 😉
19:55:44*narimiran quit (Ping timeout: 256 seconds)
19:56:37*superbia joined #nim
19:56:39*superbia quit (Client Quit)
19:58:25FromDiscord<haxscramper> > hopefully this can be made into a nimterop backend or as a standalone tool↵Most likely a nimterop backend, because this way we would have to deal with C++ build """"system"""" only once (like nimterop already has integration with conan)
19:58:40FromDiscord<haxscramper> Although right now I can't handle macros *at all*
19:59:02FromDiscord<haxscramper> E,g. can't wrap macros
20:04:13leorizeisn't there a way to access macros from clang ast?
20:07:38FromDiscord<haxscramper> no
20:08:18FromDiscord<haxscramper> There are preprocessor callbacks in libtooling, but you can't just access macros
20:08:31leorizehttps://github.com/niosus/EasyClangComplete/issues/251
20:08:32disbotNo tooltips available for macros
20:08:38leorize^ so I found that
20:09:13leorizelooks like if you pass PARSE_DETAILED_PROCESSING_RECORD then clang will encode MACRO_DEFINITON/MACRO_INSTANTIATION to the AST
20:15:04*NimBot joined #nim
20:15:36*livcd quit (Ping timeout: 272 seconds)
20:17:00*livcd joined #nim
20:20:06FromDiscord<Yardanico> WinXP sp1 source got leaked lol
20:20:14FromDiscord<Yardanico> real this time
20:20:15FromDiscord<haxscramper> leorize: Looks *really* interesting, thanks a lot
20:20:33Prestigedoes it matter now Yardanico ? lol
20:20:43FromDiscord<Yardanico> yes
20:21:08FromDiscord<Yardanico> you think that there are no companies running win xp now?
20:21:16FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/758785129459744858/20200924_232023.jpg https://media.discordapp.net/attachments/371759389889003532/758785129958604830/20200924_232025.jpg https://media.discordapp.net/attachments/371759389889003532/758785130130047026/20200924_232027.jpg
20:21:20FromDiscord<Yardanico> From one of the people in telegram
20:21:23FromDiscord<Rika> its their fault if theyre still running it
20:21:27Prestige^
20:21:45FromDiscord<Elegant Beef> Hospitals tend to run older software due to the tech and support
20:21:46FromDiscord<haxscramper> I have some windows version that predates *95* on some computers in my university
20:22:12FromDiscord<haxscramper> the computer is so old I could literally hear how it is saving my files
20:22:19Prestigelmao
20:22:48FromDiscord<haxscramper> And I'm not joking in the slightest, I really heard the hard drive noises on each Ctrl-S
20:23:46FromDiscord<Yardanico> Well you can hear that on modern PCs too
20:23:50FromDiscord<Yardanico> With an old hdd
20:24:43FromDiscord<haxscramper> <@!208199869301522432> are you familiar with active patterns in F# - I'm mostly interested in how they can be used for matching sequences. If you have any recommendations/links for it? Aside from default google search. I'm not familliar with `F#`, so maybe you can recommend something
20:24:50FromDiscord<haxscramper> For pattern matching
20:27:58*gour_ quit (Remote host closed the connection)
20:29:53*natrys quit (Quit: natrys)
20:31:27FromDiscord<haxscramper> sent a long message, see http://ix.io/2yDd
20:32:11AraqZevv, https://github.com/nim-lang/Nim/pull/15320 makes your npeg fail, any help would be appreciated
20:32:12disbotfixes #14983
20:32:25Araqmy toy example now works but it fails for your real-world code
20:32:28Araqgood night
20:32:48FromDiscord<haxscramper> Although if you help with tree construction it would be extremely good, because then I will be able to plug the whole thing into parser generator and we would get parser for ambiguous/left-recursive grammars
20:34:10FromDiscord<haxscramper> If I understand correctly Earley parser is one of the best algorithms in terms of grammars it can handle
20:34:49FromDiscord<haxscramper> And the article in question is http://loup-vaillant.fr/tutorials/earley-parsing/parser
20:35:21Zevvso the only change is the `move`, right
20:44:10*smitop joined #nim
20:49:41*mmohammadi9812 quit (Quit: I quit (╯°□°)╯︵ ┻━┻)
20:50:44*solitudesf quit (Ping timeout: 260 seconds)
21:34:49*a_chou quit (Ping timeout: 265 seconds)
21:34:56*Kaivo quit (Ping timeout: 258 seconds)
21:37:17*Kaivo joined #nim
21:41:50*Trustable quit (Remote host closed the connection)
21:43:10*a_chou joined #nim
21:54:57FromDiscord<Avatarfighter> What's good everyone
21:55:19FromDiscord<Avatarfighter> I may or may not be bored and without something to do so if anyone has a project and needs a partner lmk 👍
22:25:13*apahl quit (Ping timeout: 260 seconds)
22:25:57*apahl joined #nim
22:31:46*a_chou quit (Ping timeout: 272 seconds)
22:34:48*abm quit (Read error: Connection reset by peer)
22:38:07FromDiscord<Elegant Beef> Help me waste time making a js nim wrapper 😛
22:38:42FromDiscord<Elegant Beef> My stupid single file parser sorta works https://play.nim-lang.org/#ix=2yDC
23:24:03*opal quit (Ping timeout: 240 seconds)
23:36:12*a_chou joined #nim
23:38:22*opal joined #nim
23:39:11*gmaggior quit (Quit: Leaving)