<< 30-07-2020 >>

00:08:45*vicfred quit (Quit: Leaving)
00:09:29FromDiscord<Kiloneie> Wau, Windows 10 is a douche bag, had to run finish.exe as admin on a clean copy, any other way would not add the compiler to path... whatever...
00:12:14*bung_ quit (Quit: Lost terminal)
00:13:40skrylar[m]xD
00:13:59skrylar[m]speaking of bags. i never heard back from the nim maintainer on alpine.
00:14:06skrylar[m]i sent them updated build scripts
00:21:39FromDiscord<Varriount> shashlick: Is it possible to send toast input to wrap via stdin?
00:40:28*maier joined #nim
00:45:49*maier quit (Ping timeout: 264 seconds)
01:15:52*apahl quit (Ping timeout: 260 seconds)
01:17:29*apahl joined #nim
01:20:06*Zectbumo_ quit (Remote host closed the connection)
01:21:12shashlickNot yet but we could add it
01:21:20*Zectbumo joined #nim
01:24:39*krux02_ quit (Remote host closed the connection)
01:30:03*audiofile quit (Quit: Default Quit Message)
01:34:16*Tongir joined #nim
01:36:34*Tlanger quit (Ping timeout: 246 seconds)
01:49:16*vicfred joined #nim
02:06:59*muffindrake quit (Ping timeout: 272 seconds)
02:08:34*muffindrake joined #nim
02:13:47*dadada joined #nim
02:14:12*dadada is now known as Guest30360
02:20:48*Zectbumo quit (Remote host closed the connection)
02:22:05*Zectbumo joined #nim
02:27:56rockcaverais the compiler inference for "int64" instead of "int" correct? https://play.nim-lang.org/#ix=2sCL
02:36:21*zacts quit (Quit: WeeChat 2.8)
02:41:20*maier joined #nim
02:44:37FromDiscord<Yardanico> Yes
02:45:17FromDiscord<Yardanico> -2147483647 is the least possible int32
02:45:31FromDiscord<Yardanico> -2147483648 wouldn't fit in int32
02:46:13*lritter quit (Ping timeout: 240 seconds)
02:46:22*maier quit (Ping timeout: 260 seconds)
02:46:55*lritter joined #nim
02:48:40*thomasross quit (Ping timeout: 246 seconds)
02:53:00*NimBot joined #nim
03:02:38FromDiscord<Anuke> that's interesting, because in Java `-2147483648` is a valid int32 value https://media.discordapp.net/attachments/371759389889003532/738230034820759642/unknown.png
03:03:03rockcaverain Nim -2147483648 is a valid int32
03:03:23rockcaveraecho low(int32) = -2147483648
03:03:41FromDiscord<Anuke> https://play.nim-lang.org/#ix=2sCL
03:04:27FromDiscord<Anuke> ah, the `-` gets evaluated afterwards
03:06:37rockcaveraHowever, the issue is not whether or not it is a valid int32, but the fact that the compiler is using the wrong type inference. I believe that the compiler type inference should be for "int", even though the value is higher than an int32, because int, in Nim, is according to "architecture"
03:08:14rockcaverahttps://nim-lang.org/docs/manual.html#lexical-analysis-numerical-constants
03:08:35rockcavera"This integer type is int if the literal is in the range low(i32)..high(i32), otherwise it is int64."
03:09:51rockcaveraEither the documentation is wrong or it is a bug.
03:15:00FromDiscord<Elegant Beef> I think it's a bug
03:15:11FromDiscord<Elegant Beef> 2^31 is the 8 ending value
03:19:26rockcaverahttps://github.com/nim-lang/Nim/issues/15119
03:19:28disbotWrong type inference ; snippet at 12https://play.nim-lang.org/#ix=2sEX
03:53:37*rockcavera quit (Remote host closed the connection)
03:55:15FromDiscord<Varriount> Yardanico: What are you currently working on?
03:55:20Yardaniconothing :P
04:06:02*supakeen quit (Quit: WeeChat 2.8)
04:06:45*supakeen joined #nim
04:16:53*ForumUpdaterBot quit (Remote host closed the connection)
04:17:02*ForumUpdaterBot joined #nim
04:26:44*waleee-cl quit (Quit: Connection closed for inactivity)
04:42:12*maier joined #nim
04:42:28*andrew_ joined #nim
04:44:12*andrew_ is now known as andrew[43]
04:44:49*dzamo joined #nim
04:47:05*maier quit (Ping timeout: 240 seconds)
05:09:37*maier joined #nim
05:09:57*narimiran joined #nim
05:23:00*lbart quit (Ping timeout: 256 seconds)
05:25:46*lbart joined #nim
05:25:47*lbart quit (Changing host)
05:25:47*lbart joined #nim
05:29:56*bunbunbunbunny joined #nim
05:33:06*arecacea1 quit (Remote host closed the connection)
05:33:58*arecacea1 joined #nim
05:48:04silvernode[m]Good morning
05:48:15*solitudesf joined #nim
05:51:08FromDiscord<Elegant Beef> Hello
05:52:54*letto quit (Quit: Konversation terminated!)
05:54:19silvernode[m]So I've been using Element as my IRC client lately instead of weechat, irssi, hexchat or konversations. So far it has been working very well. I'm not sure if the IRC bridge for Matrix still has any of the issues that I have heard about for the last couple of years but I haven't noticed any.
05:54:41Yardanicothe Matrix->Freenode bridge still crashes from time to time
05:54:42*letto joined #nim
05:54:52Yardanicoyou can notice it if you have join/leave messages enabled in IRC :)
05:55:23Yardanicoalso I don't like Element because it's Electron
05:55:41Yardanicoand the default matrix server is usually overloaded
05:55:56silvernode[m]hmm, I gues I should keep an eye on that. I still want to host my own synapse server but so far it seems to be python based which I would rather not use.
05:56:32silvernode[m]I was hoping there was a Rust based version or something not interpreted
05:56:34Yardanicoyou can use Quassel for IRC if you want logs :) you can host quassel server anywhere you want
05:57:07*letto quit (Client Quit)
05:57:50icyphoxsilvernode[m]: Isn't there? It's called conduit.
05:58:25icyphoxAlso, ZNC works perfectly fine. :)
05:58:40Yardanicowell, I don't want to use some other services so I will need to share my password with them :)
05:58:42silvernode[m]<icyphox "silvernode: Isn't there? It's ca"> I haven't really looked to hard for alternatives but conduit seems to be what I am looking for.
05:58:58*letto joined #nim
05:58:58silvernode[m]> <@freenode_icyphox:matrix.org> silvernode: Isn't there? It's called conduit.
05:58:58silvernode[m] * I haven't really looked too hard for alternatives but conduit seems to be what I am looking for.
05:59:07icyphoxYardanico: ZNC is self-hosted...
05:59:15Yardanicoicyphox: so can be quassel :)
05:59:17YardanicoI host it on my VPS
05:59:30icyphoxAh cool.
05:59:36icyphoxWhatever works. :)
05:59:40Yardanicoit has mobile clients too
05:59:53icyphoxI just use Revolution IRC on Android.
06:00:12icyphoxTBH, not a big fan of bridging Discord/Gitter/Matrix -> IRC.
06:00:20FromDiscord<Elegant Beef> Are there any good matrix clients with good VOIP? 😄
06:00:32Yardanicoicyphox: well, otherwise we'd have more split communities
06:00:34Yardanicowhich is bad
06:00:45icyphoxFrom my experience, Matrix's VOIP is just Jitsi Meet.
06:00:57FromDiscord<Elegant Beef> Ah so no
06:01:07FromDiscord<Elegant Beef> Jitsi is just such a bad voip solution
06:01:10Yardanicowe have more and more discord users nowadays
06:01:12icyphoxYardanico: Yeah true. It's just the freetard in me speaking, heh.
06:01:16icyphoxUnfortunately.
06:01:30Yardanicoicyphox: if there was a good open-source discord alternative, people would've used it :)
06:01:35icyphoxBeef: Not really. Works perfectly fine.
06:01:40Yardanicowith same ease of creating your own servers for free and without charge
06:01:58FromDiscord<Elegant Beef> It's not a case of working it's a case of not being a seemless experience
06:02:23FromDiscord<Elegant Beef> With element atleast the embedded jitsi didnt work when i tested it
06:02:31FromDiscord<Elegant Beef> I had to open up the browser to have it work
06:02:32icyphoxDunno, I use it on the daily @ work.
06:07:48silvernode[m]I hate Discord but I understand why it's popular.
06:07:58Yardanicoexactly :P
06:09:20FromDiscord<Elegant Beef> Eh i also hate discord but the alternatives arent of acceptable quality imo
06:09:27Yardanicoyou could use it less :)
06:09:33Yardanicoe.g. for nim you could just use an IRC client
06:09:45FromDiscord<Elegant Beef> I mean i suppose, but eh
06:10:53FromDiscord<Elegant Beef> Wonder if we could abuse the element js intergration to get a voip solution i dont find appalling 😄
06:11:35YardanicoDiscord is JS as well
06:11:42YardanicoI mean client-side
06:11:52FromDiscord<Elegant Beef> Element lets you add on web apps to the chat
06:11:56FromDiscord<Elegant Beef> widgets iirc
06:12:10silvernode[m]So I have been trying to successfully use the optParser proc but as far as I can tell there is only one solid example of how to use it. I get the concept, it's just the syntax that trips me up. All I want to do is take arguments and then run a shell command. A package manager wrapper is what I am going for.
06:12:25silvernode[m]parseOpt proc rather
06:12:30Yardanicosilvernode[m]: what is the problem you're having exactly?
06:12:45YardanicoNim compiler is a good complex example of parseopt usage :)
06:12:50silvernode[m]<Yardanico "silvernode: what is the problem "> getting it to work at all.
06:13:05Yardanicowell, you have to be more specific
06:13:50Yardanicoand btw, what parseOpt proc you're talking about?
06:14:12Yardanicohttps://nim-lang.org/docs/parseopt.html#initOptParser%2Cstring%2Cset%5Bchar%5D%2Cseq%5Bstring%5D this is the usual place you'd pass your arguments to
06:14:48silvernode[m]<Yardanico "well, you have to be more specif"> I'll get back to on that. this is something I am coming back to after a few months so I need to mess with it again more but I just wanted to see if any of you had some working examples that I can use as a base.
06:15:05Yardanicothe ones in parseopt docs are working
06:15:22Yardaniconot sure what "parseOpt" you're talking about though
06:15:30FromDiscord<Elegant Beef> think they meant module
06:15:31Yardanicothere's no such proc, but there's a "parseopt" module
06:15:56silvernode[m]<Yardanico "the ones in parseopt docs are wo"> You know, I think I just realized the issue I was having with it. Going to try again real quick.
06:16:00Yardanicosee e.g. the example here https://nim-lang.org/docs/parseopt.html#getopt.i,OptParser
06:16:14FromDiscord<Elegant Beef> It seems relatively simple to use, you import os and parseopt init a parseopt with the commandLineParams() then iterate using getopt
06:16:38FromDiscord<Elegant Beef> sorry init a opt parser
06:16:49Yardanicothere are also docopt and cligen
06:17:12silvernode[m]Is the example in the docs a recommended way to use it or should I not copy pasta the example code and modify it?
06:17:25Yardanicowhy would it be not a recommended way to use it?
06:18:05Yardanicousually doc examples are meant to represent the usual usage of something :)
06:18:15silvernode[m]<Yardanico "why would it be not a recommende"> I don't know, I am just used to people telling me that example code is generally not what I should rely on.
06:18:22Yardanicoweird
06:18:23FromDiscord<Elegant Beef> Uhh
06:18:25FromDiscord<Elegant Beef> Yea
06:18:32FromDiscord<Elegant Beef> Example code is there for you to understand and use
06:18:36*letto quit (Read error: Connection reset by peer)
06:18:54*letto joined #nim
06:19:05*dddddd quit (Ping timeout: 240 seconds)
06:19:36FromDiscord<Elegant Beef> Example code that doesnt explain how to use something isnt example code it's pseudo code 😄
06:25:01silvernode[m]I am trying to figure out how to make the example print out the argument that I give it, instead of what it prints out by default. Looking at the example, my brain can't figure out why it's not doing what I want.
06:25:11Yardanico??
06:25:25FromDiscord<Varriount> Which example?
06:25:34silvernode[m]https://nim-lang.org/docs/parseopt.html
06:26:39FromDiscord<Elegant Beef> Silvernode this is what you'd want then↵https://play.nim-lang.org/#ix=2sFA
06:26:47Yardanicosilvernode[m]: I just modified the minimal getopt example a bit - https://play.nim-lang.org/#ix=2sFB
06:27:14FromDiscord<Elegant Beef> Hmm i swear i've seen something similar before yard 😄
06:27:49silvernode[m]Ohhhh! That's the bit I needed to change, it makes a lot more sense now. I knew I needed to do that but wasn't sure how. Thanks
06:28:01*letto quit (Quit: Konversation terminated!)
06:28:04FromDiscord<Elegant Beef> Look at the initOptParser parameters
06:28:09*dddddd joined #nim
06:28:15FromDiscord<Elegant Beef> It takes in a `seq[TaintedString]`
06:28:15silvernode[m]The values were static which was my issue.
06:28:36silvernode[m]<FromDiscord "<Elegant Beef> It takes in a `se"> I'll take a look
06:32:12*letto joined #nim
06:33:49silvernode[m]Ok so now I need a portable way to run shell commands from within Nim.
06:34:39silvernode[m]there are various ways to run os commands on the shell in nim but which way would you guys recommend?
06:34:50Yardaniconot sure if it works for windows, but
06:34:50Yardanicohttps://github.com/Vindaar/shell
06:35:31ForumUpdaterBotNew thread by Serge: Channel is not recognised by VS Code plugin, see https://forum.nim-lang.org/t/6620
06:36:07silvernode[m]<Yardanico "">https://github.com/Vindaar/shell"> This looks really easy to use, thanks a lot
06:39:17Yardanicopeople blaming extensions when they didn't do the configuration :(
06:39:20Yardanicoabout that channel thread
06:42:29*krux02 joined #nim
06:47:50*bunbunbunbunny quit (Quit: leaving)
06:57:27FromDiscord<Elegant Beef> At this point it should throw a warning if it doesnt detect a config with threads on in it 😄
06:57:33Yardanicono
06:57:41Yardanicothen should we do it for literally everything?
06:58:07Yardanicoit maybe should be in the FAQ for the extension, sure
07:00:32FromDiscord<Elegant Beef> I was half joking but if it could create a warning for anything that requires a switch it'd be more explicit on what needs to be done, and it seems that is something many people need to be told
07:00:39FromDiscord<Elegant Beef> Cause apparently the threads docs are hard to read 😄
07:00:57Yardanicoif people can't properly read docs, this is not gonna help them :)
07:10:48FromGitter<tulayang> The runtime ``--gc:arc`` says that it offers a shared heap. So, is there still a thread-local heap when using this runtime? When using ``--gc:arc``, I found that the memory allocated by ``alloc0()`` is not reclaimed when the thread exits. Is the memory allocated by ``alloc0()`` in a shared heap?
07:11:08Yardanicoyou can always use allocShared to allocate in the shared heap, no?
07:11:14Yardaniconot sure about that alloc0 though
07:12:16FromGitter<tulayang> Yes, I know ``allocShared`` allocate in a shared heap.
07:15:10FromGitter<tulayang> I just want to confirm whether or not there is still a thread-local heap when using ``--gc:arc``?
07:34:03Araq--gc:arc --threads:on means every allocation is global and not thread-local
07:34:37Araqhowever, you need to be careful with the refcounting, use Isolated[T] and read the RFC please
07:34:57Araqhttps://github.com/nim-lang/RFCs/issues/244
07:34:58disbot'isolated' data for Nim ; snippet at 12https://play.nim-lang.org/#ix=2sjf
07:38:41Yardanicourgh that's why I sometimes don't like isolated communities
07:39:02Yardanicoin a small russian telegram chat "about nim" (but there's almost never actual talk about nim) people are arguing if nim is a compiler or a "transpiler" again
07:39:58Araqlol so what
07:40:16*Tlanger joined #nim
07:41:19AraqNim is a transpiler as much as C-front is a preprocessor.
07:41:36Araqthings never change, people don't understand compilers
07:41:58Araqand come up with words where the wikipedia definition makes no sense
07:42:38Oddmongertranspiler mess up people head
07:42:54Oddmongernow let's talk about gnu as backend :]
07:43:02*Tongir quit (Ping timeout: 256 seconds)
07:43:13Araqprogramming alchemy, we're living in dark ages
07:43:24FromDiscord<Rika> oh man not transpiler talk again
07:43:29Yardanicojust bundle clang with nim (the license allows), and boom, these transpiler people are happy :P
07:43:33Yardanicojust hide the C from them
07:43:40FromDiscord<Rika> whos resetting the days-without-transpiler-argument counter
07:43:50Yardaniconah, it's not here
07:43:59OddmongerYardanico: just alias gcc to cat
07:44:12Araqgcc transpiles C to asm
07:44:18Yardanicoexactly
07:44:20Araqwe all know it to be true
07:45:53Oddmongerhumm… true, there is an IL for that
07:48:05*andrew[43] quit (Ping timeout: 240 seconds)
07:49:23AraqYardanico, but we do bundle gcc with Nim on Windows kind of and for other OSes we use what is available
07:49:36Araqif you cannot install Nim you're not much of a software developer
07:50:40*andrew_ joined #nim
07:50:57Araqin fact, we used to bundle mingw with Nim directly. but it creates much larger downloads and every time you update nim you have to redownload what didn't change
07:52:03*D_ quit (Remote host closed the connection)
07:52:58*D_ joined #nim
07:54:37Yardanicoheh, I'm also reading a long forum thread about nim vs d, and there was a mention about count of repos on github
07:54:43Yardanico"GitHub has total_count of 280 Red projects, compared to 3,115 for Nim / 10,325 for D." from apr 2019
07:54:52Yardaniconow it's 4843 for nim and 11578 for D
07:55:08ZevvI can whip up a script to generate a bunch more, if you want
07:55:13Yardanicolol
07:55:32Yardanicocrystal has 5821 huh
07:56:02Araqso what? I know D is still more popular
07:56:13Yardanicono, just good growth of Nim :)
07:58:25FromGitter<bung87> nim users 476
07:58:32Yardanicowat? :P
07:58:51FromGitter<bung87> https://github.com/search?q=language%3Anim&type=Users
07:58:56Yardanicoit's not full
07:58:59FromDiscord<Elegant Beef> Remember kids mandarin is the most common language
07:59:20*Zectbumo quit (Remote host closed the connection)
07:59:39FromGitter<bung87> doesn't be english?
07:59:40Yardanicoit has a ton of dialects though
07:59:52Yardanico@bung87 no, "mandarin" (if you count all dialects of it) is almost 3 times more popular
08:00:28Yardanicofound a more updated article though, might be actually more real
08:00:29Yardanicohttps://www.visualcapitalist.com/100-most-spoken-languages/
08:00:35*Zectbumo joined #nim
08:00:38Yardanicothe thing is that most people in India speak english too
08:00:39*Zectbumo quit (Remote host closed the connection)
08:00:47Yardanicoat least a bit of it
08:01:29FromGitter<bung87> well , speaking is different hah
08:01:30Yardanicobut by native speaker count Mandarin surely wins
08:01:39Araqwow
08:01:46Yardanicohttps://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers
08:01:49ForumUpdaterBotNew thread by Wt: Whether or not there is still a thread-local heap when using --gc:arc?, see https://forum.nim-lang.org/t/6621
08:01:51Araqthat graph for "Japanic" is nice
08:02:09Yardanicohaha
08:02:12AraqJapanic ------------------> Japanese
08:02:26Yardanicowell Japan was in isolation throughout most of it's history :P
08:02:56FromDiscord<Rika> isnt it Japonic
08:03:10FromDiscord<Rika> japan is still very isolated compared to many countries
08:03:35Araqno offspring, no evolution, omg, it must be a bad language! Probably they still lack words for "computer" and "sex"
08:04:04Yardanicowell as far as I know Japanese want more westernization
08:04:14Araqwell I'm kidding
08:04:27FromDiscord<Rika> it's obvious, dw
08:08:11*nikita` joined #nim
08:14:55Yardanicook, next failing (with arc) nimble package on my list is "ptrace.nim"
08:24:00Yardanicoreproduced that one, not sure if a bug
08:24:15Yardanicobasically - you can apparently have a proc which returns "cstring" but initialize result in it as "result = newString(32)"
08:24:26Yardanicoand it works correctly with refc, but with arc you get an empty string
08:24:51Yardanicoactually not empty, you get a string with a single character - " in it lol
08:25:48Yardanicohttps://play.nim-lang.org/#ix=2sFV
08:26:35FromDiscord<Varriount> @shashlick: Have you ever though about running nimterop through a fuzzer?
08:26:43Yardanicowould that really help?
08:26:50Yardanicoit's better to test on real projects imo :)
08:27:11FromDiscord<Varriount> Yardanico: It would help find inputs that cause the program to crash.
08:27:22Yardanicobut is that really a priority?
08:27:35Yardanicoyou could make a fuzzer for nim's compiler to file tens of issues for "crashes" :)
08:27:43Yardanicobut all of these would be low priority
08:28:28FromDiscord<Varriount> So what your saying is, finding low-priority bugs has no value?
08:28:44Yardanicoit has value certainly
08:29:10Araqspamming our issue tracker even moreso certainly has negative value
08:29:33Araqif you create a separate issue tracker for these bugs I wouldn't mind
08:29:54Yardanicowell, Varriount talks about nimterop mostly, it was me who made an example with Nim :)
08:29:57FromGitter<bung87> `sleepAsync(0)` is close to go's `runtime.Gosched()` ?
08:30:20FromDiscord<Varriount> Araq: I was talking moreso about Nimterop. It's crashing when parsing some headers from the Windows SDK
08:30:33Araqah ok, I'm sorry
08:30:42Araqbut using a fuzzer for Nim did come up in the past
08:34:20YardanicoAraq, so is https://play.nim-lang.org/#ix=2sFV returning a string with " valid behaviour for ARC?
08:34:20FromDiscord<Varriount> Araq: I'll add "setup an EC2 instance for fuzzing Nim" to my list. 😄
08:34:29Yardanicoi was surprised you could do that honestly (newString and return type as cstring)
08:34:48Araqnope, invalid code
08:34:51Yardanicook
08:35:09Araqgood thing I'm working on a borrow checker :P
08:35:30Araq(cursor inference is borrow checking)
08:35:55Araq(and it need to do mutation analysis)
08:35:57ForumUpdaterBotNew thread by Serge: String interning (seen on Github) : Is it good? has anybody been using it?, see https://forum.nim-lang.org/t/6622
08:36:32Araq(it's almost like I know what I'm doing.)
08:38:18Yardanicohttps://github.com/ba0f3/ptrace.nim/pull/2
08:38:19disbotFix invalid return type in getData
08:38:26Yardaniconext one on my list is "bencode"
08:43:03Yardanicohrm, the test fail here is not caused by cursor inference :P
08:46:25FromDiscord<Clyybber> Araq: Does the optInd in the parser stand for 'optional Indentation'?
08:46:34Araqyes
08:47:19FromDiscord<Clyybber> sent a long message, see http://ix.io/2sFY
08:47:31FromDiscord<Clyybber> Doe s this patch make sense then?
08:48:14FromDiscord<Clyybber> sent a long message, see http://ix.io/2sFZ
08:48:29FromDiscord<Clyybber> currently you need the outer braces too
08:49:09Araqthe patch is bad
08:49:15Araq 4 +
08:49:18Araq 5
08:49:22Araqshouldn't compile
08:49:25Araqit needs to be
08:49:28Araq 4 +
08:49:30Araq 5
08:49:55FromDiscord<Yardanico> damn sorry discord bridge ate leading spaces here 😛
08:49:59FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/738317452600934400/unknown.png
08:50:16Araqyou can special case the allowed indentation before parenthesis, maybe
08:50:44Yardanicoah actually I don't think it's the bridge, Discord itself doesn't allow leading spaces lol
08:50:52Yardanicoit just strips them out
08:52:00*Vladar joined #nim
09:04:23*andrew_ quit (Ping timeout: 265 seconds)
09:12:55Yardanicooh lol this one is interesting (the bencode issue)
09:13:23Yardanicoit somehow "forgets" value of the seq
09:13:36Yardanicosame behaviour with arc from a month ago
09:14:01Yardanicomaybe due to changed tables stuff, hmm
09:17:01Yardanicohttps://github.com/nim-lang/Nim/issues/15121 urgh
09:17:02disbotFlutter bindings for Nim
09:22:36FromDiscord<Varriount> Yardanico: If you place a zero-width character before the line, discord doesn't eat the spaces.
09:23:54Yardanicoyes
09:23:57Yardanicobut I consider that as a hack :P
09:24:11Yardanicoalthough in my IRC -> Markdown formatter I insert a zero-width space as well between the entries
09:24:17Yardanicobut it's not yet live
09:24:23FromDiscord<Varriount> But if there's no other way...
09:25:33Yardanicowell I might consider adding this, sure
09:25:53Yardanicobut let me first check if it would really be possible
09:26:41Yardanicowell I don't think it would really be possible since I also do some word-based processing
09:34:07*dzamo[m] left #nim ("User left")
09:36:29YardanicoLOL that bencode issue is certainly very weird
09:36:37Yardanicoit works when I remove one of the branches in the object variant
09:37:16Yardanicohttps://github.com/nim-lang/Nim/issues/15122
09:37:18disbot[ARC] Sequence "disappears" with a table inside of a table with an object variant ; snippet at 12https://play.nim-lang.org/#ix=2sG6
09:37:24*vicfred_ joined #nim
09:40:25*vicfred quit (Ping timeout: 264 seconds)
09:40:35Yardanicoit's probably something tables-related
09:42:36Yardanicooh it worked 1 month ago
09:42:38Yardanicotime for git bisect :P
09:45:31Yardanicouh-oh
09:45:42Yardanicobisect said that the first bad one is the https://github.com/nim-lang/Nim/pull/15095 PR
09:45:43disbotfixes #15076
09:45:45Yardanicostrange
09:51:32Yardanicook, next package - cassette (recording and replaying HTTP sessions for testing)
09:51:50Yardanicofails because it has a "dispose" proc for two of it's types, and it conflicts with ARC's "dispose" in system :P
10:02:19FromDiscord<dom96> oof, sounds like a breaking change
10:04:26ZevvAARGH I *hate* this
10:04:36ZevvI do a large writeup in some online web app like github
10:04:39Zevvspend two hours there
10:04:48Zevvand halfway through the day my tab is gone
10:04:54Zevvand I didn't commit or whatever
10:05:04Yardanico:/
10:05:10FromDiscord<Varriount> Write in a text editor first
10:05:12YardanicoI use telegram as my "temp buffer" to save work in case something happens lol
10:05:14Yardanicoor a text editor
10:05:47Zevvyeah I *always* do that
10:05:49Zevvexcept for today
10:05:50Zevvsigh
10:05:54FromDiscord<Varriount> Zevv: My sympathies though, it is really annoying
10:06:15ZevvI seme to have some leftovers in some magic file in my firefox profile, 'jsonlz4' format
10:06:23Zevvhow do I open that :/
10:06:33FromDiscord<dom96> Life pro-tip: install a keylogger, that way you'll never lose what you write lol
10:06:42Yardanicolz4 decompress ?:P
10:06:44Yardanicoand then it's a json
10:06:51Zevvjaah too bad
10:06:59Yardanico7zip should work just fine
10:07:00FromDiscord<Varriount> Zevv: From the name, it might be a gzipped JSON file?
10:07:03Yardanicop7zip on linux
10:08:24FromDiscord<Zed> are there an decent resources for embedded programming with nim?
10:09:07YardanicoI mean on latest releases it ain't so hard :P
10:09:23Yardanicoyou can start by trying --os:any --gc:arc -d:useMalloc --panics:on
10:09:35Yardanicoif your embedded platform has a C compiler with a C stdlib of course
10:11:16*lritter quit (Quit: Leaving)
10:11:18FromDiscord<Zed> im planning on using something like a teensy or pro micro
10:11:45FromDiscord<Zed> ill have to play around with it
10:13:34*Vladar quit (Read error: Connection reset by peer)
10:13:43*opal quit (Ping timeout: 240 seconds)
10:14:02Yardanicook, ad fails because of finalizers in the "bignum" nimble lib which are just bindings to gmp, but they're very old
10:14:09Yardanicothere's even "import unsigned"
10:16:08*opal joined #nim
10:17:09ZevvJess, found my stuff in firefox's dungeons
10:17:13Yardaniconoice
10:17:37FromDiscord<dom96> oh cool, you should write a little utility that helps recover this sort of thing
10:17:47FromDiscord<dom96> (or a blog post with instructions on how to do it)
10:18:05ZevvSomeone did
10:18:08Zevvso I put my stuff in
10:18:14Zevvand a huge json blob came out
10:19:13*Vladar joined #nim
10:21:58FromDiscord<Varriount> What did the utility do?
10:22:08FromDiscord<Varriount> Can you give us a link?
10:43:48*andrew joined #nim
10:46:11Zevvhttps://www.jeffersonscher.com/ffu/scrounger.html
10:46:22ZevvI just trusted this guy and send him my whole file
10:46:45YardanicoI don't think you really uploaded it
10:46:47Yardanicoit's client-side
10:46:51Yardanicocheck the js files
10:46:54Zevvif it looked any slicker i wouldn't have trusted it. But the bare-boneness of it made me trust it
10:46:57ZevvI know
10:47:08ZevvBut then again, could you check all of it in a minute or two?
10:47:16Yardanicojust load the page
10:47:20Yardanicoand disconnect from the internet
10:47:24Zevvyeah yeah
10:47:48Zevvthen it will create one of these background js services and send it tomorrow when I'm not looking
10:47:53Zevvthere's a whole os in my browser
10:47:55Yardanicolol
10:49:17FromDiscord<Clyybber> sent a long message, see http://ix.io/2sGp
10:49:38Yardanico@Clyybber if your message is longer than 3 newlines it'll be sent as ix.io link :P
10:50:03FromDiscord<Clyybber> Gotcha, shoulda split it
10:50:05YardanicoI mean for pinging people
10:50:22FromDiscord<Clyybber> Araq: Is it intended that this parses fine:
10:50:27FromDiscord<Clyybber> block: (↵ discard;
10:50:32FromDiscord<Clyybber> discard↵ )
10:50:44FromDiscord<Clyybber> now I fucked up..
10:51:01FromDiscord<Clyybber> That *this* parses fine:
10:51:05FromDiscord<Clyybber> block: (↵ discard;↵ discard↵ )
10:54:44FromDiscord<Clyybber> Dammnit, the bridge is killing me :p
10:55:15FromDiscord<Clyybber> Araq: Is it intended that this parses fine http://ix.io/2sGt ?
10:55:37FromDiscord<Clyybber> Seems weird since the indentation for the second discard is off
10:56:18FromDiscord<dom96> use markdown 🙂
10:56:50YardanicoI added irc to markdown and markdown to irc in ircord, but didn't run it as the main bridge yet :)
10:57:00Yardaniconeed to probably add some safe guards so it doesn't go in an endless while loop
10:57:04FromDiscord<lqdev> @Clyybber pretty sure that's intended, try dedenting the second discard below the first one
10:57:08YardanicoI do manual parsing of irc formatting and markdown :D
10:57:13Yardanicofor conversion between them
10:57:23Yardanicostupid, but seemed to work in my testing
10:57:30Yardanicohttps://github.com/Yardanico/ircord/blob/master/src/utils.nim#L24
10:57:38FromDiscord<dom96> sent a code paste, see https://play.nim-lang.org/#ix=2sGu
10:57:41FromDiscord<Clyybber> @lqdev wdym?
10:57:52FromDiscord<Clyybber> I am saying it maybe shouldn't be allowed
10:57:53FromDiscord<dom96> you get a code paste link
10:57:59Yardanicoyes
10:58:03Yardanicoyou get the same with a long message
10:58:08Yardanicomore than 3 lines or more than 500 characters
10:58:18FromDiscord<lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2sGv
10:58:20FromDiscord<lqdev> doesn't work
10:59:02FromDiscord<Clyybber> does
10:59:03FromDiscord<Clyybber> sent a code paste, see https://play.nim-lang.org/#ix=2sGw
10:59:12FromDiscord<lqdev> yeah.
10:59:18FromDiscord<Clyybber> and I'm not sure thats intended
10:59:39FromDiscord<Clyybber> (edit) 'https://play.nim-lang.org/#ix=2sGw' => 'https://play.nim-lang.org/#ix=2sGx'
10:59:52Yardanicopoor bridge gettiing abused :P
11:00:02Yardanicohttps://i.imgur.com/jO6O6Ut.png
11:00:14FromDiscord<lqdev> lol
11:03:21FromDiscord<lqdev> do deques require initialization?
11:03:25FromDiscord<lqdev> doesn't seem like it
11:03:32FromDiscord<lqdev> https://play.nim-lang.org/#ix=2sGB
11:03:36FromDiscord<lqdev> doesn't crash
11:03:50FromDiscord<Clyybber> I think zevv made them not require it
11:03:50Yardanicohttps://github.com/nim-lang/Nim/blob/version-1-2/lib/pure/collections/deques.nim#L68
11:04:02Yardanicoand anyway, seqs were nil before 0.19
11:04:05FromDiscord<lqdev> Yardanico: I have that page open :P
11:04:13*Vladar quit (Quit: Leaving)
11:04:13FromDiscord<lqdev> not sure what the `mask` does
11:04:41*beatmox quit (Ping timeout: 272 seconds)
11:08:25FromDiscord<lqdev> is there any way I can enforce a `move` when a value is passed to a proc's param?
11:08:38Yardanicoenforce?
11:08:51Yardanicohrm
11:09:00Araquse a 'sink' parameter
11:09:01FromDiscord<lqdev> basically I have an `Entity` which is just `distinct int` and an array index
11:09:11FromDiscord<lqdev> and I have a `delEntity` which deletes an entity
11:09:20FromDiscord<Clyybber> Araq: Is it intended that this parses fine http://ix.io/2sGt ?
11:09:22Yardanicoif it's not used afterwards, sink will work just fine
11:09:28FromDiscord<lqdev> ok
11:09:41Yardanicoproc mytest(data: sink int)
11:09:58YardanicoAraq: by the way, is it safe to (ab)use sink when you need to modify the argument inside the proc?
11:10:06Yardanicoso you don't have to wriite "var arg = arg"
11:10:18FromDiscord<Rika> what happens if you have a code block with no newlines? ``` test ```
11:10:29FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/738352807240925184/unknown.png
11:10:35FromDiscord<Rika> lol
11:10:50FromDiscord<Yardanico> ```nim↵echo "hi"↵```
11:10:59FromDiscord<Clyybber> Araq: Because the fact that this parses fine means that this http://ix.io/2sGE/nim doesnt. It thinks I'm trying to pass the echo to discard
11:11:32FromDiscord<Yardanico> The logic is simple: if there are more than 3 newlines and there's \`\`\` - it's a code paste, use play.nim-lang.org (it still uses ix.io). Otherwise give a plain ix.io link
11:11:52FromDiscord<Yardanico> well there's also logic to try to give https://paste.rs link if ix.io didn't work for some reason
11:12:38*dddddd quit (Ping timeout: 256 seconds)
11:13:14*beatmox joined #nim
11:14:25*dddddd joined #nim
11:15:51FromDiscord<Clyybber> Another try, since my messages get lost
11:16:01Yardanicothey don't :P
11:16:12Yardanicomaybe 4raq is busy
11:16:52FromDiscord<Clyybber> I mean get lost in the sea of text
11:17:04FromDiscord<Clyybber> maybe some irc clients don't like the discord prefix
11:17:15*clyybber joined #nim
11:17:27clyybberAraq: The fact that this: http://ix.io/2sGt parses fine means that this: http://ix.io/2sGE/nim doesnt. It thinks I'm trying to pass the echo to discard.
11:17:38clyybberWDYT about disallowing the first example, but then making the second one work instead
11:24:53FromDiscord<InventorMatt> is there a way to zip more than two sequences as the same time?
11:25:11Araqdunno, don't break code. and if you want a more principled approach to indentation based parsing, wait for my RFC...
11:25:57Yardanicoyou have too many unpublished RFCs :P
11:26:55FromDiscord<Clyybber> Araq: I don't think anything actually relies on that behaviour (only really works for discard and some other keywords/calls), but the CIs will tell me
11:26:59Yardanico@InventorMatt seems like zero_functional implements it https://github.com/zero-functional/zero-functional#zip
11:27:50FromDiscord<InventorMatt> thank you
11:28:08Yardanicooh LOL
11:28:14Yardanicozero functional crashes the compiler with arc
11:28:15Yardanicofun
11:30:51*clyybber quit (Quit: WeeChat 2.9)
11:31:30Yardanicowait it now works? dafaq
11:32:17Yardanicoahh. only with -d:dangert
11:32:19Yardanicodanger
11:33:28Yardanicoah no, lol, it only crashes with a single example
11:37:57Yardanicooh it's not related to zero_functional at all
11:38:37Yardanicoohhhhhhh
11:39:54YardanicoAraq: should this work with ARC? https://play.nim-lang.org/#ix=2sGK
11:40:06Yardanicobasically the lib in benchmarks gets the name of the proc by "example0.repr" at compile-time
11:40:15Yardanicoweird but it actually works for refc
11:42:27*Vladar joined #nim
11:52:44FromDiscord<Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=2sGN
11:54:42*andrew quit (Ping timeout: 260 seconds)
11:58:21*rockcavera joined #nim
11:59:06AraqYardanico, meh
11:59:26Araqno idea why it ever worked
12:06:02*supakeen quit (Quit: WeeChat 2.8)
12:06:43*supakeen joined #nim
12:22:14*tsujp joined #nim
12:28:34*andrew joined #nim
12:33:28*tsujp quit (Quit: WeeChat 2.9)
12:37:25*tsujp joined #nim
12:37:43*tsujp quit (Client Quit)
12:38:18*tsujp joined #nim
12:38:40FromDiscord<xsouxsou29> cd ..
12:40:37*vicfred_ quit (Quit: Leaving)
12:40:56*waleee-cl joined #nim
12:45:31*rockcavera quit (Remote host closed the connection)
12:48:34*rockcavera joined #nim
12:52:21*arecacea1 quit (Remote host closed the connection)
12:53:47*arecacea1 joined #nim
12:55:39*endragor joined #nim
13:13:49*endragor quit (Remote host closed the connection)
13:17:17*Vladar quit (Quit: Leaving)
13:24:15*rockcavera quit (Remote host closed the connection)
13:32:18FromDiscord<xsouxsou29> Hello guys 🙂 I'm a datascientist that is very enthousiastic about bringing torch in nim. I know the project already exist but I think it was done with the old API and it is not using nimterop. For those who don't know, torch is a machine learning library with a C++ and a python API 🙂 ↵Do you think I should start from the old project and add the new API ? or is it better to start from scratch with nimterop ?
13:32:59FromDiscord<Rika> look into `arraymancer` if you havent already
13:33:22FromDiscord<Rika> (though i have no answer for your actual question_)
13:34:26shashlickNimterop doesn't support c++
13:35:04FromDiscord<lqdev> yeah, wrapping c++ is a manual process right now
13:35:18FromDiscord<lqdev> though i heard c2nim can parse a large subset of c++, so you may wanna give it a shot
13:35:19Araqwell c2nim does support c++
13:35:33*vicfred joined #nim
13:35:45Araqit was used to wrap Unreal Engine and Urho 3D and wxWidgets
13:36:08Araqit's semi-automatic though and only supports some features of C++11
13:39:43FromDiscord<xsouxsou29> ah ! ok so based on your comments, the second option is very costly
13:42:25shashlickBetter c2nim than hand wrapping
13:43:08shashlickThere's a lot of nuance and for larger libs, it's too much work - better to use tools
13:45:54FromDiscord<xsouxsou29> From what I understood, for c2nim it is better the modify the code of the library you want to wrap. Which can be a bit annoying knowing how much facebook (the owner of pytorch) update and change the lib.
13:48:24*nikita` quit (Quit: leaving)
13:48:30Araqthat's correct but you can wrap a subset, most C++ headers are full of useless junk like declaring uint32 once again
13:48:57Araqand you can diff+patch your modified header against a new header version
13:50:59*Kaivo quit (Ping timeout: 240 seconds)
13:52:59FromDiscord<xsouxsou29> I see your point, you're right it is not such a big deal ! I'll give a try to c2nim 🙂 finger cross
13:53:02FromDiscord<xsouxsou29> (edit) 'cross' => 'crossed'
13:53:06FromDiscord<xsouxsou29> (edit) 'finger' => 'fingers'
13:53:24*Kaivo joined #nim
13:54:35*NimBot joined #nim
14:01:31*Vladar joined #nim
14:15:24ForumUpdaterBotNew thread by Hugogranstrom: SymbolicNim, symbolic algebra in Nim, see https://forum.nim-lang.org/t/6623
14:29:27ForumUpdaterBotNew thread by Digitalcraftsman: How to cast a slice of seq[char] to uint?, see https://forum.nim-lang.org/t/6624
14:36:17*Trustable joined #nim
14:37:27*opal quit (Read error: Connection reset by peer)
14:39:10*opal joined #nim
15:05:37disruptek!last zevv
15:05:38disbotZevv spoke in 12#nim 4 hours ago 12https://irclogs.nim-lang.org/30-07-2020.html#10:47:53
15:05:45disruptekthat's just lazy.
15:06:29Zevvso true
15:06:37Zevvwhat do you want
15:10:16*narimiran quit (Ping timeout: 265 seconds)
15:14:39Zevv!last disruptek
15:14:39disbotdisruptek never seen.
15:16:12disrupteklol
15:16:19disruptekmornin' zevv
15:16:26Zevvafternoon' disruptek
15:16:37Zevvyou're really doing this, right?
15:17:03disruptekprobably.
15:17:08Zevvnice.
15:17:17disruptekwell, did you notice anything strange about #28 code?
15:17:58*endragor joined #nim
15:18:08Zevvwell, there's no cps macro happening?
15:18:13Zevvand ou don't use your `.`
15:18:18disruptekyeah.
15:18:59Zevvyour point being?
15:19:13disruptekwe're back to this idea that the concept is what's important.
15:19:34Zevvoh sure
15:19:36disruptekall we really need to capture is this association of code with data. everything else is irrelevant.
15:19:51Zevvcode is just data, didn't you know?
15:20:05disrupteki had heard something about that, yes.
15:20:33ZevvI think a lot was learned over the last week
15:21:08disruptekisn't `replace(s: string): string` a continuation?
15:21:36Zevvno
15:21:40disruptekwhy not?
15:21:47Zevvit's just a proc
15:22:05disruptekthe data isn't important.
15:22:19disruptekit's the type system's understanding of applicability that is important.
15:22:30disruptekthe type system knows we can apply X to Y and get Z.
15:22:45*maier quit (Ping timeout: 240 seconds)
15:22:45Zevvwhich you should make use of wherever possible
15:22:59Zevvbut it's not a continuation
15:23:06Zevvyou can't stash it away and call it tomorrow
15:23:13disruptekbut that's data.
15:23:18disruptekdata isn't important to us.
15:23:32disruptekdata has nothing to do with this.
15:23:52ZevvI have yet to reach your level of enlightenment on this
15:23:59disruptekthis is all about iterating through a code-flow graph.
15:24:36disruptekwhat is `.next()`? it's literally the result of fn(c).
15:24:49Zevvno, of c.fn(c)
15:24:51Zevvc also holds the fn
15:25:00disruptekyeah, whatever.
15:25:09Zevvit's a difference
15:25:19Zevvbut continue
15:25:58disruptekit's a difference that we can code around.
15:26:00disruptekthat's the key.
15:26:20disruptekwe give you the invisible storage of fn() on your T.
15:26:39Zevvright
15:27:40*Guest30360 is now known as dadada
15:27:47Zevvc.data is T
15:27:51dadadahey nimmers
15:28:02disruptekhow do you do?
15:28:07disruptekfellow nimion.
15:29:16dadadajust learned there's a work in progress JS-2-C++ transpiler https://github.com/NectarJS/nectarjs ... if this ever becomes really good, and there's ever a really great automatic wrapper generator for C++ (for Nim), than we could use a large chunk of Javascript/(and also Typescript) modules/libs in Nim projects
15:29:16Zevvso disruptek, what is your plan
15:29:56dadadathe nectarjs project is currently very active, I wouldn't mention it otherwise...
15:30:28disruptek!repo quickjs4nim
15:30:29disbothttps://github.com/ImVexed/quickjs4nim -- 9quickjs4nim: 11A Nim wrapper for QuickJS 15 8⭐ 0🍴
15:30:41disruptekthat's another way.
15:31:22shashlicklooks like http://json.to is broken on devel
15:31:38disruptekwhat is that?
15:32:01disruptekyer blowin' my mind right now, shashlick.
15:32:06dadadadisruptek: definitely cool, but you pay the penalty of an interpreter, nectarjs should produce very fast C++ binaries without any interpretation
15:32:55disruptekdadada: contribute a pr to nimterop to help it use the c++ version of treesitter and you've killed many birds with one stone.
15:33:25disruptekshashlick: anyway, only chumps use to().
15:34:29dadadadisruptek: I don't think it's that easy, C++ just has too many quirks, creating a module for the SWIG project would take about 4000 lines (less because you can copy much from the go module), and they have ironed out those C++ quirks for us, I think that path is more realistic, I already looked at much of the code, but I have no time to do or test this
15:35:08dadadajust my opinion, of course it would be great to have support in nimterop as well
15:35:34FromDiscord<dom96> A lot of the time you don't need to wrap the majority of the C++ to use a certain library
15:35:35disruptekwhy not contribute the js->treesitter->nim, then?
15:35:54disruptekhow hard could it be?
15:35:55FromDiscord<dom96> Just wrap what you need manually 😄
15:37:06FromDiscord<exelotl> Nectarjs does a terrible job of explaining itself... I came across it several months ago, didn't even realise it was a JS to C++ compiler until you told me just now
15:37:27dadadaexelotl: I agree, I found out the details from their well hidden blog
15:37:35disruptekZevv: the plan is to implement lisp in nim, i guess. same as always.
15:37:36dadadahttps://nectarjs.com/blog
15:39:02FromDiscord<exelotl> The documentation gets as far as "a variable is like a box that you can put a value in" and then just stops 🤦‍♂️
15:39:19disruptek!last exelotl
15:39:19disbotexelotl spoke in 12#nim 16 seconds ago 12https://irclogs.nim-lang.org/30-07-2020.html#15:39:02
15:39:33disruptekthat's one of the funniest things i've read in a long time.
15:41:11ZevvLisp. well why not. My other car is a Cdr
15:41:32disruptekhohoho
15:41:32*D_ quit (Ping timeout: 260 seconds)
15:42:02Zevvbut now do answer my quesion: Why did all this cps stuff started out as a *untyped* macro
15:42:14disruptekaww i wrote it down.
15:42:27FromDiscord<Clyybber> because he wanted while: else:
15:42:30FromDiscord<Clyybber> what else:
15:42:39*zacts joined #nim
15:42:47disruptekwhat else
15:42:53disruptekthat's what we call it.
15:42:56disruptekwhatelse
15:43:05FromDiscord<Clyybber> what: else:
15:43:09FromDiscord<Clyybber> whats it do?
15:43:13disruptekwho cares?
15:43:22FromDiscord<Clyybber> what: ever:
15:43:26disrupteklol
15:43:40disruptekwhat (data) else (code)
15:43:53disruptek(else what)
15:44:02FromDiscord<Clyybber> what ()
15:44:04FromDiscord<Clyybber> ?
15:44:06disruptek()
15:44:30FromDiscord<Clyybber> :()
15:44:32*D_ joined #nim
15:44:47Araqdadada, C++'s quirks when it comes to wrapping are all inherited from C.
15:44:55disruptek𝝺
15:45:13Araqat least it got a module system now so maybe in 10 years the preprocessor is mostly gone
15:45:19dadadasometimes I think if I should get into JS programming again, I resented JS because it always was more like a hack (at least in parts), than a well defined language, now with newer revisions its beginning to look a bit better, and they have so much momentum going with the ecosystem, I wonder if I should just jump on that bandwaggon, but I don't like C-style syntax anymore... so if there's a pythonic modern JS
15:45:25dadadavariant (with macros to not lose Nim's main selling point), maybe that could work for me, and then something like nectarjs for generating fast binaries... I don't know, I actually don't want to leave the Nim train, but Javascript has crazy projects like Babel in its ecosystem that are only possible because it has become like a kind of "too big to fail" language, that will in the end probably have support for
15:45:31dadadaanything you can imagine
15:45:44disruptekc-style syntax?
15:46:03disruptekyou want coffeescript.
15:46:09FromDiscord<Clyybber> if the stuff you care most about is big libraries and company support than yeah, nim probably isn't for you yet
15:46:34disruptekitym "off-side rule" vs. "curly braces"
15:47:50disrupteki wrote a largish project in coffeescript -> babel -> webpack and it works great. zero warts afaic.
15:48:03disruptekit took a lot of work to get it to that point, though.
15:48:33disruptekenough that i don't ever want to go back. and i left the place very clean.
15:48:39dadadadisruptek: isn't it harder to debug a coffescript compared to JS?
15:48:52disrupteki never learned js properly, so i dunno.
15:49:00disrupteki find coffeescript much easier on the eye.
15:49:02Araqsource code maps are for debugging
15:49:20disruptekalso, i'm just about the only coffeescript author i read.
15:49:34Araqand you should really use TypeScript, else there is no productivity
15:49:36disruptekso, like, don't ask me a damned thing. but seriously, do.
15:49:48dadadadisruptek: vimium extension for chrome is written in coffeescript
15:49:49Araqbut I'm in the static typing camp
15:49:59disruptekyes, typescript is obviously what you want.
15:50:13disrupteki did this work 6 years ago now.
15:50:53disruptekjs has changed a lot since then, too.
15:53:59disrupteklet c = "foo" -> s/o/x/g; assert c == "fxx"
15:54:18disrupteklet c = "foo" -> s/o/x/g; assert c() == "fxx" # rather
15:55:59disrupteklet c = "foo" -> s/o/x/g; assert c == "foo" # also
15:56:25disruptekvar c = "foo" -> s/o/x/g; assert c == "foo" # obvs
15:56:29*Trustable quit (Remote host closed the connection)
16:01:16dadadathose necatarjs people could've transpiled to Nim instead of C++? Is there anything missing in Nim (that C++ has) that prevented that option...
16:01:29*rockcavera joined #nim
16:01:30dadadaof course the most likely reason is they don't know Nim in the first place
16:01:45disruptekvar c = "foo" & s/o/x/g
16:02:15disruptekc &= s/f/b/g
16:02:45disruptekassert c() == "bxx"
16:04:22Araqdadada, but to accomplish what? if you target C++, you get C++ interop (if you want to)
16:04:39Araqif you target Nim you get Nim interop which nobody cares about :-)
16:05:05*andrew quit (Ping timeout: 240 seconds)
16:07:56dadadaAraq: usually it's enough to have C-interop and you can use that almost anywhere, and Nim compiles to C, can export to C, this would really suffice for most cases, no?
16:08:22dadadaalso Nim has multiple backends itself, maybe more to come in the future, so when they target Nim, they'd also target those current and future backends
16:09:07dadadathe nectarjs people implemented their own memomy management, but they could've used Nim's inbuilt memory management, and saved themselves that work
16:09:25dadadas/memomy/memory
16:09:57Zevvclyybber: did you have any new revelations about #15118 ?
16:09:59disbothttps://github.com/nim-lang/Nim/issues/15118 -- 3Cgen error: genSym fails to make unique identifier for ref object types ; snippet at 12https://play.nim-lang.org/#ix=2sHS
16:11:25FromDiscord<Clyybber> nope, sorry. Was hacking on the parser
16:12:01disruptekZevv: what do you think about this syntax?
16:12:19Zevvtalking about #28?
16:12:27disruptekscroll up
16:14:05Zevvthe arrow regexp thingy?
16:14:15disrupteki thnk &
16:14:28FromDiscord<Clyybber> a riddle
16:14:33disruptek~&
16:14:33disbot&: 11unreachable
16:14:38Zevv =~
16:15:02disruptekah, two into one.
16:15:22disruptek~=
16:15:23disbotno footnotes for `=`. 🙁
16:15:40disruptekwell, for ligature reasons.
16:15:51Zevv=~ is perl, that's how we did that back in the ninetees
16:16:07disrupteki know, but i was thinking ~= for some reason.
16:16:20disruptekeveryone wrote perl then, it was crazy.
16:16:29disruptekline noise.
16:16:49disruptekand remarkably large projects.
16:16:56ZevvSome of my friends from back then still call me "two-lines-of-perl-zevv"
16:17:05Zevvbecause I apparently did everything in two lines of perl
16:17:09ZevvI have no recollections of that, however
16:17:17disruptekthat seems about right.
16:17:30dadadaok, this looks like a good read https://codeburst.io/nectarjs-compiling-javascript-into-native-binaries-for-every-platform-2efb2083a4a ... now I'll shut about nectarjs :D
16:17:34disruptekwe went to great lengths to run it from the command-line.
16:17:45*vicfred_ joined #nim
16:18:07Zevvmy only perl project I can remember was smtppp
16:18:13Zevvfor doing ppp over smtp
16:18:18disruptekofc
16:18:45leorize[m]why would you ever want to do ppp over smtp
16:18:47Zevvoh that was not the ninetees. http://ix.io/2sHV
16:18:48disruptekhow about the one where you have a filesystem on gmail?
16:18:58ZevvI was working at a site where there was no internet, but there was an email gateway
16:19:11disruptekin 2001?
16:19:15Zevvin 2001
16:19:25Zevvcompany policy
16:19:29disruptekthird world countries, huh?
16:19:45Zevvit was amazingly usable
16:19:53Zevvjust make sure to crank up your window sizes
16:20:04disrupteklol
16:20:20disruptekbut ppp over 296 mtu is so much snappier.
16:20:34Zevvhehe
16:20:37*vicfred quit (Ping timeout: 264 seconds)
16:20:50Zevvdude I am so old. I just went into this project directory I never visit anymore
16:20:57ZevvI did SLIP back then
16:21:08disruptekcslip. i'll call back with 296.
16:21:13Zevvand CPIO
16:21:18disruptekright.
16:21:23Zevvanyway, back to 2020
16:21:28Zevvhow's the CPSv3 coming up
16:21:33Zevvgo type that shit boi
16:21:39*oriba joined #nim
16:21:46disrupteki'm stoned. just thinking at the moment.
16:21:59Zevvyeah, and I'm buzzed. Good team we are
16:22:24disrupteki'm told it takes two to tango.
16:23:05leorizeenlighten me with your cps magic
16:23:10leorizehow do I use this stuff
16:23:19leorizeand how can I implement more things on top of it?
16:23:23disruptekroll to 0.0.11
16:23:25ZevvMIDDLEWARE
16:24:06disruptekzevv that was one of the cutest github posts i've ever seen.
16:24:26Zevvthe pain I went through for that. I had the tab open but forgot to submit
16:24:38Zevvuntil 5 hours later I noticed the post was not on github
16:24:39disruptekthat's the worst.
16:24:47Zevvso I grepped through my .mozilla and found some matches
16:24:48disruptekgood reason to use ghi.
16:24:57Zevvand the stuff was just there waiting for me in some lz4'ed json
16:25:04ZevvI *never* type in web ui.s This was the first time
16:25:08ZevvIt was ment to be a few lines
16:25:24Zevvleorize: so, you're serious about this? I can talk you through a bit
16:25:39Zevvbut expect everything to be completely rewritten
16:25:49Zevvbasic concepts will hold, but stuff will chainge
16:25:54leorizesure
16:26:12leorizeI have to see the magical world without futures :p
16:26:28Zevvok, basically there's a few layers. On the bottom there is the CPS concept. Read up on that stuff and marvel on the beauty
16:26:35Zevvthe nasty part is that it is a pain to code in CPS style by hand
16:26:48Zevvso there's the disruptek/cps repo, which has 2 things. 2 layers
16:27:02Zevvthe important part there is the 'cps' macro in the `cps` module
16:27:15ZevvYou pass it a proc that can currently have a fairly large subset of valid nim
16:27:19*Jesin quit (Quit: Leaving)
16:27:33Zevvand the macro will cut that into separate "resumable" pieces for you
16:27:42Zevvone of these pieces is what is called a "Continuation"
16:28:10Zevvdisruptek has reached higher levels of enlightenment about that stuff and is already thinking in concepts
16:28:25Zevvbut for me, a continuation is a real thing: it's an object that holds a proc pointer
16:28:39Araqdadada, for the fun of it I studied NectarJS's source code
16:28:42Zevvand some stuff. You "continue" a continuation by calling that function with the stuff
16:28:49Zevvyou call `c.fn(c)`
16:28:55ZevvThe result of that is again a continuation
16:28:59ZevvThat is where the magic is
16:29:03Araqand well. don't use it in production. or at all.
16:29:27Zevvon top of that, there is things like aync io or coroutines or iterators
16:29:34dadadaAraq: yeah, I'm currently as well :D it looks very basic at the moment
16:29:59*Jesin joined #nim
16:30:18leorizeZevv: now that's cool
16:30:18ZevvI never took the effort to look into disruptek evnet queue because it is totally overengineerd, so I propose to look at stash/standalone_tcp_server.nim
16:30:24Zevvit's pretty self contained
16:30:52disruptekrude.
16:30:58leorizewin32 api contains a few CPS-style calls, I wonder if it's possible for me to tell the macro to "cut here and give me a continuation"
16:30:59Zevvit is bare bones CPS based async with only cps as dependency
16:31:07Araqdadada, https://medium.com/@bob.clark_34506/ive-seen-the-kickstarter-campaign-and-i-m-not-surprised-it-failed-18d30b92c09c#--responses nails it
16:31:08leorizeso I can just yeet it to winapi :P
16:31:40*theelous3 joined #nim
16:31:45disruptekleorize: zevv is being modest; he created cps -- this is a fork.
16:32:04Zevvyeah, I got to, like, 20% or so
16:32:06Zevvand gave up
16:32:21dadadaAraq: to be fair, that article is outdated a bit, they now say they use no GC and have their own memory management
16:32:31disrupteknah, i think it was at least 3/5, right?
16:32:51dadadabut it's true that the project is very vague
16:32:59disruptekit was just lifting and copy-env, iirc.
16:33:21Zevvanyway, we now have while/else and if/continue
16:33:31disruptekhaha
16:33:55disruptekwhatelse is awesome.
16:34:10Zevvbut seriously, I made gotos. I made try/catch/throw
16:34:13dadadalooking at the source code reminded me why I think JS code is ugly
16:34:21disruptek~araq
16:34:21disbotAraq: 11👑Andreas "What Else?" Rumpf👑 -- disruptek
16:34:24Zevvleorize: Here is a standalone goto: https://github.com/disruptek/cps/blob/master/stash/goto.nim
16:34:38Zevvor iterators: https://github.com/disruptek/cps/blob/master/stash/iterator.nim
16:34:49Zevvthe last version was only 5 times slower then nim iterators
16:35:29dadadathere's another very similar project but with less activity https://github.com/andrei-markeev/ts2c
16:36:06leorizeZevv: I guess now you just have to make it 5x faster :P
16:36:25Zevvfrankly, I don't give a
16:36:40disruptekit's leak-free in arc.
16:38:07leorizeand that's really cool
16:38:08ZevvI've been leak free for some years
16:38:15disrupteknot me.
16:38:22Zevvwell, was the async leak not found and fixed the other day?
16:38:29disrupteki can't remember a time when i didn't leak at least once per day.
16:39:17disrupteki think an async leak was fixed, yes. i don't know if it was entirely curative.
16:39:28disrupteki think Yardanico is the authority on those.
16:40:10FromDiscord<lqdev> does nim have support for checking CPU extensions?
16:40:20disruptek!repo cpuwhat
16:40:21disbothttps://github.com/awr1/cpuwhat -- 9cpuwhat: 11Nim utilities for advanced CPU operations: CPU identification, ISA extension detection, bindings to assorted intrinsics 15 15⭐ 1🍴
16:40:56FromDiscord<lqdev> cool, thanks
16:41:05Zevvoh and here I am gulping /proc/cpuinfo
16:41:16disrupteksucker.
16:41:25Zevvi know
16:41:49disruptekzevv's stuck in 2018 nim over here.
16:41:55ZevvI like how you always take care to use proper punctuation, even if you're just cursing
16:42:20disrupteklol no
16:42:58FromDiscord<aachh> So, if I was writing a language VM in C I'd use macros to identify opcodes, like #define some-opcode 0x01, #define another-opcode 0x02, right? And then use those macros across the VM implementation
16:43:06FromDiscord<aachh> What would be the Nim-ic way to do that?
16:43:37FromDiscord<lqdev> use an enum
16:43:41disruptek~manual
16:43:42disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek
16:43:43FromDiscord<Clyybber> const someopcode = 0x01
16:44:08FromDiscord<aachh> Are consts compile-time evaluated?
16:44:11FromDiscord<lqdev> yes
16:44:14FromDiscord<aachh> Ah, I ese
16:44:16FromDiscord<aachh> see*
16:44:20FromDiscord<aachh> Thank you very much!
16:46:16FromDiscord<aachh> Also apparently there's a computed goto pragma
16:46:18FromDiscord<aachh> For while loops
16:46:21FromDiscord<aachh> https://nim-lang.org/docs/manual.html#pragmas-computedgoto-pragma
16:46:24FromDiscord<aachh> Nim is amazing
16:46:59ZevvAnd so it is
16:50:45*superbia joined #nim
16:53:26*abm joined #nim
16:55:18dadadathe changelog of nectarjs is in parts hilarious
16:55:22dadadaVERSION 0.4.0
16:55:25dadadaImproving some bug
16:55:53dadadait's very reassuring that they have been improving some bug
16:58:29*superbia1 joined #nim
16:59:23*couven92 joined #nim
17:00:59*superbia quit (Ping timeout: 240 seconds)
17:01:22*couven92 quit (Client Quit)
17:01:41Oddmongerit's a feature
17:02:03Zevvsomeone has to do it, might as well be them right
17:02:46dadadausually most people do it unintentionally, they're the first to do it intentionally
17:11:36*snowolf quit (Quit: No Ping reply in 180 seconds.)
17:11:36*snowolf joined #nim
17:11:36*snowolf quit (Changing host)
17:11:36*snowolf joined #nim
17:12:15*andrew joined #nim
17:13:16*SenasOzys joined #nim
17:14:38disruptekZevv: a continuation that wraps T has the same semantics as any other continuation that wraps T. they are the same type.
17:19:48*maier joined #nim
17:24:20Zevvso?
17:24:30disrupteknetflix & chill
17:25:06*maier quit (Ping timeout: 260 seconds)
17:27:48Araqdadada, my favourite is https://github.com/NectarJS/nectarjs/commit/f034e33734ffa5fb5294b9c108942d99be3b1945#diff-c218b20e504dcc41a5ca00a9cf3f5d6aR40-R46
17:28:18Araqthat's both entirely unnecessary with 'char*' and leaks memory
17:29:04*snowolf quit (Quit: No Ping reply in 180 seconds.)
17:29:39*snowolf joined #nim
17:31:15*endragor quit (Remote host closed the connection)
17:32:41FromDiscord<aachh> I mean
17:32:56FromDiscord<aachh> The idea of a compiler making binaries out of JavaScript seems cool
17:33:02FromDiscord<aachh> I actually haven't ever heard about this
17:34:33Araqthe idea is as cool as using JavaScript for anything
17:37:27dadadait's definitely useful... I don't see the point in porting asciidoctor to Nim, it's really a lot of work, and the reference project will always be better than the port, exactly because it is the reference
17:38:18dadadabut since Ruby can transpile to Javascript very well through Opal, we get asciidoctor.js ... now the final step would be to transpile JS into Nim in an ideal world
17:38:19Zevvthat's a bad reason.
17:38:48Zevvnot doing somehing because you think the current stuff will always be better
17:39:18dadadabut not being in the ideal world, transpiling asciidoctor.js to C/C++ would be pretty decent, than I could probably make use of it in C/C++/Nim projects without a lot of issues, don't get the penalty of an interpreter
17:39:56FromDiscord<Rika> not all interpreters have massive penalties though?
17:41:10Araqdunno, I simply don't use asciidoctor. The less software written after 1990 I use, the happier I am.
17:41:12dadadaa minor penalty is still not a good thing
17:41:20*sagax joined #nim
17:41:51disruptekno one likes spending time in the box.
17:41:59dadadaAraq: it's a terrible name for a format that is superior competition to markdown
17:42:06FromDiscord<aachh> > the idea is as cool as using JavaScript for anything
17:42:09FromDiscord<aachh> Ay, I like JS though
17:42:12ZevvAraq is doing is docs in nroff
17:42:15dadadaand I bet you use markdown, which was written after 1990.. :D
17:42:28FromDiscord<aachh> Beat me up, but that's my genuine opinion
17:42:31FromDiscord<Rika> dadada: and the effort needed to port something is even less of a good thing isnt it
17:44:32Araqdunno, asciidoctor is a nice name. but I just learned it's written in Ruby and so I won't use it. :P
17:44:41dadadaRika: it depends what we're talking about, I don't think those things can be generalized, of course it would be great to port Qt5 to native Nim code, but a wrapper that I can use in Nim would already make me very happy ... I mean, obviously it would be crazy to want to port all the millions upon millions of lines of code
17:45:04dadadamillions of lines of FOSS code, I don't mean Qt only here
17:45:40Araqwell but Qt5 accomplishes more than parsing ascii into a document tree and rendering it out as HTML. I did that in my spare time.
17:46:11dadadaAraq: you're making my exact point! (there's also a python version called asciidoc ... btw...) It being written in Ruby is my sole reason for not already using it
17:46:31*andrew_ joined #nim
17:46:37dadadaAraq: it can render to DocBook, manpages and PDFs ... and I'm sure more backends will follow
17:46:39*Jesin quit (Quit: Leaving)
17:47:01dadadaindeed, there are already more backends, they're just not advertised on their frontpage, you find it deep in the docs
17:48:41dadadaI would like to add a backend for it, that renders to a terminal, because to my knowledge it's one of only very few such formats that also support defining colors for text segments ... markdown can't do it, orgmode can't do it AFAIK
17:49:49*dulsi_ is now known as dulsi
17:50:01*andrew quit (Ping timeout: 264 seconds)
17:57:49*Jesin joined #nim
18:00:52dadadaAraq: what convinces me is that asciidoc is endorsed by Linus Torvalds, markdown has so many obvious shortcomings if you want to do anything more advanced like using footnotes or tables, you already need extensions, and it has no support for coloring and many other features that asciidoc has. Then there's orgmode, which is really cool in emacs, but it also lacks features of asciidoc. I'd like to see one
18:00:59dadadaformat succeed, that is easy to write (which I think is the main selling point of such formats), and has all the features that one would need to even write a real book, keep notes, keep track of projects/todos/dates (like orgmode), use it to make manpages, use it to make websites, obviously for documentation... asciidoc(tor) seems closest to achieving that at the moment, but no C compatible implementation
18:01:05dadadaexisting is probably holding it back ...
18:01:52*nikita` joined #nim
18:01:53Zevvdisruptek: this bubble-up local lifting is amazingly simple to implement
18:02:10dadadayeah, sure you can write a basic markdown like parser in your spare time, but to the all the little details right and to support those more advanced features, like generating a PDF with a TOC and footnotes, I think that's not something you'd want to reinvent the wheel for
18:02:44Araqwell I did it. for RST, it's still alive and called Nim's documentation generator
18:03:09disruptekno, no, let's reinvent the wheel.
18:03:58Araqand most people complained that it's not markdown so I added markdown features
18:04:46disruptekthe continuation operator is `...`() 😁
18:06:46*Kaivo quit (Remote host closed the connection)
18:07:28*Kaivo joined #nim
18:10:17*Kaivo quit (Remote host closed the connection)
18:10:58*Kaivo joined #nim
18:14:06Zevvdisruptek: http://ix.io/2sIw, for what it's worth
18:27:22Zevvlife is so much easier when you're typed
18:34:04*andrew_ quit (Ping timeout: 256 seconds)
18:37:56*zacts quit (Quit: WeeChat 2.8)
18:40:37*kenran joined #nim
18:40:41FromDiscord<Clyybber> disruptek...
18:41:15disruptek...continuations intensify
18:42:43FromDiscord<aachh> Am I dumb or is there no array construction shortcut syntax?
18:42:50disruptekyes.
18:42:57FromDiscord<aachh> Like I want to initialize the array so there all of the values are the same
18:43:05FromDiscord<aachh> is there no syntax for that?
18:43:34FromDiscord<aachh> Like, you've got [length; value] in Rust, I believe
18:43:40FromDiscord<aachh> Is there something similar to this in Nim?
18:44:34disruptekhttps://nim-lang.org/docs/manual.html#types-array-and-sequence-types
18:45:11*Vladar quit (Quit: Leaving)
18:46:24FromDiscord<aachh> Yeah, I checked that earlier
18:52:36leorize@aachh algorithms.fill
18:53:12FromDiscord<aachh> Thank you very much!!
18:53:21leorize[m]https://nim-lang.org/docs/algorithm.html#fill%2CopenArray%5BT%5D%2CT
18:53:39leorize[m]why sugar when it's one line away :P
18:58:40*andrew joined #nim
18:59:47*opal quit (Remote host closed the connection)
19:00:54*dzamo quit (Quit: dzamo)
19:01:31*opal joined #nim
19:01:50*nsf joined #nim
19:03:02*kenran quit (Quit: Lost terminal)
19:03:39FromDiscord<aachh> Oh no, wait
19:03:56FromDiscord<aachh> You don't need to fill the array at all
19:04:03FromDiscord<aachh> xD this is basically what I wanted
19:05:46*kenran joined #nim
19:05:51*kenran quit (Client Quit)
19:06:23*kenran joined #nim
19:09:41Zevvyou
19:09:43*leorize quit (Ping timeout: 240 seconds)
19:09:46Zevvare not impressed
19:09:47Zevvare you
19:10:57Zevvdisruptek: tell me, does the template way of accessing env variables work for you, or do you still think rewriting the source is better?
19:11:17Zevv!last pmunch
19:11:17disbotPMunch quit 72 weeks ago and last spoke 2 weeks ago
19:11:27Zevvhow is that
19:11:27*leorize joined #nim
19:15:18*rockcavera quit (Remote host closed the connection)
19:15:49*rockcavera joined #nim
19:20:42*maier joined #nim
19:22:32disruptekwhen i try to compile this 100 line file, the nim compiler gives me 61,016 lines of error messages. more than 3mb.
19:22:43Zevvpretty cool
19:22:48Zevvwhich 100 line file would that be
19:23:08disrupteki guess it's not cps v3.
19:23:12FromDiscord<Varriount> shashlick: How can I tell when an output file from Nimterop was only partially generated (either due to the preprocessor terminating, or constructs Nimterop can't transform/recognize)?
19:24:10FromDiscord<Varriount> (other than by manually comparing the source file and the generated file)
19:24:25Zevvhttps://play.nim-lang.org/#ix=2sIR
19:24:31Zevvfine here?
19:25:42*maier quit (Ping timeout: 256 seconds)
19:26:28disrupteki'm trying to make data: seq[T] work.
19:26:59Zevvyour data is already seq[T] in #28
19:28:06disruptekvar c = ... @[n, n.succ]
19:28:16disruptekc &= ... grow[T]
19:29:00Zevvso, what exactly is your plan now. You're starting from scratch right?
19:29:09disruptekwell, i'm starting with 28.
19:29:31Zevvright
19:29:43disruptektrying to write it as "normal" nim that can consume `replace(s: string): string` transforms, regardless of where they are defined.
19:30:15Zevvhm fair enough
19:31:07Zevvdo you have stuff in a repo yet? commit early commit often, as they say
19:33:45*narimiran joined #nim
19:38:23disrupteki always say that.
19:38:31shashlick@Varriount: preprocessor failures raise errors
19:38:45shashlickas for stuff nimterop doesn't recognize, it prints comments out at the beginning
19:39:08Zevvhey. I have `proc foo[T](v: T) = ...`. I can't do getTypeImpl or getTypeInst on `v`
19:39:11Zevvso how do I get `T`?
19:39:44Zevvor actually whay I have is in the proc `var someThing = v`. I need `someThing`'s type, so I want `T`
19:40:24disruptekdunno, does it seem important?
19:40:52Zevvto me it is. I'm lifting generics
19:41:09FromDiscord<Varriount> shashlick: Are you sure? I know that some libraries (such as the directx ones) are supposed to fail, because they have a #error pragma when compiled as C headers (they are C++ only)
19:41:31disrupteki kinda feel like playing wow.
19:41:33FromDiscord<Varriount> shashlick: Also, how does Nimterop know when to expand a C macro, vs treating it like a template?
19:41:34disruptekis that weird?
19:41:41disrupteki know if i boot it up i'll hate it.
19:42:00Zevvnah go for it
19:42:09disrupteki can't do it.
19:42:15Zevvthen go type that shit boi
19:42:21Zevvtalk talk talk
19:42:30disruptekwell, i have.
19:42:33Zevv\o/
19:43:11disrupteknot only doesn't it work, but it takes 2 full seconds to thinking to decide it's not compilable.
19:43:17shashlick@Varriout - errors should kill - https://github.com/nimterop/nimterop/blob/master/nimterop/toastlib/getters.nim#L364
19:43:35disruptekthis is a 3 line error message, mind you.
19:43:35Zevv2 secs, that's nothing
19:43:36shashlickas for C macros, nimterop doesn't know how to generate templates yet
19:46:06FromDiscord<Varriount> shashlick: But it knows how to translate `ifdef` to `when defined` (or at least, it appears to, from the output I'm looking at).
19:46:26leorizeshashlick: you seem to have checked some binary into nimble source tree
19:48:51*Ven`` joined #nim
19:48:54shashlick@Varriount: that's cleaned out by the preprocessor - there's no ifdefs after running through it
19:48:59shashlick@leorize: ugh
19:49:27shashlickwhat got added
19:49:49leorizeissue727/src/abc
19:49:57leorizetests/issue727/src/abc
19:50:20shashlickis it possible to remove it altogether
19:50:35leorizeyou should employ one of those "ignore all file without extension" gitignore files
19:53:27federico3dom96: http://play.mitos.is/?do=play
19:55:52FromDiscord<Recruit_main707> defining my own DllMain brakes the dll after compiling for some reason 🥴 ↵`proc DllMain*(hModule: HANDLE, reasonForCall: DWORD, lpReserved: LPVOID): WINBOOL {.stdcall, exportc, dynlib.} =`
19:58:46*zacts joined #nim
19:59:47FromDiscord<Recruit_main707> can i import a c macro?
20:01:50FromDiscord<lqdev> pretty sure yeah, but you'll have to use {.nodecl.}
20:01:56FromDiscord<lqdev> haven't tried tho
20:02:09FromDiscord<lqdev> just import it as a proc
20:04:06*opal quit (Remote host closed the connection)
20:05:19*opal joined #nim
20:13:24FromDiscord<lqdev> is there any documentation on lent/sink besides araq's RFC?
20:13:51disruptekdoc/destructors.rst
20:13:56leorize~destructors
20:13:57disbotno footnotes for `destructors`. 🙁
20:13:59leorize~destructor
20:14:00disbotdestructor: 11https://nim-lang.org/docs/destructors.html -- leorize
20:14:06FromDiscord<lqdev> thanks
20:15:33FromDiscord<lqdev> > If it cannot be proven to be the last usage of the location, a copy is done instead and this copy is then passed to the sink parameter.
20:15:38FromDiscord<lqdev> that clears things up
20:16:06disruptekeh yeah
20:16:07FromDiscord<lqdev> i was looking for something more akin to c++'s rvalue references but i guess this should suffice
20:16:35disruptekZevv: http://ix.io/2sJg/nim
20:16:51*kenran quit (Quit: leaving)
20:16:58disrupteki'm looking forward to red dead redemption 2.
20:17:05disrupteki wonder if i can get it cheaply.
20:17:05Zevvoh dude
20:17:08Zevvyou're up for a treat
20:17:27disrupteki really loved the first game.
20:17:48ZevvI think I even liked this one better
20:19:38Zevv/tmp/d.nim(91, 9) Error: expression 'c ... @[n, succ(n, 1)]' has no type (or is ambiguous)
20:20:39disruptekzevv i give you 3mins with my code and you've already broken it.
20:21:05Zevvmake better code then
20:21:45Zevvdude could you not proc `.`[T](c: C[T]; p: P[C[T]]): C[T] =
20:22:42disruptekdid you not get all the lines of the file?
20:22:51disruptekor did you throw away the ones you couldn't read?
20:22:57ZevvI curled the ix
20:30:29*zacts quit (Quit: WeeChat 2.8)
20:32:22*Trustable joined #nim
20:33:46*andrew quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
20:36:18*nsf quit (Quit: WeeChat 2.8)
20:40:26*narimiran quit (Ping timeout: 256 seconds)
20:52:07*dulsi_ joined #nim
20:54:25*dulsi quit (Ping timeout: 240 seconds)
20:57:58*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:58:45*rockcavera quit (Read error: Connection reset by peer)
21:00:28*rockcavera joined #nim
21:02:12*rockcavera is now known as Guest92467
21:02:12*tiorock joined #nim
21:02:12*Guest92467 quit (Killed (tolkien.freenode.net (Nickname regained by services)))
21:02:12*tiorock is now known as rockcavera
21:06:15*rockcavera quit (Read error: Connection reset by peer)
21:07:40*rockcavera joined #nim
21:08:37*dulsi_ is now known as dulsi
21:09:10*WilhelmVonWeiner quit (Quit: leaving)
21:09:33*WilhelmVonWeiner joined #nim
21:09:36*tiorock joined #nim
21:09:36*tiorock quit (Changing host)
21:09:36*tiorock joined #nim
21:09:36*rockcavera is now known as Guest26348
21:09:36*tiorock is now known as rockcavera
21:09:37*Ven`` joined #nim
21:10:15dadadawhat are the most popular applications (or other projects) that are written in Nim?
21:10:25federico3the compiler itself :)
21:11:18FromDiscord<Elegant Beef> Nimble
21:11:31FromDiscord<Elegant Beef> pretty much all of the nim dev tools 😄
21:11:42FromDiscord<Elegant Beef> Nitter is pretty popular iirc
21:12:05*Guest26348 quit (Ping timeout: 240 seconds)
21:15:26dadadadisruptek: how is nymph development going?
21:15:32dadadawas that supposed to replace nimble?
21:18:58leorizeit's nimph, this is not python lol
21:19:10dadadaok, so nimph
21:19:24shashlicknew --gc:arc bug in devel
21:19:29leorizeI don't think nimph will ever replace nimble, esp when it requires nimble to function :P
21:20:04shashlickdisruptek is good with me poaching stuff out of nimph into nimble
21:20:26leorizebetter nimble is good for everyone
21:20:37dadadayes, definitely
21:21:33*maier joined #nim
21:26:50*maier quit (Ping timeout: 260 seconds)
21:28:09FromDiscord<aachh> :( https://media.discordapp.net/attachments/371759389889003532/738508251624374433/Zrzut_ekranu_2020-07-30_o_23.28.03.png
21:30:41FromDiscord<Recruit_main707> i think writing your own dll main is broken/impossible in latest stable release of nim
21:30:56leorizedepends on how you're doing it
21:32:11FromDiscord<Recruit_main707> i have tried everything, but nothing worked, not even nppnim's way (which in theory works)
21:32:26FromDiscord<Recruit_main707> and is somewhat up to date
21:32:28leorizewell how are you doing it then?
21:33:01FromDiscord<Recruit_main707> https://github.com/jangko/nppnim/blob/master/nppnim.nim#L75-L77
21:33:43FromDiscord<Recruit_main707> trying to load the resulting dll with loadLib returns `nil`
21:34:15*rockcavera quit (Read error: Connection reset by peer)
21:35:03leorizedid you compile with --noMain?
21:35:32FromDiscord<Recruit_main707> yes, code compiles
21:35:37*solitudesf quit (Ping timeout: 264 seconds)
21:36:25leorizedid you inspect the resulting C code?
21:36:59FromDiscord<Recruit_main707> yes, i have found something rn actually, it is --threads what apparently makes things dont work
21:37:09FromDiscord<Recruit_main707> even if its not used
21:37:33*rockcavera joined #nim
21:37:44leorizeso... what's the issue in the code gen?
21:38:51FromDiscord<Recruit_main707> there is no visible difference between compiling it with --threads:on or off↵just the fact that it works or it doesnt
21:39:26leorizeso... have you filed an issue with some sample testing code?
21:39:33FromDiscord<exelotl> dadada: nitter is a fairly popular project using Nim
21:39:46FromDiscord<Recruit_main707> nope, i have just found it, i guess i should
21:40:01FromDiscord<Recruit_main707> ill do it tomorrow after trying some things
21:40:16leorizethanks :)
21:43:11leorizeis there any known technique to do type matching in a macro?
21:43:42FromDiscord<lqdev> like, comparing two types? there's sameType
21:44:32dadadaexelotl: yeah, somebody already said that... If I was cynical my comment on this would be: so there's one.
21:44:36dadada:D
21:48:40FromDiscord<exelotl> Oh lol I missed that 😂
21:51:24FromDiscord<exelotl> Does look like nitter is the most starred on github, followed by jester, then arraymancer
21:55:51dadadaI get physically ill when looking at JS code :-(
21:56:51FromDiscord<Elegant Beef> ok and you're mentioning this why?
21:58:07dadadawell, I hoped for it to be amusing, maybe it is not.
21:58:22FromDiscord<Elegant Beef> idk what you're on about
22:00:51*aenesidemus joined #nim
22:12:25*Amun_Ra quit (Ping timeout: 246 seconds)
22:18:17FromDiscord<exelotl> Here's some JS code that I wrote today https://twitter.com/exelotl/status/1288914689024548866
22:18:34FromDiscord<exelotl> Hope you enjoy
22:31:49FromDiscord<Elegant Beef> @exelotl my current method beats yours hands down https://media.discordapp.net/attachments/371759389889003532/738524271344877628/unknown.png
22:32:33FromDiscord<Elegant Beef> storing all even numbers into an intset from int.low to int.high, very efficient
22:33:38FromDiscord<Elegant Beef> Something tells me that i dont have enough memory for my solution
22:35:06*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:35:33FromDiscord<exelotl> Holy shit hahaha
22:35:34FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2sJV
22:35:49FromDiscord<Elegant Beef> Totally valid solution, i killed it at 3GiB cause no way in hell is it going to finish
22:36:23FromDiscord<exelotl> The poor playground...
22:36:29FromDiscord<Elegant Beef> I didnt run it there
22:36:56FromDiscord<Elegant Beef> -2^63..2^63 -1 is a few too many bytes
22:37:29FromDiscord<exelotl> I love the simplicity of this awful awful solution
22:37:58FromDiscord<Elegant Beef> how much ram does this require
22:38:46FromDiscord<exelotl> Actually you could use a set instead of an intset
22:39:15FromDiscord<exelotl> (Maybe)
22:40:06FromDiscord<Elegant Beef> I mean doesnt really matter the amount of ram required is ~2 * 2^63 * 8
22:40:50FromDiscord<exelotl> nah it would be /8 rather than *8 right?
22:40:51FromDiscord<Elegant Beef> https://media.discordapp.net/attachments/371759389889003532/738526548684046417/unknown.png
22:40:55FromDiscord<Elegant Beef> Yea nvm
22:40:56FromDiscord<Elegant Beef> Im dumb
22:41:00FromDiscord<Elegant Beef> The * 8 is useless
22:41:33FromDiscord<Elegant Beef> there should be proper https://media.discordapp.net/attachments/371759389889003532/738526724974706738/unknown.png
22:42:17FromDiscord<Elegant Beef> yes i realize that 2* 2^63 is just 2^64
22:42:56FromDiscord<Elegant Beef> I guess it only needs half of that since it only needs evens and that's 50$
22:42:58FromDiscord<Elegant Beef> (edit) '50$' => '50%'
22:45:40FromDiscord<Elegant Beef> So anyone want to go halfers with me on ram so we can see if this works?
22:58:22FromDiscord<exelotl> @Elegant Beef dangit :( https://media.discordapp.net/attachments/371759389889003532/738530955941249174/Screenshot_from_2020-07-30_23-58-06.png
22:59:32FromDiscord<Elegant Beef> I mean you're literally going to filling up have the amount of possible ram available for 64 bit CPUs
22:59:37FromDiscord<Elegant Beef> (edit) 'have' => 'half'
22:59:48FromDiscord<Elegant Beef> So it's not going to work regardless
23:00:00FromDiscord<Elegant Beef> oh wait you went 32bit
23:00:04FromDiscord<exelotl> yeah. xD
23:00:09FromDiscord<exelotl> it would fit in 512mb
23:00:35FromDiscord<Elegant Beef> should fit in roughly 2GB afaik
23:01:32FromDiscord<exelotl> yeah, but bearing in mind these are bitsets, you can store 8 values per byte
23:03:05FromDiscord<exelotl> for example a set[0..63] should fit in 8 bytes
23:03:31*krux02_ joined #nim
23:03:44FromDiscord<Elegant Beef> Yea i understand what you implied but 0 idea how it's done 😄
23:06:02*krux02 quit (Ping timeout: 260 seconds)
23:06:31*Avatarfighter quit (Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in)
23:07:15*abm quit (Read error: Connection reset by peer)
23:08:25FromDiscord<exelotl> oh it's simple (for small sets at least), it basically does `(s and (1 shl n))` to check if the `n`th bit is flipped (in which case `n` is in the set)
23:09:46FromDiscord<Elegant Beef> Oh, i misread bits instead of bytes
23:09:49FromDiscord<Elegant Beef> it's just bitflags 😄
23:09:54*nikita` quit (Quit: leaving)
23:10:04FromDiscord<exelotl> yeah :P
23:10:17FromDiscord<Elegant Beef> I was super confused how it could compress 64 flags into 8 bits
23:12:57FromDiscord<exelotl> I'm not entirely sure how the `intsets` module works though... I think it's based off the same concept but can have holes, so that it doesn't waste memory if you add e.g. the values `3` and `500321`
23:13:45FromDiscord<exelotl> would be cool if someone who knows more could explain it to me. xD
23:18:35*dadada quit (Ping timeout: 240 seconds)
23:20:29*Trustable quit (Remote host closed the connection)
23:20:53*dadada joined #nim
23:21:17*dadada is now known as Guest49611
23:22:28*maier joined #nim
23:27:23*maier quit (Ping timeout: 240 seconds)
23:59:27Yardanico I'm ecstatic
23:59:44Yardanicoall nim-markdown tests passed after the cursor inference re-implementation PR