<< 13-05-2020 >>

00:11:01*konvertex quit (Ping timeout: 264 seconds)
00:24:31disruptek~nimcache
00:24:31disbotnimcache: 11the best way to figure out where it is located is to specify that location with --nimcache -- disruptek
00:24:40PrestigeMade a little devlog about the WM I'm making in nim: https://www.youtube.com/watch?v=cD7xBqEdqgo
00:24:46Prestigepretty topical
00:30:29disruptekneat.
00:30:39disruptekno wayland support, right?
00:30:40*zacharycarter quit (Ping timeout: 272 seconds)
00:30:44*gokr quit (Quit: Leaving.)
00:30:48PrestigeRight, just xlib for now
00:30:59Prestigewhen wayland gets wider adoption I'll port to wayland
00:35:32disruptekthe thing that would attract nimions is some kinda /really/ easy client api.
00:37:04Prestigeclient api?
00:37:47disrupteksome way for me to control it from code.
00:37:52*silvernode joined #nim
00:38:14disruptekhere's my current hack:
00:38:15PrestigeI was thinking of setting up IPC but then you could use any language
00:38:17disruptek!repo swayipc
00:38:18disbothttps://github.com/disruptek/swayipc -- 9swayipc: 11swayipc (i3ipc) for Nim 15 4⭐ 0🍴
00:42:02PrestigeMight be something nice to have for v1.0
00:46:14*lritter quit (Ping timeout: 240 seconds)
00:47:14*lritter joined #nim
00:53:23FromDiscord<exelotl> Man, I'm really surprised there's not something that's just like strformat but with loops and conditionals
00:54:39disrupteksounds easy.
00:54:52*lritter quit (Quit: Leaving)
00:54:59FromDiscord<exelotl> Yeah
00:55:56*ryan_ is now known as honger
00:57:06*zacharycarter joined #nim
00:58:46*silvernode quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
00:59:57FromDiscord<exelotl> 'nim-templates' seems close but didn't work for me. Generated code contained errors, maybe I was misusing it somehow
01:01:40*zacharycarter quit (Ping timeout: 246 seconds)
01:02:02FromDiscord<exelotl> nim-jade also seems to give good output but it's 6 years old so I don't have high hopes for it compiling at all xD
01:02:16FromDiscord<exelotl> Plus I don't want to use jade
01:04:30FromDiscord<exelotl> The other things I found are trying to be too clever. Either some DSL or requiring you to create context objects and stuff, doing extra work at runtime
01:15:58*poohman joined #nim
01:38:22*chemist69 quit (Ping timeout: 260 seconds)
01:40:06*chemist69 joined #nim
01:58:53*bok joined #nim
02:13:41*muffindrake quit (Ping timeout: 246 seconds)
02:16:11*muffindrake joined #nim
02:20:52*dadada quit (Ping timeout: 272 seconds)
02:27:00*dadada joined #nim
02:27:23*dadada is now known as Guest24748
02:51:00*Guest24748 quit (Ping timeout: 256 seconds)
02:57:00*dadada joined #nim
02:57:23*dadada is now known as Guest5361
03:03:30*zacharycarter joined #nim
03:07:54*zacharycarter quit (Ping timeout: 240 seconds)
03:21:15*Guest5361 quit (Ping timeout: 258 seconds)
03:27:06*dadada__ joined #nim
03:33:50FromDiscord<Varriount> timotheecour: I really like your recent PRs relating to tests.
03:34:37FromDiscord<Never Listen To Beef> So this is going to be a silly question for a ugly implementation, but can case not be used in a similar matter to if for ternaries?
03:34:50FromDiscord<Never Listen To Beef> Where non discarded values are the output logic
03:34:56FromDiscord<Varriount> exelotl: What about source filters?
03:34:58FromDiscord<Never Listen To Beef> are outputted*
03:35:40FromDiscord<Varriount> @Elegant Beef what do you mean "not be used"?
03:35:59FromDiscord<Never Listen To Beef> i mean can case be used similar to how we do ternary logic in nim
03:36:00FromDiscord<Varriount> You can not use case for a lot of things
03:36:25FromDiscord<Never Listen To Beef> I'm figuring not, since i couldnt get it to work
03:36:34FromDiscord<Never Listen To Beef> And im good at bodging stuff
03:37:30FromDiscord<Varriount> You might have to use a template to get the compiler to accept it.
03:37:48FromDiscord<Never Listen To Beef> Yea it's just to remove a bit of reptetitive logic
03:37:52FromDiscord<Never Listen To Beef> So it's not really worth it
03:48:58*ftsf_ joined #nim
03:49:26*ftsf quit (Ping timeout: 256 seconds)
03:51:06*dadada__ quit (Ping timeout: 260 seconds)
03:55:43disruptekking: please drop a link to your project.
03:56:59*dadada joined #nim
03:57:23*dadada is now known as Guest47494
03:57:29FromDiscord<Yardanico> https://github.com/cnlohr/rawdrawandroid
03:58:56FromDiscord<Yardanico> Although this was already kinda possible with jnim and "android" package
04:00:15leorize@Elegant Beef: uhh... case expressions exists?
04:00:20leorizeand yes they are in the manual also
04:01:46*nsf joined #nim
04:02:00disruptek~news
04:02:00disbotnews: 11the #nim-news channel has a Nim news feed of updates to pull requests, issues, and packages. -- disruptek
04:02:50*thomasross quit (Ping timeout: 272 seconds)
04:05:48*rockcavera quit (Remote host closed the connection)
04:06:02*supakeen quit (Quit: WeeChat 1.9.1)
04:06:40*supakeen joined #nim
04:21:06*Guest47494 quit (Ping timeout: 256 seconds)
04:21:38leorizedisruptek: merged indent-rewrite to master
04:21:50leorizeplease switch to it :)
04:22:50*dddddd quit (Ping timeout: 260 seconds)
04:27:02*dadada__ joined #nim
04:31:32FromDiscord<Technisha Circuit> I've tried reading up on how to use C++ libs in Nim but I can't figure it out, how does it work exactly?
04:31:47FromDiscord<Yardanico> You use C++ backend
04:31:50FromDiscord<Yardanico> That's how it works
04:31:57*ftsf joined #nim
04:32:08FromDiscord<Yardanico> "nim cpp"
04:32:51FromDiscord<Technisha Circuit> Oh :P
04:33:28FromDiscord<Yardanico> Although there's another way - to write C bindings for a C++ library yourself or maybe someone else has done that already
04:33:33FromDiscord<Technisha Circuit> By using the C++ backend, does that break any existing Nim modules?
04:33:37FromDiscord<Technisha Circuit> Oh?
04:33:42*ftsf_ quit (Ping timeout: 258 seconds)
04:33:48FromDiscord<Yardanico> Well C++ backend is pretty stable
04:33:49FromDiscord<Technisha Circuit> I was looking at import cpp
04:33:55FromDiscord<Technisha Circuit> So it should be fine?
04:34:04FromDiscord<Yardanico> Yeah
04:34:53FromDiscord<Yardanico> And about another way - for example there's SFML in C++ and C bindings to it "CSFML", there's imgui and C bindings "cimgui"
04:35:06FromDiscord<Technisha Circuit> Oh nice
04:35:10FromDiscord<Yardanico> https://github.com/Extrawurst/cimgui
04:35:13FromDiscord<Technisha Circuit> Thanks
04:36:13FromDiscord<Technisha Circuit> How would i do it with Importcpp? I want to use Sleepy discord just so i can test Cpp libraries in Nim
04:36:51*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
04:37:43FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma
04:37:47FromGitter<kaushalmodi> Here's one simple example of binding Nim with C++ lib: https://github.com/kaushalmodi/std_vector/blob/master/src/std_vector.nim
04:38:10*Lord_Nightmare joined #nim
04:39:49FromGitter<kaushalmodi> here's the crux: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ebb7a152baa19185466d194]
04:50:50*dadada__ quit (Ping timeout: 260 seconds)
04:57:08*dadada joined #nim
04:57:31*dadada is now known as Guest83621
05:00:53FromDiscord<Benumbed> false != False :/
05:01:36FromDiscord<Benumbed> I had a real moment trying to figure out why `False` was not defined
05:03:38Yardaniconim has partial case insensitivity
05:03:49Yardanico"partial" <- everything except first letter (because of types)
05:03:59Yardanicoif you really want to have False you can just do ""const False = false"
05:04:04FromDiscord<Benumbed> Oh I know
05:04:06FromDiscord<Benumbed> I was just griping
05:04:47FromDiscord<Benumbed> partial case sensitivity doesn't bite me much, but when it does it gives me a bit of pause trying to figure out WTF happened 🙂
05:13:16leorizeI'm adding mixed highlighting to nim.nvim (ie. highlight C code in emit as C)
05:14:00leorizequestion is: should I highlight only the C code and not the various Nim string escape characters?
05:14:57*waleee-cl quit (Quit: Connection closed for inactivity)
05:21:14*Guest83621 quit (Ping timeout: 256 seconds)
05:24:13FromDiscord<Technisha Circuit> Thanks!
05:26:41*narimiran joined #nim
05:26:57*dadada__ joined #nim
05:29:57FromDiscord<Technisha Circuit> How hard would it be to make the Nim JS backend use JavaScript's IO?
05:30:13FromDiscord<Technisha Circuit> So console.log instead of raw echo
05:30:19Yardanico???
05:30:26Yardanico-d:nodejs for some simple IO
05:30:31Yardanicono stuff like stdio/stdout though
05:30:36FromDiscord<Technisha Circuit> Oh okay, thanks :p
05:30:39FromDiscord<Technisha Circuit> Oh okay
05:30:39Yardanicobecause nim's JS backend is specifically targeted at frontend
05:31:12FromDiscord<Technisha Circuit> Oh okay
05:31:16FromDiscord<Technisha Circuit> For the web then
05:44:46*leorize[m] uploaded an image: 1589348633_grim.png (23KB) < https://kde.modular.im/_matrix/media/r0/download/asra.gr/LLZXumrEYWvRYVvfVPAvClSY >
05:45:00leorizenarimiran, disruptek: new nim.nvim feature ^ anyone interested?
05:45:43leorizethis basically let you choose what language to highlight in `emit`
05:45:52leorizeby default I set it to C
05:46:05leorizebut you can customize it to JS or whatever as wanted
05:46:51leorizealso feedback wanted :P
05:47:01leorizewhen should I apply this kind of highlighting?
05:47:08leorizeonly for trible quoted literals?
05:47:10leorizetriple*
05:51:04Yardanicodoes "mod" in Nim behave the same as "%" in Python? I'm trying to port a simple math script for (fast) decomposition of a number into two prime cofactors (for telegram mtproto), but my Nim version doesn't really work :D
05:51:08*dadada__ quit (Ping timeout: 272 seconds)
05:51:57Yardanicopython version - https://play.nim-lang.org/#ix=2lR6
05:52:00Yardanicomy attempt at nim version - https://play.nim-lang.org/#ix=2lR7
05:54:19Yardanicobasically I need to find the biggest prime cofactor of a number and then to find the second one I can just divide the number by the first cofactor
05:57:00*dadada joined #nim
05:57:23*dadada is now known as Guest89109
05:58:06YardanicoI mean I can do the naive algo but it'll be quite slow :P
05:58:55narimiranleorize: oh, nice! i personally don't use emit, but nice feature
05:59:01narimiranYardanico: it is not the same as python's %
05:59:05Yardanicouh
05:59:11Yardanicothat's bad :P
05:59:25narimiranwait a bit, there's a python-like version, let me find it
05:59:27Yardanicomaybe I should look into nimpylib
05:59:37narimiran(the difference is for negative numbers)
05:59:39Yardanicohttps://github.com/Yardanico/nimpylib/blob/master/src/pylib/ops.nim#L37
05:59:43Yardanicothis one maybe
06:00:05narimiranhttps://nim-lang.github.io/Nim/math.html#floorMod,T,T
06:00:29Yardanicooh thanks a lot
06:01:45Yardanicohmm still doesn't correctly work, maybe I ported something the wrong way
06:01:53narimiranit might be that :)
06:05:08narimiranyou sure it's not `random` producing different values for each version? :D
06:05:19Yardaniconah now I tested with same predefined numbers
06:05:25Yardanicoand it's still broken for nim
06:05:29YardanicoI'll try porting again
06:05:48YardanicoI'll log all numbers to compare where the difference starts to appear
06:05:54narimirantry to put some more parentheses
06:06:02narimiranmaybe the precedence is different
06:06:14narimirane.g. here: `(y * y) mod N + c`
06:06:33Yardanicowell I replaced it by floorMod anyway
06:06:36Yardanicowhich has parens
06:07:21Yardanicothe biggest thing I'm afraid of is that Python version goes over uint64 somewhere :P
06:08:27leorizedon't worry, python don't have arbirtary length precision int iirc
06:08:33narimiranit does
06:08:47Yardanicoleorize: sadly it actually does :)
06:08:52narimiranso: worry :D
06:08:57Yardanico2**1000 works fine in python
06:09:01Yardanico(2^1000)
06:09:45narimiran`y * y` would be my first suspect
06:09:48leorizeyou gotta baing out stint then :P
06:10:18Yardaniconarimiran: well that y is a "random" number, I can make it smaller
06:10:56narimirani know, i'm just saying it's that place that i would be worried about overflowing
06:10:58leorizewell 2 ^ 64 * 2 ^ 64 == 2 ^ 128
06:11:03leorizeso stint[128] :P
06:12:05Yardanicothis algo I'm porting is apparently Brent's modification of Pollard's rho algorithm
06:12:49Yardanicohttps://en.wikipedia.org/wiki/Pollard%27s_rho_algorithm
06:13:10YardanicoI'll try porting from wiki :D
06:16:41Yardanicooh wait it actually works, although it's slower than this python script, but I'll improve it later probably
06:18:26Yardanicoor I'll try to implement brent's algo from the paper https://maths-people.anu.edu.au/~brent/pd/rpb051i.pdf
06:20:52*Guest89109 quit (Ping timeout: 246 seconds)
06:21:00Yardanicooh, seems like 93% of time is spent in gcd
06:21:03Yardanicomakes sense
06:27:04*dadada__ joined #nim
06:32:24*PMunch joined #nim
06:39:36*gokr joined #nim
06:45:15*liblq-dev joined #nim
06:46:19*solitudesf joined #nim
06:46:44FromGitter<gogolxdong> @kaushalmodi what does std::vector<'*0>() mean?
06:46:55Yardanicoit's explained in nim manual
06:47:03Yardanicohttps://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma
06:47:13Yardanico"An apostrophe ' followed by an integer i in the range 0..9 is replaced by the i'th parameter type."
06:50:46*dadada__ quit (Ping timeout: 260 seconds)
06:50:50FromGitter<gogolxdong> ah ,manual has been updated, ours is outdated.
06:51:19Yardanicoours?
06:51:47Yardanicoand idk how old your manual is
06:51:48FromGitter<Willyboar> chinese edition
06:51:54Yardanicothat thing was in nim manual in nim 0.15
06:51:58Yardanicohttps://nim-lang.org/0.15.0/manual.html#importcpp-pragma-importcpp-for-procs
06:52:07Yardanicoheck even in 0.13 https://nim-lang.org/0.13.0/manual.html#importcpp-pragma-importcpp-for-procs
06:52:22Yardanicoso it was probably just not translated :P
06:53:48FromGitter<gogolxdong> missed that part probably then. :)
06:56:59*dadada joined #nim
06:57:23*dadada is now known as Guest46880
06:58:26FromGitter<gogolxdong> nah, it's there, I've fogotten them, dear.
06:59:16FromGitter<gogolxdong> but it's true they are rarely used.
07:02:42FromGitter<bung87> translate js class to `ref object of T` is right choice?
07:05:54Yardanicoif you don't need inheritance you can just have "ref object"
07:07:23FromGitter<bung87> ok, I think I also need inheritance
07:10:52*fredrikhr joined #nim
07:13:23PMunchJS has inheritance?
07:13:32PMunchLast I checked it doesn't
07:13:40Yardanicoyes, kinda
07:13:52PMunchHmm
07:13:59Yardanicohttps://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Inheritance
07:14:06PMunchI do remember that there were some ways to hack around it..
07:14:11Yardanicouhh I guess I give up on this prime factorization for now
07:14:21Yardanicoi can't make my nim version work as fast as python and it doesn't even work right now :D
07:14:26Yardanicogonna post a question on the forumn
07:15:13PMunchHmm, do we have RW locks in Nim?
07:17:50PMunchHmm, so there are some in the "posix" module
07:17:55PMunchI guess I can use those
07:21:06*Guest46880 quit (Ping timeout: 260 seconds)
07:26:15PMunchAre there no cross-platform RW locks?
07:27:00*dadada__ joined #nim
07:33:09FromDiscord<mratsim> it's not a synchronization primitives
07:33:26FromDiscord<mratsim> fancier locks can go in a library
07:39:09Yardanicois there any nim library to use streams with sockets?
07:39:20Yardanicoso I don't have to write in a stringstream, then read it and send the data as string? :P
07:50:04FromGitter<bung87> maybe you could implements a `pipe` api
07:51:07*dadada__ quit (Ping timeout: 260 seconds)
07:56:36FromDiscord<mratsim> @Yardanico, pretty sure we have that in either Chronos or FastStreams
07:57:00*dadada joined #nim
07:57:23*dadada is now known as Guest97932
07:59:10leorize[m]I did the impossible and implemented C highlighting for emit in nim.nvim: https://github.com/alaviss/nim.nvim/commit/dc868703122cfe39d52a0d192ab24b7cbcbbd878 :)
07:59:40PMunchNeat!
08:09:02*zacharycarter joined #nim
08:13:25leorizePMunch: you might want my indentation script now, I built the thing to perfection :P
08:14:30*zacharycarter quit (Ping timeout: 258 seconds)
08:14:49leorizenarimiran, liblq-dev, Zevv, disruptek: please switch back to master, I've merged indent-rewrite there and added some small goodies
08:14:59narimiranalrighty
08:15:15leorizeplease do report any issue with indentation and/or highlighting
08:15:26leorizenow I'm gonna go to bed
08:16:12PMunchleorize, huh?
08:16:16PMunchIndentation script?
08:16:25leorizethe auto indentation script for vim
08:16:29PMunchOoh
08:17:03PMunchAnd where can I find that?
08:17:16leorize[m]https://github.com/alaviss/nim.nvim/blob/master/indent/nim.vim
08:17:24PMunchThanks :)
08:17:37*konvertex joined #nim
08:18:00leorizedepending on your plugin, you might need to tweak some regex I use to filter unneeded syntactic elements
08:18:09leorizebut I think my regex is universal enough
08:25:50*krux02 joined #nim
08:56:00FromGitter<bung87> https://github.com/bung87/ts2nim please give me advise , check the table not sure am I correctly translate it
08:56:47liblq-devTS `number` is more close to a Nim `float`
08:58:04liblq-devTS let -> Nim var, TS const -> Nim let
08:58:13liblq-devTS var doesn't have a Nim counterpart
08:58:37FromGitter<bung87> `TS number is more close to a Nim float` yeah,someone also mentioned this.
08:59:56FromGitter<bung87> `TS let -> Nim var, TS const -> Nim let`, no ts can declare any thing to const, then modify members, but nim doest
09:00:51Yardanicoyou can in nim if an object is a ref type
09:01:01Yardanicobecause then "let" means that the reference is immutable, not the underlying data
09:01:15Yardanicoand afaik all "objects" in TS are ref
09:01:15FromDiscord<Recruit_main707> https://github.com/zielmicha/go2nim
09:01:15FromDiscord<Recruit_main707> has someone tried this=
09:01:45Yardanicoconsidering number of stars and last commit I doubt it :P
09:01:47FromGitter<bung87> Yardanico ok, that's really helped me
09:02:25FromGitter<bung87> go2nim that's I thought before, and the name `go2nim` is cool
09:04:29FromGitter<bung87> Yardanico `and afaik all "objects" in TS are ref` , there's also literal
09:04:47Yardanicoso can you modify "literals" declared with let?
09:04:52Yardanicolike "let a = 5; a = 3"
09:06:00*dddddd joined #nim
09:06:08FromGitter<bung87> yeah , in js it is
09:06:16Yardanicobut we're talking about TS
09:09:34FromGitter<bung87> you can check it here https://www.typescriptlang.org/v2/en/play
09:10:07YardanicoI don't want to write in any type of JS anyway :)
09:10:26FromGitter<bung87> It's superset of js , not entirely another language.
09:10:41Yardanicobut do it as liblq-dev said
09:10:44Yardanicots let -> nim var
09:10:46Yardanicots const -> nim let
09:13:16FromGitter<bung87> `let a:seq[int] = @[] ⏎ a.add 1`
09:13:33FromGitter<bung87> ```const a= [] ⏎ a.push(1)``` [https://gitter.im/nim-lang/Nim?at=5ebbba3d20eaac185307bf54]
09:13:59Yardanicowell of course, the mappings can't always be the same
09:14:07Yardanicobut the one liblq said will probably be the closest one
09:14:12Yardanicoor just always use var
09:14:39FromGitter<bung87> always use `var` I think better, no need to infer type
09:15:16FromGitter<bung87> like js before es5
09:15:25liblq-devbut all variable declaration statements infer the type
09:15:33liblq-devthere's no problem in doing let a = @[1, 2, 3]
09:15:54liblq-devit doesn't work for an empty seq because there are no elements in the seq to infer the type from
09:16:17liblq-devalso making a let a: seq[int] = @[] is kind of pointless since you can't add to the seq
09:16:49*silvernode joined #nim
09:17:11FromGitter<bung87> I just says in ts `const a = [];a.push(1)` is valid
09:18:46FromGitter<bung87> during translating I don't infer the type, just using estree ast
09:18:58Yardanicowe understand that
09:19:08Yardanicobut in nim all of var/let/const can infer the type
09:20:05FromGitter<bung87> ok , I get it, using var seems fine for now
09:20:54*liblq-dev quit (Ping timeout: 240 seconds)
09:21:24*WilhelmVonWeiner quit (Ping timeout: 272 seconds)
09:22:28FromGitter<bung87> the only obvious problem now, is tuple init parsed as `ArrayExpression` node.
09:24:06FromGitter<bung87> I may store variable declaration during translating , and infer closest variable type
09:26:28alexander92hey
09:26:36alexander92not using types might be hard
09:27:17alexander92we did translate some python and ruby to nim and iirc we did try to infer at least some of the local types as well
09:27:46alexander92our experiments never got to any mature state, so not really a great example
09:27:59alexander92but i love to talk about lang 2 lang translation
09:28:06FromGitter<bung87> :)
09:28:20alexander92one important thing is
09:28:25alexander92do you want idiomatic nim output
09:28:28alexander92or just valid output
09:28:51FromGitter<bung87> current approach seems fine, I will using type infer when actually needs.
09:29:38FromGitter<bung87> yeah, I thought validate whole project after translating, may just `nim c`?
09:29:46alexander92no no
09:29:48alexander92my point is
09:29:53Yardanicono, he asks you if you want to get good nim code
09:29:56Yardanicoor just working nim code
09:29:58alexander92yeah
09:31:06FromGitter<bung87> ah, current target is valid code looking , not for running
09:31:08alexander92otherwise it's good to try to do it in the simplest possible way, so it might be wise to not infer for now
09:31:27alexander92ok, so the other thing is e.g.
09:32:01alexander92how do you translate stdlib
09:32:04alexander92invocations
09:32:22alexander92because at one point you need to map "idioms" from one language to another
09:32:42alexander92or at least map some api-s from X to Y
09:33:16FromGitter<bung87> it just for simple task, eg. input string output string
09:33:32alexander92(on the other hand this is probably skippable for javascript in the browser! as nim targets the same api there anyway)
09:33:45alexander92hm, ok
09:33:54alexander92well for algo-s you can really get a long way
09:34:00FromGitter<bung87> so my goal is very small
09:34:18alexander92with mostly translating syntax
09:34:33alexander92ok, would be glad to follow along
09:34:34FromGitter<bung87> but still usefull for translating tiny lib
09:34:53alexander92yeah but
09:35:14alexander92you'd almost always need some manual work on top of the result
09:35:23alexander92but i think this is absolutely fine
09:35:37alexander92and even more realistic than many other approaches
09:35:39FromGitter<bung87> yeah, that's right and expected.
09:35:43alexander92ok
09:37:17*Trustable joined #nim
09:38:37*Guest97932 quit (Ping timeout: 246 seconds)
09:42:01*dadada joined #nim
09:42:25*dadada is now known as Guest18922
09:50:41Yardanicois it wrong to parse json at compiletime to generate Nim definitions for types? :P
09:57:01PMunchWhy would it be?
09:57:07Yardanicojust asking :)
09:57:23PMunchI wrote jsonschema which parses something like typescript definitions into Nim type-checking
09:57:30PMunchNot quite into Nim types, but eh
09:58:29alexander92PMunch actually
09:58:50alexander92if one can separate the typescript defs => nim types part
09:58:58alexander92this can be reused maybe by bung87
09:59:16alexander92and by a newer dts2nim tool
09:59:18PMunchWell it doesn't actually convert them to types
09:59:27alexander92ah ok
09:59:37alexander92ah i see
09:59:40alexander92it makes sense
09:59:47PMunchIt just implements a "verify" procedure that verifies if some JSON matches the typescript definition
10:00:09PMunchAnd a distinct JsonNode type that has accessors for all the defined fields.
10:00:10alexander92btw bung87
10:01:17Yardanicogithub seems laggy today again
10:01:48alexander92one other thing: its possible to just dump json from ts and load it from nim : and just write your compiler in nim
10:02:01alexander92because then you can just convert the Es Tree jsonnodes to
10:02:03alexander92PNodes
10:02:10alexander92and use renderer.nim from the compiler
10:02:13alexander92to generate the nim code
10:02:34alexander92but this might be not needed of course, just another option
10:02:36FromGitter<bung87> wow, that's goood idea
10:02:53alexander92yeah, it shouldn't be hard
10:03:14alexander92just a word of caution renderer.nim does generate invalid code for some cases
10:03:22alexander92but it should be rare
10:03:26livcdIs the fastest json pkg the packedjson?
10:04:03alexander92and as the tool would require a bit of manual review of build errors thats ok
10:04:18alexander92but i think treeform helped improving renderer.nim even more
10:04:27alexander92so it should be ok for most normal code probably
10:04:35alexander92hm, if its used for nimpretty even for most
10:04:57alexander92PMunch ohh good
10:05:16FromGitter<bung87> hmm, but first write estree parser in Nim ?
10:05:18alexander92but still i imagine one can reuse the parsing part
10:05:22alexander92bung87 no no
10:05:39alexander92you do parse in typescript, but then you just dump the resulting data structure as json in a file
10:05:59*Guest18922 quit (Ping timeout: 260 seconds)
10:06:06alexander92and then you start the nim compiler and load the json from it
10:06:58alexander92basically `compiler => run ts_parser (generate ast.json) => run nim_compiler (load ast.json generate nim code)`
10:07:24FromGitter<bung87> ok , json parse part could be a dependency , and then I translate the transpiler itsself ,depends on it , seems work
10:07:54alexander92well, the estree thing might be harder to translate , no idea what kind of code is it
10:08:03alexander92but even this still looks ok to me
10:08:17alexander92after all if people translate typescript its ok to require them to run some typescript
10:09:16alexander92but of course, think about it, you might decide that just producing directly strings with code from typescript is easier
10:09:19alexander92its your choice
10:10:38FromGitter<bung87> I considering it , maybe just make it as a nimble package
10:11:36FromGitter<bung87> when this done,I might write something could import nodejs module from nim
10:12:07*dadada joined #nim
10:12:30*dadada is now known as Guest60258
10:12:47FromGitter<bung87> first narrow it to node module write in ts.
10:13:19alexander92hm, i have to tell you that i'd just import directly nodejs module using the javascript backend
10:13:31alexander92if i use the c backend, i'd wrap a c lib or something else
10:14:03alexander92i'd also thought about more nodejs integration and i received backlash in the past and it's correct: it doesnt make much sense for nim
10:14:10FromGitter<bung87> how do you do that
10:14:19alexander92using a clib ?
10:14:33FromGitter<bung87> `import directly nodejs module `
10:14:48alexander92i just import it using `require` :)
10:14:55alexander92and type it using `importcpp`
10:15:03FromGitter<bung87> no manually work?
10:15:05alexander92or directly just use `.toJs` and cast
10:15:11alexander92err, no
10:15:16alexander92but this is for the javascript backend
10:15:41alexander92but thats what i am trying to explain, right: you already can import any typescript library in nim if you use javascript backend
10:16:20FromGitter<bung87> I saw the nim module for js backend, think better using name `importjs` `exportjs`
10:16:46PMunchHmm, I wonder what would happen if I took all the procedures in the "minilib" and implemented them through vm.registerCallback..
10:17:04alexander92bung87 ! you're right
10:17:12alexander92i think they did add those aliases
10:17:16alexander92but not super sure
10:17:31PMunchSo that every call in the minimal nimscript would actually be calls to the VM
10:17:39PMunchErr, calls to compiled code
10:17:41alexander92but again: you can already do that, so thats way i'd use that instead of your tool usually
10:18:01FromGitter<bung87> not just aliases, they may transform something during compile time.
10:18:20FromGitter<bung87> mapping object to js object
10:18:41FromGitter<bung87> not the plain object in nim..
10:19:29alexander92sorry, i was wrong
10:19:31alexander92yes!
10:19:51alexander92but again, that's why i wouldn't transpile a typescript lib, right
10:20:08alexander92because its easier to just translate typescript definitions to those importjs ones!
10:20:15*dddddd_ joined #nim
10:20:17alexander92without translating the whole code
10:20:21Yardanicokostya/benchmarks , also tested with arc
10:20:22Yardanicohttps://gist.github.com/Yardanico/8a78eaf4e74ede614c26baec7c6f0850
10:20:50alexander92(except if you want to generate C code or to really port a typescript lib to nim : then i'd use your tool!)
10:21:42FromGitter<bung87> https://github.com/nim-lang/Nim/commit/9acbf99efb42d7d3f98f3d1d6677923fc4dd3a28#diff-42ba1d994f4fa8c6ad17a7efae7936ccR129
10:22:01*dddddd quit (Ping timeout: 246 seconds)
10:22:08FromGitter<bung87> there's importjs 16 hours ago.
10:22:21*dddddd__ joined #nim
10:22:29alexander92bung87 yes, ok, this is not my point, i know about it
10:23:39FromGitter<bung87> ok I get your point
10:23:40federico3startProcess outputStream().readAll(), on a process that exited, sometimes hangs forever on the read syscall
10:23:45federico3any help?
10:25:12alexander92bung87 ok, otherwise i am excited about whatever you decide on :D
10:25:25*dddddd_ quit (Ping timeout: 264 seconds)
10:25:44alexander92PMunch sounds intriguing, would it really optimize
10:26:57FromGitter<bung87> I think both way can moving forward...
10:26:59livcdfederico3: uhmm did not happen to me but that was way before 1.2...What process did you start?
10:27:22federico3nim c or nim doc
10:27:34*dddddd__ quit (Ping timeout: 240 seconds)
10:28:31FromGitter<bung87> I ' ll translate whole ts project first see what's next to do
10:28:54alexander92bung87 what do you mean
10:29:40*dddddd__ joined #nim
10:29:52FromGitter<bung87> I dont make choise, I may want both :)
10:29:55*dddddd__ is now known as dddddd
10:30:58*fredrikhr quit (Ping timeout: 258 seconds)
10:31:58FromGitter<bung87> translating, binding, for js ,for c, import, export , bundle, gen modules.
10:33:17*silvernode quit (Ping timeout: 260 seconds)
10:34:47*monokrom joined #nim
10:39:27PMunchalexander92, I don't know..
10:40:09FromGitter<bung87> oh, I got a idea, for std libs , I could just translating deno's
10:41:41FromGitter<bung87> https://github.com/denoland/deno/tree/master/std
10:42:39PMunchalexander92, problem is that "grep -Hnr proc minilib | wc -l" is still over 2000
10:42:48PMunchSo it's not something I really want to do by hand :P
10:43:56alexander92bung87 ok! for both
10:44:19alexander92otherwise it depends, i'd guess most people would use the node's lib if you transpile node libs
10:46:29FromGitter<bung87> they may or may not, if they want compile to c
10:47:14*chemist69 quit (Ping timeout: 244 seconds)
10:48:09FromGitter<bung87> or they nim similar nodejs module api that's no nimble package has
10:48:13*chemist69 joined #nim
10:48:14Yardanicooh nice found another arc bug
10:48:39FromDiscord<Yardanico> @clyybber did you encounter Error: unhandled exception: injectdestructors.nim(405, 13) `not containsGarbageCollectedRef(n.typ)` [AssertionDefect] ?
10:49:12YardanicoI hit it when trying to compile havlak benchmark from https://github.com/kostya/benchmarks with orc (same with arc ofc)
10:50:22alexander92bung87 ok, but they either use directly the nodejs module
10:50:30alexander92without transpilation
10:51:00alexander92ok, i get what you mean, it might be easier to translate if there is a mapping of the node stdlib in native nim
10:51:08alexander92but this is too much work imho for very very little usecases
10:51:28alexander92and i'd just look for a c/rust lib to use usually if thats the case
10:51:50alexander92i'd focus on the browser maybe
10:52:52*silvernode joined #nim
10:53:06PMunchHmm, is there a way to profile nimscript?
10:53:11FromGitter<bung87> ok
10:53:35PMunchIt would be interesting to try a couple of the most used procedures first
10:54:18skrylar[m]hoi
10:57:57narimiranYardanico: have you seen https://en.wikipedia.org/wiki/Modular_arithmetic#Example_implementations ?
10:58:42Yardaniconarimiran: thanks for that link!
10:59:02narimiransorry for not bringing it up earlier :)
11:00:11narimirani'll post it on the forum too, if there will be somebody else in the future with a similar problem....
11:00:25Yardaniconot that forum's search is good enough to find stuff you need :P
11:00:44narimiran:X
11:01:50*silvernode quit (Ping timeout: 260 seconds)
11:04:00*Guest60258 quit (Ping timeout: 256 seconds)
11:05:10*dadada joined #nim
11:05:28dadadaremember a discussion on here about a feature that makes compile time variables available at runtime too
11:05:34dadadathis is one of the first times that I actually need something like this :-)
11:05:36dadadavar foo {.compileTime.}: bool .... -> so how can I now have this at runtime with the same symbol?
11:05:41dadada... sorry if reposting, there was a net issue
11:06:23Yardanicouh
11:06:26alexander92you can always have var fooRT = foo # right
11:06:33Yardanico!eval var foo {.compileTime.} = true; echo foo
11:06:35NimBottrue
11:06:44Yardanico¿que
11:07:08alexander92!eval var foo {.compileTime.} = true; foo = false; echo foo
11:07:10NimBottrue
11:07:15alexander92hmm
11:07:19Yardanicohuh
11:07:34Yardanico!eval var foo {.compileTime.}: NimNode; echo foo
11:07:36NimBotCompile failed: /usercode/in.nim(1, 40) Error: type mismatch: got <NimNode>
11:07:45FromDiscord<Recruit_main707> isnt var {.compileTime.} the same as const??
11:07:49Yardanicono
11:07:56alexander92!eval var foo {.compileTime.} = true; static: foo = false; echo foo
11:07:57Yardanicowith var compiletime you can change var at compile-time
11:07:58NimBot<no output>
11:08:11Yardanicoalexander92: it did echo in the compiler log
11:08:18Yardanicostatic: (foo = false, echo foo)
11:08:20alexander92yeah but i dont know how to access
11:08:25alexander92wow
11:08:34Yardanicowow?
11:08:39alexander92hm, but how to write
11:08:44alexander92two lines to !eval ?
11:08:48Yardanicoyou can't
11:08:54alexander92:D
11:08:56Yardanicobut let me show my ultimate ability
11:09:09dadadais there a when compileTime: code1 else: code2 ... I know static:, but there's no else part for it
11:09:15Yardanicowhen nimvm
11:09:21Yardanicowhen defined(nimvm) or something like that
11:09:28dadadaya, thanks
11:09:42alexander92when nimvm ? or defined?
11:09:53Yardanicohttps://nim-lang.org/docs/manual.html#statements-and-expressions-when-nimvm-statement
11:09:58Yardanicowhen nimvm
11:10:15alexander92<3
11:10:22alexander92guys
11:11:15alexander92debugging is fun
11:11:46Yardanicoalexander92: btw did you see https://www.youtube.com/watch?v=QXneLboQMB0 ?
11:12:11Yardanicohttps://github.com/hediet/vscode-debug-visualizer/pull/51
11:12:13disbotAdd Nim demo
11:12:42Yardanicothat extension also supports graphs
11:15:17*kitech1 quit (Ping timeout: 260 seconds)
11:16:30*kitech1 joined #nim
11:21:32alexander92Yardanico <3
11:21:36alexander92that's superb
11:21:47FromDiscord<Rika> !eval var foo {.compileTime.} = true; (static: foo = false); echo foo
11:21:49NimBotCompile failed: /usercode/in.nim(1, 47) Error: expected: ')', but got: '='
11:21:52FromDiscord<Rika> 😮
11:21:54Yardaniconah I already tried that Rika
11:21:57Yardanicoalexander92: and the idea is quite "simple stupid"
11:22:00FromDiscord<Rika> i wouldnt know
11:22:00alexander92we dont do stuff like this
11:22:04alexander92but we
11:22:07Yardanicothe extension just reads json from the debuggger :D
11:22:09alexander92i mean we have a similar feature
11:22:24FromDiscord<Recruit_main707> Yardanico: does it work with the c backend?
11:22:27alexander92but the way it functions is different
11:22:30Yardanicowdym? @Recruit
11:22:33Yardanicothat's what I used it with
11:22:41Yardanicowith lldb as a debugger
11:22:51Yardanicobecause it's simple to define NCSTRING as string there
11:22:59alexander92i'd show you when we can get to testers
11:23:08FromDiscord<Recruit_main707> it says c++ on throw
11:23:15Yardanico??
11:23:19alexander92but its a great extension
11:23:19FromDiscord<clyybber> @Yardanico nope
11:23:27Yardanicoah I see what you mean
11:23:34Yardanico@Recruit nah it's just from lldb
11:23:38Yardanicodefault breakpoints I guess
11:24:18Yardanicosee https://github.com/hediet/vscode-debug-visualizer/blob/master/demos/nim/.vscode/launch.json how I tell LLDB to understand that NCSTRING is c-string
11:24:33YardanicoI guess with enough lldb-fu we can make something a bit similar to nim-gdb
11:24:46Yardanicohttp://lldb.llvm.org/use/variable.html
11:24:51alexander92oh nice
11:24:58alexander92otherwise it should be possible
11:25:07alexander92if they have support for something like pretty-printers
11:25:31Yardanicoseems so
11:25:41alexander92i can take a look
11:25:44alexander92one day
11:25:54Yardanicoit's python as well
11:25:58*Yardanico left #nim ("https://quassel-irc.org - Chat comfortably. Anywhere.")
11:26:01*Yardanico joined #nim
11:26:03Yardanicohttps://github.com/fantaosha/LLDB-Eigen-Pretty-Printer/blob/master/LLDB_Eigen_Pretty_Printer.py
11:26:05alexander92ugh i really want to show some of our ideas
11:26:08Yardanicofound some example
11:26:13alexander92otherwise another open source debug idea i have is a
11:26:21alexander92simple nim vm debugger
11:26:29alexander92but i am not sure how useful that is
11:26:32Yardanicooh you're talking about nimconf?
11:26:41alexander92not really, just like for a project
11:26:42alexander92in general
11:26:43*zama quit (Ping timeout: 260 seconds)
11:27:02*ftsf quit (Ping timeout: 260 seconds)
11:27:12alexander92ah yeah this does look similar
11:27:12Yardanicohttps://lldb.llvm.org/use/python.html
11:27:19alexander92it should be maybe possible to reuse some of the logic
11:27:35Yardanicoand lldb can be used by binaries compiled with gcc too of course
11:27:42YardanicoI wonder if the integration is better if I compile with clang though :P
11:27:53alexander92but it isnt too important
11:27:55alexander92yes btw
11:28:01alexander92i think they do have some column info in dwarf
11:28:14alexander92but not sure if this is useful for the nim -> c thing
11:28:26alexander92on the other hand, gcc also can generate column info
11:28:38alexander92but there might be differences between both
11:28:50*zama joined #nim
11:42:02PMunchHmm, slight problem with implementing the entire stdlib in native code with callbacks for nimscript.. Data is sent as PNodes, which will probably be a PITA to decode into the required Nim code..
11:43:34PMunchI wish there was a way though to take these files and strip all documentation comments and evaluate the `when not defined(nimscript)` cases to remove the procedures you wouldn't be able to use anyways..
11:46:55Araqhuh? do you think it's reasonable to do that? why do you need the "entire" stdlib within nimscript
11:49:07*poohman quit (Ping timeout: 260 seconds)
11:49:18*zacharycarter joined #nim
12:01:22FromDiscord<Prodigle> What's the keyword to do the opposite of addr? E.g from a pointer to the data
12:01:31Yardanicooperator []
12:01:35Yardanicoyourptr[]
12:01:38FromDiscord<Prodigle> ty
12:01:41dadadaexpandMacros works for macros, is there something that works in the same way for pragmas?
12:01:53dadadato know what user defined macros expand to when used as pragmas?
12:01:55Yardanico@Prodigle see https://nim-lang.org/docs/manual.html#types-reference-and-pointer-types
12:02:04Yardanicoit's explained in more detail there :P
12:03:48*hax-scramper joined #nim
12:03:51PMunchAraq, I'm trying to boil it down as much as possible. I already have a "minilib" which is only the parts that you need in order to compile a very basic example. But a lot of the stuff in these files are obviously never used (eg. the "from unicode import toLower, toUpper" leads to a lot of stuff being "required" while never actually used)
12:04:14PMunchOr were you talking about implementing it as callbacks?
12:04:43PMunchThat was just a thought I have. Instead of shipping the stdlib sources, why not just compile the procedures into the binary and expose them as callbacks.
12:04:55*joshbaptiste quit (Ping timeout: 246 seconds)
12:04:56PMunchBut that would be a massive PITA..
12:05:44PMunch(By the way, I plan to have a switch/detector to see if you have Nim installed, and if so try to use the stdlib it ships. So you won't be "stuck" with only the minimal stuff I ship)
12:05:51dadadanothing to show expanded pragmas?!
12:06:02*supakeen quit (Quit: WeeChat 1.9.1)
12:06:20Yardanicodadada: never heard of this, expandMacros doesn't work?
12:06:21PMunchWouldn't that just be the same as expandMacros?
12:06:28Yardanicothen you'll have to modify the pragma definition I guess :P
12:06:34Yardanicoso it prints the resulting code
12:06:44*supakeen joined #nim
12:07:00dadadaYardanico: okay, maybe it does work, ah, dammit, it's just not how I expect things to work... that's all, yes after all it did work, sorry for using your time
12:07:00PMunchOne thing that irks me about expandMacros, it only works if the code is valid.. So it's useless for debugging
12:07:12lqdev[m]echo result.repr should work
12:07:15PMunchUnlike "echo result.repr"
12:07:32hax-scramperHow I can convert macro argument to `typedesc`? I want to use `typetraits.arity` in macro.
12:07:33Yardanicoit depends on what kind of "debugging" we're talking about though :P
12:08:20dadadaokay, I made this very small macro for something like var myVar {.doStuff.}: bool = true ... and inside the macro there's no way to know whether the expression is a var or a let you just get
12:08:50dadadaArglist: Ident "myVar" Ident "bool" Ident "true"
12:09:08dadadaso if I want to produce different code depending on var/let or something else, how is it done?
12:09:57Yardanicodon't do it as a pragma and wrap the whole code block in the macro instead?
12:10:05Yardanicoor maybe both at the same time
12:10:14Yardanicocheck if a variable has your own pragma in a macro
12:10:44dadadayeah, but it'd be much cooler as a pragma, and it'd fit in with the other pragmas, doesn't want to be a misfit, you know how those are treated in school
12:10:56Yardanicohow would it "fit"? :D
12:11:20lqdev[m]hex-scramper: generate a call to arity() in your macro?
12:11:34dadadait's analogous to .compileTime. ... want to write a pragma that does some magic so a var works at compile and runtime ... just trying some stuff
12:11:57lqdev[m]or maybe generate a call to another macro that gets a typedesc, and pass typeof(yourNimNode) to that other macro from your main macro
12:14:00hax-scramperlqdev[m]: No, just call arity inside of a macro body. Something like this: `macro printArity(t: typedesc) = echo arity(t)`.
12:14:07dadadawell, the brutish way I know could work is to use lineInfo and then parse the code by hand
12:17:04hax-scramperI can of course just parse AST and get necessary parts but I wanted to know if there any way I can just convert between `NimNode` and `typedesc`. Latter one is defined as compiler magic and I can't just write my own converter because of that.
12:25:51*liblq-dev joined #nim
12:27:45AraqPMunch, minilib is system.nim plus the system/ directory
12:27:54Araqwhat else would be required?
12:28:23PMunchThis stuff: http://ix.io/2lSo
12:28:42PMunchIn order to run this code: http://ix.io/2lSp
12:28:49FromGitter<bung87> fatal: unable to access 'https://github.com/bung87/ts2nim.git/': The requested URL returned error: 429
12:28:59Yardanico?
12:29:06Yardanicowhat are you trying to do?
12:29:10PMunchaddFloats is declared in "exposed" and is implemented in the code
12:29:23Yardanicoah nvm @bung87 it's probably due to github behaving badly today
12:29:25FromGitter<bung87> travis results.
12:29:32Yardanicorestart the build then
12:29:56FromGitter<bung87> never thought 429 would happen to github..
12:30:12Araqhuh, what is "import exposed"?
12:30:16FromGitter<bung87> ok,then
12:31:36*kradnoel joined #nim
12:31:37PMunchAraq, http://ix.io/2lSr as I said, it's only a declaration that is implemented in the program
12:33:10PMunchIt's basically just this: https://github.com/nim-lang/Nim/tree/devel/tests/compilerapi
12:33:43Araqwhy does it need more than system.nim
12:33:52Araqthat's the interesting question for me
12:34:20PMunchWith only "system.nim" and the "system" folder I get this error: system.nim(1132, 19) Error: cannot open file: std/private/since
12:35:45Araqgah, that's a regression
12:35:55Araqthis must be system/since.nim
12:36:11PMunchAdding that file I get this: system/assertions.nim(4, 19) Error: cannot open file: std/private/miscdollars
12:36:26Araq-.-
12:36:35Araqsame story
12:36:58PMunchAdding that file I get this: system/nimscript.nim(275, 6) Error: cannot open file: os
12:37:35PMunchAnd that brings in pretty much the rest
12:38:00Araqah and that's my fault. that's what I get for fixing bugs. however
12:38:08PMunchThrough strutils and pathnorm
12:38:09Araqdon't define NimScript in tcompilerapi
12:38:54PMunchI don't, it's set in createInterpreter in nimeval.nim
12:39:09PMunchIt sets nimscript and nimconfig
12:39:18Araqyeah, bad idea
12:40:53PMunchUndefining it gives me this error: system.nim(529, 11) Error: cannot open file: system/ht
12:41:01Yardanicoht?
12:41:02PMunchErm, that should be "hti"
12:41:03Araqht?
12:43:41PMunchNot having nimscript define leads it to require stuff like ansi_c, memory, atomics, cgprocs etc.
12:43:52PMunchAnd that hti thing
12:44:22*NimBot joined #nim
12:44:36Araqso add a new define nimTiny and ensure nimscript isn't included when nimTiny is defined
12:48:13FromGitter<wrq> I think the nim forum should be moved to a Discourse instance. It'd be a lot easier to have a full-featured platform for organizing medium to large-sized efforts.
12:48:20Yardanicouhhh
12:48:21Yardanico:DDDD
12:48:39Yardanicoone of the reasons it was created is to not use discourse
12:48:43Yardanicohttps://github.com/nim-lang/nimforum
12:49:08FromGitter<wrq> Right, but the quality of it is severely lacking. I am signed in right now and there's no sign-out function?
12:49:35FromGitter<wrq> I don't see any controls except New Thread, and upon trying that, I am told my email is not confirmed, though I have no email about Nim forum.
12:49:58Araqwell most of us can login/logout so there is that ;-)
12:50:13zacharycarterso you've never used the forum but you want to switch to discourse to organize large efforts?
12:50:27zacharycarteralso - I can logout
12:50:28Araqin order to confirm your email, confirm your email, discord won't help with that problem
12:50:46Yardanico@wrq to sign out you have to click on your profile pic in right upper corner and press logout
12:50:50Yardanicoseems simple enough
12:51:00FromGitter<wrq> I don't see a profile in in the corner
12:51:06FromGitter<wrq> let me share a screenshot
12:51:08Yardanicothen are you sure you're logged in?
12:52:51alexander92@wrq there are still some bugs in the forum, but it seems surprisingly ok to me for a language forum, even if not as powerful as discourse
12:53:07Yardanicoyeah, and also @wrq - current version deployed doesn't have all latest features nimforum has
12:53:19Yardanicocheck https://forum.my-toolbox.xyz/ to see how latest nimforum looks and works :P
12:53:27Yardanicoit's my test instance
12:53:34alexander92and dogfooding/example software in a language are useful enough for nimforum to be a better option in this case
12:53:42Yardanicoyeah that too
12:54:49FromDiscord<mratsim> Plus it's the best test for async/httpbeast
12:54:59Yardanicowell it's single threaded with httpbeast anyway
12:55:03FromGitter<wrq> https://imgur.com/a/RMqmURr
12:55:04Yardaniconimforum uses some global variables as of now
12:55:15FromDiscord<mratsim> httpbeast is multithreaded though no? cc @dom96
12:55:16Yardanico@wrq it's there on the right
12:55:17YardanicoI see it
12:55:18Yardanico@mratsim it is
12:55:20Yardanicowith --threads:on
12:55:31Yardanicobut nimforum doesn't compile because it uses some global vars as I said :) I tried
12:55:51FromGitter<wrq> ah, so it is
12:55:54PMunchAraq, if I leave the nimscript symbol defined, but don't define the nimconfig symbol I end up with this list of required files: http://ix.io/2lSA which I'm guessing is closer to what you had in mind
12:55:55FromDiscord<mratsim> global mutable vars?
12:55:59YardanicoI think so, yes
12:56:05FromDiscord<mratsim> ah, meh
12:56:09Yardanicolemme check the error again to find where that happens
12:56:10FromGitter<wrq> nevertheless, I think it's a fine effort, but a discourse instance would be much more pleasant to use
12:57:06FromDiscord<mratsim> Can we add Nim highlighting to a Discourse?
12:57:32alexander92@wrq it's always a tradeoff: after all on the other hand, it's better to have a healthy ecosystem of forums
12:57:35FromDiscord<mratsim> my biggest grip with nimforum is choosing RST instead of markdown for post syntax
12:57:48PMunchnimhcr is included because of minilib/system.nim:3029: include nimhcr which is behind a "when not defined(createNimHcr)" check
12:57:58alexander92the same way there is healthy ecosystem for chats/slack-like apps
12:58:08alexander92mratsim yeah
12:58:14FromDiscord<mratsim> otherwise it's in an OK enough state that dogfooding is beneficial
12:58:19alexander92there could be at least an option
12:58:26alexander92but that's a flamewar topic :( :D
12:58:29Araq*if* we switch (and it's a big if), we should move to github's forum stuff
12:58:31FromGitter<wrq> I'm not saying remove nimforum
12:58:32Yardanicowell our rst parser is also a markdown parser anyway :P
12:58:37YardanicoAraq: well it's not ready yet anyway
12:58:51alexander92huh is this new https://github.community/
12:58:56FromGitter<wrq> Nimforum should remain as an example project, beneficial to many users if they pursue webdev
12:59:03alexander92but i still think nimforum is good enough for now
12:59:07FromGitter<kaushalmodi> > <mratsim> my biggest gripe with nimforum is choosing RST instead of markdown for post syntax ⏎ ⏎ Same here
12:59:26zacharycarter+1 on that
12:59:29FromGitter<wrq> and, I think a full-featured platform as an alternative would be preferred by most users
12:59:30zacharycarterother than that I think the forum is great
12:59:34PMunchI guess if you add "and not defined(nimscript)" to that check you would have only system and system.nim (plus the two files from std that you said were regressions).
12:59:39PMunchAraq ^
12:59:42Yardanicozacharycarter: well rst parser is also a markdown parser :P
12:59:56Araqalso, there could be more than one forum, maybe Python has more than one forum too
13:00:08FromGitter<kaushalmodi> Yardanico: It is.. but not a proper markdown parser, right?
13:00:10Araqyou can summon an unofficial one
13:00:19dom96what. You're actually entertaining the idea of getting rid of the Nim forum?!
13:00:30*Hideki joined #nim
13:00:31Yardanicodom96: he's not
13:00:45Araqit is a "proper" markdown parser, except for the fact that markdown is a family of implementations with an unclear spec
13:00:53FromGitter<wrq> python has hundreds of forums, depending on your perspective
13:00:59FromDiscord<mratsim> just use Github markdown and done
13:01:12*Hideki is now known as Guest38545
13:01:14dom96mratsim: write a parser in Nim for it and I'll do it
13:01:33Araqthere is no need, you can simple patch the existing parser
13:01:38FromDiscord<mratsim> I'm busy trying to write a multithreading runtime 😉
13:01:54FromGitter<kaushalmodi> Yardanico: By "proper markdown parsing", I meant by something like this Nim markdown library that has Commonmark compliant tests etc: https://github.com/soasme/nim-markdown
13:01:57Yardanico@mratsim - about global vars, there's not many, but the biggest is probably the DB
13:02:00dom96hm, this would be a fun project to be fair.
13:02:03FromDiscord<mratsim> anctually making it play well with servers and async
13:02:04Araqbut I'm tired of this myth fighting
13:02:05*dom96 adds it to his project ideas
13:02:12FromGitter<kaushalmodi> dom96: https://github.com/soasme/nim-markdown
13:02:22FromGitter<wrq> discourse uses highlightjs, which has Nim support
13:02:43Yardanicoi doubt it works properly for *all* cases anyway :P
13:02:44dom96kaushalmodi: ooh
13:03:02AraqYardanico, so what, you can use ```nim
13:03:13Araqand # heading and the link syntax
13:03:20YardanicoAraq: I mean discourse
13:03:24Yardanicohighlight.js
13:03:54Araqplus all the stuff that RST has in common with markdown. which is a lot...
13:04:12*rockcavera joined #nim
13:04:36FromGitter<bung87> `prism` is better
13:05:02PMunchprism?
13:05:28Yardanicook time to minimize another compiler crash with arc :P
13:05:55FromGitter<kaushalmodi> Yardanico: This ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ gives ... [https://gitter.im/nim-lang/Nim?at=5ebbf0b32cf0da0ad9fd80c2]
13:06:05FromGitter<wrq> so, dogfooding for the sake of dogfooding seems to be the conclusion of the discourse/nimforum discussion
13:06:15Yardanico@wrq it helps the ecosystem
13:06:22*WilhelmVonWeiner joined #nim
13:06:23FromGitter<wrq> well
13:06:35FromGitter<wrq> it sends the users the message "MY IDEA is better"
13:06:38Yardanicoyou can then ask "why create the language if *insert language name* already exists" ? :)
13:06:45*WilhelmVonWeiner is now known as Guest38566
13:07:24Araqwrq: the message is also "at least our own stuff has different security flaws"
13:08:21FromGitter<bung87> @PMunch https://prismjs.com/
13:08:25FromGitter<wrq> I mean, it would be if it was functioning, I haven't actually gotten the email yet, so I really can't even interact with nimforum presently
13:08:30alexander92wrq sorry, but the community already uses the forum without too much complaint
13:08:40alexander92it is true that this email issue should be fixed
13:08:50FromGitter<wrq> nah, dontt worry about it
13:09:02FromGitter<wrq> araq is fine with it that way
13:09:34dom96"this email issue" is likely gmail being overly strict with our emails
13:09:39alexander92well, if enough people weren't, we/they would just create a discource instance
13:09:49alexander92democracy
13:09:54dom96discourse won't fix that
13:10:07Araqwrq: you can also ask questions on the github issue tracker
13:10:12alexander92hm, but why doesn't this happen with most sites
13:10:15FromGitter<wrq> I've received a password reset email, but no activation email
13:10:35dom96just tell us your nickname and we can activate it for you
13:10:59FromGitter<wrq> "haydenjones"
13:11:09FromGitter<wrq> is the username
13:11:20*cgfuh joined #nim
13:12:19Araqit's not just about the tech we would all like to have instead, the forum is a 100MB database of useful information and code snippets.
13:12:44Araqand migrating the info to discord is more work than improving our forum
13:12:55alexander92btw there is also a subreddit, but its not so active iirc
13:13:00Yardanicowell yeah
13:13:06Araqthere is also Stack Overflow
13:13:12Yardanicoalexander92: sometimes it gets questions though
13:13:13Yardanicolike
13:13:13Yardanicohttps://www.reddit.com/r/nim/comments/giaeev/what_are_the_biggest_weaknesses_of_nim_in_your/
13:13:26dom96Araq, discord != discourse lol
13:13:35Yardanicodom96: well you know what he meant anyway :)
13:13:42FromGitter<wrq> why would it need to be migrated?
13:13:46FromGitter<wrq> these could be parallel
13:13:48Yardanicouh
13:13:53PMunchYardanico, seems to be the same old stuff as replies, so that's good
13:13:58PMunchAt least no big surprises
13:14:04alexander92hm, a web framework indeed
13:14:31PMunchAnother one of my back-burner projects..
13:14:38dadadawhy does proc(name: "something") sometimes work and at other times you neeed proc(name = "something")
13:14:43dadadabug/feature/why?
13:14:49dadadaI like : a little more
13:14:53Yardanicodadada: : never works in this case afaik
13:14:57alexander92PMunch same :D
13:15:00Yardanicoproc(name: ) is object construction syntax
13:15:05PMunchIf it works that's a bug :P
13:15:08YardanicoObject(field1: "a", field2: "b")
13:15:09Araq: is object construction, = is named args
13:15:15PMunchalexander92, maybe we should compare notes sometime?
13:15:20FromGitter<bung87> `SomeNumber* = SomeInteger|SomeFloat` mapping to js number seems more closer?
13:15:23alexander92yeah, i was about to say that
13:15:34dadadaah, I got confused because I used : in an initObject() proc, that makes it look like object construction IMO
13:15:46alexander92for some needed projects it might be more useful to combine forces instead of more PoC-s
13:15:48FromGitter<wrq> I see that my Nimforum "rank" has been changed, thank you, whomever did that
13:15:56Yardanico@bung87 well you have to understand that it'll only exist at compile-time
13:15:59PMunchalexander92, exactly
13:16:06Yardanicoso if you have code which can use either floats or numbers it won't go well
13:16:40FromGitter<bung87> @Yardanico em, ok, let me think more
13:16:42PMunchHmm, curiously enough without the "nimconfig" switch I don't require "system/nimscript" :P
13:18:52dom96wrq: you're welcome
13:20:35FromDiscord<Prodigle> Is there a quick way to debug output the contents of a multi-level deep sequence? Something akin to var_dump in Php?
13:21:59FromDiscord<mratsim> echo?
13:22:20YardanicoAraq: is that code supposed to compile with arc? I mean it does with the default gc https://play.nim-lang.org/#ix=2lSK
13:22:27Yardanicoand "Error: unhandled exception: injectdestructors.nim(405, 13) `not containsGarbageCollectedRef(n.typ)` [AssertionDefect]" with arc
13:22:40Yardanicofound in https://github.com/kostya/benchmarks/blob/master/havlak/havlak.nim
13:26:03PMunchHmm, Araq you might know this. When I use minilib I can't use registerAdditionalOps. This is because it registers the callback as "stdlib.hashes.hashVmImpl". If I change it to "*.hashes.hashVmImpl" it works, so it seems like it somehow detects that minilib is not in fact stdlib. How is this done, and can I override it somehow?
13:29:39Yardanico@kaushalmodi https://forum.my-toolbox.xyz/t/6#10
13:29:59disrupteki'll be late today.
13:30:04Yardanicodisruptek: how late? :(
13:31:11FromDiscord<Prodigle> Anyone any ideas on this? Fails at line 80, setting a var to the value in an array that is definitely there because it's statically initialized https://play.nim-lang.org/#ix=2lSP
13:31:13FromDiscord<Prodigle> Line 80
13:31:38Yardanico@Prodigle yes
13:31:42Yardanicoyou have an off-by-one mistake
13:31:51Yardanicoyou iterate from 0 to 6 inclusive
13:31:58*Guest38545 quit (Remote host closed the connection)
13:32:04narimiranYardanico: there are 7 values there ;)
13:32:10Yardanicooh
13:32:12Yardanicomy bad
13:32:12FromDiscord<Prodigle> toCalculate is 7 big
13:32:13FromDiscord<Prodigle> yeah
13:32:31Yardanicodoes stuff change if you change let to const? :)
13:32:39disruptekprobably stream in 2-3hrs.
13:32:44FromDiscord<Prodigle> Same issue
13:33:05FromDiscord<Prodigle> a .len() output confirms 7
13:33:32narimiranremove `;` on line 78, just to be sure it's not that :)
13:34:35*PMunch contemplates adding --threads:on support for playground
13:34:44FromDiscord<mratsim> the joy of Nim templates into the stacktraces
13:34:51FromDiscord<mratsim> eating*
13:34:53FromDiscord<Prodigle> Removed ; and same error
13:35:00PMunchWhat's with all the whitespace by the way Prodigle?
13:35:03Yardanico@PMunch while you're at it also add --gc:arc and --gc:orc please
13:35:19PMunchTo the playground?
13:35:20FromGitter<bung87> what equals js operator `>>>` in nim?
13:35:23Yardanicoyes, why not? :P
13:35:29narimiranPMunch: and while at it, please fix adding indentation where not needed ;)
13:35:30PMunchI mean I guess..
13:35:46Yardanico@bung87 seems to be unsigned right shift
13:35:49FromDiscord<Prodigle> @Pmunch just copy pasted from my IDE, I split things up into sections when debugging
13:35:56PMunchnarimiran, PRs welcome :)
13:36:02narimiran:)
13:36:06Yardanicohttps://stackoverflow.com/questions/7718711/javascript-triple-greater-than/7718947
13:36:11PMunchThat goes for you too I guess Yardanico :P
13:36:15Yardanicohaha
13:36:26PMunch@Prodigle, ah I see
13:36:28YardanicoI guess we can juts add more dropdowns :P
13:36:40FromDiscord<mratsim> I can reproduce, very weird bug
13:36:46PMunchThey don't render very well on mobile unfortunately..
13:36:58FromGitter<bung87> oh it's called ` zero-fill right shift.`
13:36:59PMunchThe whole layout should be rewritten with grids or something
13:37:04PMunchTo make it a bit more robust
13:37:19FromDiscord<Prodigle> Possibly to do with the time macro?
13:37:19Yardanicowait lol I didn't know nim playground also uses karax nowadays
13:37:24FromDiscord<Prodigle> Though I can't see how
13:37:24*fanta1 joined #nim
13:37:32PMunchbung87, that means cast to unsigned and shr in Nim
13:37:42YardanicoPMunch: seems like JS people abuse it though
13:37:46narimiranwait wait
13:37:52Yardanico"Ignoring its intended meaning, this is most likely where you'll see it used: >>> 0 is unique in that it is the only operator that will convert any type to a positive integer: "
13:37:53narimiran`results`
13:37:54PMunchYardanico, it's been that way since I took over :P
13:38:00FromDiscord<mratsim> you didn't initialize `results` @Prodigle
13:38:01PMunchOr almost that long
13:38:16narimiranwhat is `len(results)` before line 80?
13:38:28FromDiscord<Prodigle> Ah
13:38:31FromDiscord<mratsim> This is unnecessary: results[i] = newSeq[int64]()
13:38:38Yardanicoyou can just do resuilts.add, yeah
13:38:42FromGitter<bung87> @PMunch ok , thanks!
13:38:45narimiranand the answer is: zero :)
13:39:27Yardanico"/* Generated by the Nim Compiler v1.0.0 */" at least not as old as the nim forum :P
13:39:45*xet7 quit (Remote host closed the connection)
13:39:50narimiranyep, change line 82 to `results.add newSeq[int64]()` and it works
13:39:58PMunchThat's just an indicator of how long it's been since I've done anything to the front-end :P
13:39:59FromDiscord<mratsim> you don't need to
13:40:05FromDiscord<mratsim> just remove the line altogether
13:40:31FromDiscord<mratsim> the forst for loop sends the work, the second collect the results
13:40:34FromDiscord<mratsim> first*
13:40:42FromDiscord<Prodigle> Yup! that fixed it, thanks a lot
13:40:48FromDiscord<Prodigle> Silly mistakes cost time 😅
13:41:15FromDiscord<mratsim> well, programming is 80% of the time fixing typos 😛
13:41:30FromDiscord<mratsim> though in the original code I sent you it wasn't there
13:42:14dadadaladies and gentleman let me introduce to you a new pragma that I wrote today that allows to create variables that work on compile and runtime
13:42:17dadadahttps://play.nim-lang.org/#ix=2lST
13:42:26dadadaobviously it's not perfect yet, as it is brandnew
13:42:29FromDiscord<Prodigle> 😅 Would you believe me if I said I've worked in C++ for years. Learning the bare minimum to write Nim code has really made me dumb
13:42:45dadadaand I want to improve it :D but it's pretty cool that it already basically works
13:42:49FromDiscord<mratsim> @dadada, {.UberTime.} ??
13:42:51dadadaleorize: I have done it!
13:42:58dadadamratsim: yep
13:43:06dadadauber = above
13:43:37FromGitter<kaushalmodi> Yardanico: The Markdown parsing on the new nimforum looks much better
13:43:43FromDiscord<mratsim> what problem does it solve?
13:43:56FromGitter<kaushalmodi> I signed up for an account on the test nimforum site and am waiting for email
13:44:05Yardanicowell you should receive it really fast
13:44:14Yardanicowhat's your username so I can confirm you manually? :P
13:44:14*someunknownuser joined #nim
13:44:19*xet7 joined #nim
13:44:23Yardanicothe problem is that I use gmail's SMTP (yes)
13:44:40FromGitter<kaushalmodi> I signed up with my same username: kaushalmodi
13:44:41Yardaniconvm confirmed you
13:44:45dadadamratsim: I have written a module that needs to work at compile and runtime and with something like this it would, currently I need a manual solution (using when nimvm)
13:44:45FromGitter<kaushalmodi> thanks
13:45:14Yardanicoit's running on my vps and doesn't really use a lot of resources
13:45:30Yardanico~34mb ram as of now
13:45:30FromGitter<kaushalmodi> I replied: https://forum.my-toolbox.xyz/t/6#12
13:45:31disbotno footnotes for `34mb`. 🙁
13:45:44someunknownuseris hasData from the osproc module supposed to block the current thread until data is available?
13:45:44Yardanicoand it's not my work btw :P
13:45:44FromGitter<kaushalmodi> do we get email notifications for replies on the new nimforum?
13:45:45FromDiscord<mratsim> I'm still not sure what's the difficulty, I have plenty of code that needs to support both
13:45:55Yardanico@kaushalmodi I honetsly don't know, never tried, but probably not
13:45:59FromGitter<kaushalmodi> Yardanico: your work for setting up that test site
13:46:05Yardanicowell it was not that hard
13:46:37FromDiscord<mratsim> ah it's for pointer types?
13:46:44Araqmratsim: http://okmij.org/ftp/papers/Macros-talk.pdf
13:46:53Araq"The reason macros are so difficult to comprehend is
13:46:53Araqthat they in general, do not compose."
13:46:56dadadamratsim: are you speaking to me?
13:47:06FromDiscord<mratsim> yes
13:47:37FromDiscord<mratsim> you want to store a proc in a variable and you need a workaround for the vm?
13:48:01Araq"We will see however that macros written in a
13:48:02Araqcontinuation-passing style (CPS) always compose."
13:48:06Araqlol, CPS again
13:48:10Yardanicohaha
13:48:21dadadamratsim: again yes in general modules will work at both times, but I had a case where I needed a global variable to store state, and this won't simply work, it either worked in compile or runtime depending if I defined it as {.compileTime.} or not, and then there's the when nimvm: solution, but this would mean you'd have to repeat this trick for every module that needs this, and with .uberTime. it just gets
13:48:27dadadavery very simple
13:48:44Yardanico@kaushalmodi maybe I need to play with nimforum a bit so this forum is not just some throwaway test instance :P
13:48:51Yardanicolike trying to use https://github.com/soasme/nim-markdown
13:48:57shashlick@Yardanico did your libvlc wrapper work? I tried it yesterday and vlc_object.h was required
13:49:07FromGitter<kaushalmodi> Yardanico: That would be awesome
13:49:16Yardanicowell the thing is that it worked when I was testing it with older nimterop @shashlick, I'll try again now
13:49:55dadadamratsim: no I need simple variables, I just store them in procs, to workaround Nim's limitations
13:49:59shashlickOk cool
13:50:23dadadabut I assume uberTime could work with any type of variable proc or not, but I haven't thoroughly tested it yet, it's just the prototype that finally runs
13:50:37FromDiscord<mratsim> @Araq, I know this guy, he is the one behind tagless final, and also behind a DSL for linear algebra in OCAML
13:50:37FromDiscord<mratsim> - http://okmij.org/ftp/meta-programming/HPC.html
13:50:37FromDiscord<mratsim> - https://github.com/mratsim/Arraymancer/issues/347#issuecomment-461009747
13:50:37FromDiscord<mratsim> - http://okmij.org/ftp/meta-programming/lift/convolution.ml
13:50:37FromDiscord<mratsim> - http://okmij.org/ftp/tagless-final/
13:50:40disbotdiscussion: porting Halide to nim ; snippet at 12https://play.nim-lang.org/#ix=2lSX
13:50:42dadadaI've to do some test cases and I know that assignments probably don't work yet, but that should be solvable
13:50:56FromDiscord<mratsim> @dadada, just store the symbol in tables
13:51:25dadadamratsim: what if I don't want the overhead of a table? and why would a table magically work at compile and runtime?
13:51:28Yardanicoshashlick: yeah it works for me
13:51:33Yardanicohow can I try with ast2?
13:51:46Yardanicothe same -f:ast2 ?
13:51:58Yardanicoah maybe I have the old toast binary, let's see
13:52:00shashlickDo you have latest nimterop?
13:52:05FromDiscord<mratsim> But since 2002, DSL composition has significantly evolved: https://github.com/mratsim/Arraymancer/issues/347#issuecomment-461009747
13:52:05FromDiscord<mratsim> especially since the combining Deep and Shallow Embedding DSL paper: http://www.cse.chalmers.se/~josefs/publications/TFP12.pdf
13:52:07disbotdiscussion: porting Halide to nim ; snippet at 12https://play.nim-lang.org/#ix=2lSX
13:52:08*Senketsu joined #nim
13:52:23FromGitter<bung87> @PMunch should I using `uint32()` or `uint64()` or just aways map to uint64?
13:52:25shashlickAlso, someone tried yesterday on windows
13:52:35Yardanicoshashlick: yeah I know I saw it
13:52:41dadadait looks all you ever get here is negativity when you don't go the same path as everybody else
13:52:55FromDiscord<mratsim> @dadada, tables work at runtime and compile-time.
13:53:10PMunchbung87, depends on what the underlying type is..
13:53:18shashlickYou might want to import vlc_common.h
13:53:23dadadamratsim: of course they do, but do they work at both at the same time?!
13:53:47FromGitter<bung87> em , it's mapping from js to nim, so I dont know the type
13:53:47PMunchdadada, why do you say that?
13:53:50FromDiscord<mratsim> I'm not sure why you are talking about negativity
13:54:00Yardanicoshashlick: on latest nimterop it seems to fail, yeah
13:54:08Yardanicoafter adding "elif sym.name[0] == '_': sym.name = sym.name[1..^1]" it complains it can't find media_track_t
13:54:11dadadathe interesting part of .uberTime. is at the bottom in the expandMacros section ... this is what becomes easier
13:54:42dadadathe rest is just implementation details
13:54:49Yardanicoso how do I use ast2 and stuff?
13:55:07FromDiscord<mratsim> I don't understand what's different at the bottom from {.compileTime.}
13:55:30FromDiscord<mratsim> that's why i asked what problem does it solve
13:55:56Yardanicoah nvm sorry
13:56:40Yardanicoshashlick: it seems to actually have worked with ast2 lol
13:57:17Yardaniconice work :)
13:58:04Araqmratsim: well time for me to get up to research
13:58:08dadadamratsim: actually you're right, for this example, this is because they're both evaluluated at compile time I assume, the compiler figures out that test2 never changes and precompiles it all?! but I had a module where you don't know the value of test2 beforehand, so real runtime, and also needed it for compiletime, too, and there it would fail at compile time either for the one or the other case
13:58:33dadadamratsim: and this SHOULD solve it, although I'm not sure I guess because I haven't really tried it on the module that inspired this work
13:59:20FromDiscord<mratsim> ah, seems similar to importc constants
13:59:29PMunchAraq, did you reply to my stdlib vs. * question by the way?
14:00:16dadadaPMunch: because I know that I don't write code simply because "let's see where this gets me", I always have some personal use case that currently doesn't work without workarounds and I ask in this channel to find the best known solutions, and when I don't find something that I like, I try to package something for easy future use
14:00:18FromDiscord<mratsim> Research is all there, and my ML/Linear algebra DSL is inspired by it
14:00:18FromDiscord<mratsim>
14:00:19FromDiscord<mratsim> Developping extensible shallow embeddings (functions in host lang) on top of deep embeddings (fixed AST/IR):
14:00:19FromDiscord<mratsim>
14:00:19FromDiscord<mratsim> Folding Domain Specific Language: Deep and Shallow Embedding
14:00:19FromDiscord<mratsim> Combining Deep and SHallow Embedding for EDSL and paper.
14:00:21FromDiscord<mratsim> Yin-Yang: Concealing the Deep Embedding of DSLs and project report.
14:00:23FromDiscord<mratsim> Uniting Language Embedding for Fast and Friendly DSLs (thesis)
14:00:25FromDiscord<mratsim> Rewriting a Shallow DSL using a GHC extension
14:00:27FromDiscord<mratsim> An Image Processing Language: External and Shallow/Deep Embeddings
14:00:31FromDiscord<mratsim> bottom of this issue: https://github.com/mratsim/Arraymancer/issues/347#issuecomment-461009747
14:00:34PMunch@mratsim, you of all people!
14:00:35disbotdiscussion: porting Halide to nim ; snippet at 12https://play.nim-lang.org/#ix=2lSX
14:00:41dadadaPMunch: and then it's always met with: but why would you need this! ...
14:00:54Yardanicoshashlick: https://github.com/Yardanico/nim-libvlc/commit/660a1cdc648c5b0901203571e934f8e05ce9bc16
14:00:56Yardanicoworks for me now
14:01:20PMunchdadada, we're just curious :P
14:01:22dadadaI can understand it though... I guess you don't technically need this... I've written more than 20 modules now and the need has only come up once or twice so far
14:01:37FromGitter<bung87> `abs(-5 shr 1 shr 1)` == `5 >>> 1`
14:01:47Yardanicouhh no?
14:01:49FromDiscord<mratsim> I can't help you if I don't know what you want to do
14:01:52Yardanicoisn't there a simpler way
14:01:57Araqmratsim: so ... write an RFC? how to fix Nim's template/macro system
14:02:19PMunchThere are a lot of people who comes in here and asks for stuff that might be technically possibly, but after asking them why and showing them the "royale" way of doing it then they go "oh that's much easier!"
14:02:21FromDiscord<mratsim> I'm OK with the macro system? What's wrong with it? Besides maybe needing "breeze"
14:02:25dadadamratsim: you mean me? :D I didn't ask for help?!
14:02:33shashlick@Yardanico try removing some of your skips and overrides
14:03:07FromDiscord<mratsim> yeah but We can't share your joy if we don't understand what you accomplished as well
14:03:22PMunchdadada, what is it that you're trying to do now by the way? Haven't been following the chat closely
14:03:29FromDiscord<mratsim> it's not stackoverflow, we won't say, please use OOP, SOLID, Factory instead 😉
14:03:41dadadaPMunch: well I asked leorize for the royale way earlier, and I assume he is a top nim guy, and his solution was to use when nimvm, I needed when nimvm for it and it indeed worked, but I don't like to have to use when nimvm, when I can do it with a simple pragma, and now there's one
14:04:24Yardanicoshashlick: can't remove video_setup_device_info_t and 3 objects which it's using
14:04:27Araqwe should though, 'SOLID', it's superb, just look at the term, how can you be against "solid"?
14:04:31Yardanicohttps://git.videolan.org/?p=vlc.git;a=blob;f=include/vlc/libvlc_media_player.h;h=a6f5fbf8e58113f3f9b0e1a5ca96ae21588b63e1;hb=HEAD#l522
14:04:32dadadaPMunch: difficult question, I'm developing multiple modules, this is just a small piece of the puzzle, it's for another module that already worked, but I needed it to work at compile and runtime
14:04:41dadadaand that's where .uberTime. came in
14:04:43PMunchAh, so you wanted a pragma that applies "when defined(nimvm)"? That seems quite useful actually
14:05:09dadadaadmittedly you don't need it very often
14:05:13PMunchuberTime?
14:05:19dadadauber = above
14:05:34dadadait's above run and compile, so it's uber them :D
14:06:21PMunchHaha, I know what über means, still not sure I understand what it does..
14:06:30dadadaPMunch: https://play.nim-lang.org/#ix=2lST
14:06:49dadadaI've no real great examples yet, besides my one module this was made for
14:07:01disruptekyou guys should use the mumble whenever it's useful.
14:07:04disruptekit's free.
14:07:07PMunchOh, like not compileTime or runTime but uberTime
14:07:08PMunch:P
14:07:12*Hideki joined #nim
14:07:13PMunchI thought it was some kind of timing thing :P
14:07:29dadadathe expandMacros section can also be compiled with .compileTime. as mrratsim pointed out, but it works for broader cases
14:07:32*someunknownuser quit (Quit: someunknownuser)
14:07:35*Hideki is now known as Guest60418
14:07:39FromDiscord<clyybber> disruptek: its also empty :d
14:07:46dadadano, it's not about timing it's about access and modification of variables at all times
14:07:52disruptekwell, ima gonna stream early, i guess.
14:08:25PMunchdadada, so what happens if you change a uberTime variable on compileTime and then use it at runtime?
14:08:29PMunchDo you get the updated value?
14:08:53dadadaPMunch: no it's not meant for that, it's just for simplification of module code, the values are reset for runTime
14:09:02PMunchAh, right
14:09:22dadadawhen I release this I guess I've to write an FAQ :D
14:09:48dadadabasically think of compile time and run time as targets
14:09:49PMunchSo it's basically just a way to re-use the name/type of a variable on both run- and compiletime?
14:10:00dadadaand uberTime allows for a global var to work the same way in both targets
14:10:06dadadaexactly
14:10:25FromDiscord<Technisha Circuit> How would i call Nim from Python?
14:10:48dadadanimpy I think, I haven't used it though
14:11:17PMunch@Technisha Circuit: https://robert-mcdermott.gitlab.io/posts/speeding-up-python-with-nim/
14:11:30*solitudesf- joined #nim
14:11:33PMunch~pythonnim
14:11:34disbotno footnotes for `pythonnim`. 🙁
14:11:36FromDiscord<Technisha Circuit> That's for calling Python from Nim
14:11:44PMunch~pythonnim https://robert-mcdermott.gitlab.io/posts/speeding-up-python-with-nim/
14:11:44disbotno footnotes for `pythonnim`. 🙁
14:11:48Yardanico@Technisha no
14:11:56Yardanicothat's for calling Nim from Python
14:11:56PMunchdisruptek, how do I register a footnote again?
14:12:02Yardanico"footnote is" afaik
14:12:06FromDiscord<Technisha Circuit> What?
14:12:08Yardanicowith ~ probably
14:12:11Yardanico@Technisha check the article again
14:12:14PMunch~pythonnim is https://robert-mcdermott.gitlab.io/posts/speeding-up-python-with-nim/
14:12:14disbotpythonnim: 11https://robert-mcdermott.gitlab.io/posts/speeding-up-python-with-nim/
14:12:15FromDiscord<Technisha Circuit> Okay
14:12:16PMunchAh
14:12:20PMunch~pythonnim
14:12:21disbotpythonnim: 11https://robert-mcdermott.gitlab.io/posts/speeding-up-python-with-nim/ -- PMunch
14:12:25FromDiscord<Technisha Circuit> That's for writing modules in Nim
14:12:26dadadaPMunch: it's possible I overcomplicated it and there's an easier solution, I wanted this to work for all types of types, that's why I used ptrs, because NimScript can't deal with refs to refs for example
14:12:30Yardanico@Technisha yes
14:12:34Yardanicobut for using them in Python
14:12:43Yardanicoit's https://github.com/yglukhov/nimpy
14:12:44FromDiscord<Technisha Circuit> I want to call Python from Nim without making a moduke
14:12:47FromDiscord<Technisha Circuit> Module*
14:12:55Yardanicopls decide
14:12:59Yardanicopython from nim or nim from python?
14:13:06PMunchHaha, that was the opposite of what you asked for :P
14:13:08Yardanicohttps://github.com/yglukhov/nimpy works for both anyway
14:13:08FromDiscord<Technisha Circuit> Wait
14:13:14Yardanicohttps://github.com/yglukhov/nimpy#calling-python-from-nim
14:13:14FromDiscord<Technisha Circuit> I'm stupid
14:13:26FromDiscord<Technisha Circuit> Thanks :P
14:13:55PMunch~pastespam is Please don't paste code and/or multiline content on Discord. It comes through on IRC and is very annoying
14:13:55disbotpastespam: 11Please don't paste code and/or multiline content on Discord. It comes through on IRC and is very annoying
14:14:06YardanicoPMunch: that should change soon :P
14:14:08PMunchNice, that'll save me some typing :P
14:14:19PMunchWasn't it active here?
14:14:24*solitudesf quit (Ping timeout: 256 seconds)
14:16:14YardanicoPMunch: only for a bit
14:16:20Yardanicobut when I found out discord stopped sending member list to me
14:16:26Yardanicoit's all fine now about the member list though
14:16:28PMunchRight..
14:16:40PMunchSo it can be made active here again?
14:16:47Yardanicowell ~maybe`
14:16:48Yardanico~
14:16:48disruptek~paste
14:16:49disbotno footnotes for ``. 🙁
14:16:49disbotpaste: 11a frowned-upon behavior in chat; please use a service such as https://play.nim-lang.org/ or http://ix.io/ or https://gist.github.com/ and supply us a URL instead. -- disruptek
14:17:11PMunchAh we already had one for that
14:17:47PMunchIf I add a footnote to something that's already registered, will it make another one or overwrite?
14:17:52disruptekmaybe i should expose delete for footnotes today.
14:18:05disruptekit's additive; it only overwrites your own contributions.
14:18:24disruptekit's good to have both; it's like autocorrect.
14:18:27*hpyc9 quit (Ping timeout: 260 seconds)
14:18:54PMunchAh right
14:19:00PMunchJust make sure delete does the same :P
14:19:26YardanicoPMunch: I can try launching it for a bit in this chat, not from nim vps though because that'll require me to cross-compile and stuff
14:19:36PMunch~playground is https://play.nim-lang.org the official Nim playground, can run Nim in the browser and share snippets
14:19:37disbotplayground: 11an online in-the-browser IDE for simple Nim experiments at http://argentina-ni.ml/
14:19:37disbotplayground: 11https://play.nim-lang.org the official Nim playground, can run Nim in the browser and share snippets
14:19:42*hpyc9 joined #nim
14:19:44disruptekheh
14:19:48PMunchHihi
14:19:51Yardanicohoho
14:20:15FromGitter<Clyybber> @cooldome Hey, do you maybe have a smaller snippet that causes the compiler to hang with my ping-pong PR?
14:20:28disruptekmaybe when the bot sees a naked github link it can expand it like it does for repo calls.
14:20:29dadadaPMunch: okay, looks like testcases for this will be difficult to make, unittests aren't prepared for compile time testing? check() for example doesn't seem to work there
14:20:37disruptek!repo naked
14:20:41disbothttps://github.com/jostmey/NakedTensor -- 9NakedTensor: 11Bare bone examples of machine learning in TensorFlow 15 2471⭐ 158🍴 7& 29 more...
14:21:08PMunchWhere does it pull those from?
14:21:17Yardanicogithub search
14:21:24Yardanicoso I can try launching my bridge here guys
14:21:25PMunchJust the top one?
14:21:34Yardanicoif it crashes a lot pls ping me and I'll start the old one :P
14:21:46disruptekjust the top one?
14:21:56Yardanico~changing bridges~
14:21:57disbotno footnotes for `changing`. 🙁
14:21:59*FromDiscord quit (Remote host closed the connection)
14:22:04PMunchHaha :P
14:22:10*Senketsu quit (Ping timeout: 244 seconds)
14:22:28PMunchYeah disruptek I was wondering if !repo word just searches for word on github and shows the top one
14:22:30*nl joined #nim
14:22:30*nl quit (Remote host closed the connection)
14:22:35Yardanicowait wrong nickname
14:23:18*FromDiscord joined #nim
14:23:18*krisppurg joined #nim
14:23:22Yardanicodone
14:23:27PMunchHello discord!
14:23:31PMunch(again)
14:23:47Yardanicoyeah you can ping now, although it's still not the best it works quite well
14:23:53FromDiscord<Technisha Circuit> If I'm making a python module in Nim, is it better to use the print function from `pyBuiltinsModule` or is it better to use echo from Nim
14:23:55FromDiscord<Technisha Circuit> Nice
14:24:06Yardanico@technisha try pasting code pls
14:24:07FromDiscord<Technisha Circuit> Hi PMunch
14:24:12FromDiscord<Technisha Circuit> Okay
14:24:36FromDiscord<Technisha Circuit> ```python↵print("""This↵Is↵Redundant""")```
14:24:44Yardanicothat's too small
14:24:53FromDiscord<Technisha Circuit> Okay :P
14:25:05FromDiscord<Yardanico> sent a code paste, see http://ix.io/2lTb
14:25:22FromDiscord<Technisha Circuit> sent a code paste, see http://ix.io/2lTc
14:25:25FromDiscord<Technisha Circuit> That fine?
14:25:30Yardanicoyes
14:25:43zacharycarterjust use echo?
14:25:45dadadaso what do I do when I need at compile time testing?
14:25:55dadadaputting unittest in a static block doesn't seem to work
14:26:12dadadahttps://forum.nim-lang.org/t/5261 <- they also didn't seem to get far with it
14:26:19FromDiscord<Technisha Circuit> Okay
14:27:57*PMunch quit (Quit: leaving)
14:28:08Yardanico~stream
14:28:08disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat)
14:28:10Yardanicohop on guys
14:29:45FromDiscord<Yardanico> pic test https://media.discordapp.net/attachments/371759389889003532/710136704899481650/2020-05-13-11-28-25_grim.png
14:31:09*nsf quit (Quit: WeeChat 2.8)
14:32:19FromGitter<bung87> @dadada just using assert
14:33:40*Guest60418 quit (Ping timeout: 256 seconds)
14:37:14*waleee-cl joined #nim
14:38:11*silvernode joined #nim
14:47:50FromGitter<bung87> am I offline? no new message
14:48:57Yardanicono you're online, don't expect people to always answer :)
14:51:12FromGitter<bung87> ok, I thought this channel getting hot ,suddenly no one talks..
14:51:39dadadabung87: no you're there! thanks for the tip, assert works, but for the most part
14:51:57*kradnoel quit (Remote host closed the connection)
14:52:39FromGitter<bung87> ok
14:52:50*kradnoel joined #nim
14:55:28*liblq-dev quit (Quit: WeeChat 2.8)
15:01:37FromDiscord<Anuke> How does one convert a `ptr uint8` (returned glGetString) to a `cstring`?
15:01:40*kradnoel quit (Ping timeout: 265 seconds)
15:02:10Yardanico@Anuke cast[cstring](ptr uint8)
15:02:11Yardanico?
15:02:53FromDiscord<Anuke> thanks
15:03:37FromDiscord<Anuke> Assuming I convert it to a string with `$` and use it somewhere else, what will happen to that `cstring` / memory?
15:03:50FromDiscord<Anuke> do I need to manage it at all?
15:05:22dadadahmm, one of my procs doesn't seem to register as an overload for a nim generated []= assignment operator
15:05:25FromDiscord<mratsim> the cstring is collected at end of function
15:05:46dadadaI exported it, so why
15:05:52FromDiscord<mratsim> it's just a stak variable
15:05:57*gokr quit (Quit: Leaving.)
15:06:22FromDiscord<mratsim> ooh IRC replies are not bundled together anymore into a blur
15:06:39Yardanicoyeah feels weird right? :P
15:06:46FromDiscord<FromIRC> Uptime - 43 minutes, 34 seconds, 298 milliseconds, 720 microseconds, and 164 nanoseconds
15:06:46FromDiscord<Yardanico> !status
15:06:49FromDiscord<mratsim> @dadada I use static: doAssert
15:07:03FromDiscord<mratsim> @Yardanico https://status.im/
15:07:08FromDiscord<Yardanico> hahaha
15:07:13*fredrikhr joined #nim
15:07:22dadadamratsim: thanks man! that works bung87 also told me to
15:07:37Yardanicodadada: you can use @ to mention him btw :P like @mratsim
15:07:49Yardanico*showing off ircord*
15:07:58dadadanot really need in irssi
15:08:05dadadaneeded
15:08:11Yardanicodadada: no I mean so that he sees it on Discord
15:08:20FromDiscord<mratsim> did you solve your prime factorization problem btw?
15:08:22dadadaah, that's cool then
15:08:53Yardanico@mratsim well not yet, I did other stuff :P
15:08:58FromDiscord<codic> ```nim↵echo("yay i can paste code now. lorem ispum dolor")↵```
15:09:12Yardanicoah right I'm stupid
15:09:17Yardaniconeed to send playground link instead of ix.io
15:09:27Yardanicobecause it can use ix.io as well
15:09:44FromDiscord<codic> it sends pastes to an external service?
15:09:49FromDiscord<codic> nice
15:09:51Yardanicoix.io if that works
15:09:55Yardanicoif it fails - gives link to a discord message
15:10:02FromDiscord<codic> ah cool
15:10:07dadadaYardanico: can I force a builtin operator to either not be generated, be removed, or be overloaded with my own, I've tried with `[]=`[T](t: var Object[T], newVal: T) = ... but the thing is never found ... also tried `[]=`[T](t: var Object[T], newVal: Object[T]) = ... but the internally generated one is still used
15:10:33Yardanicosorry, I don't really know about that :( maybe you can try without generics?
15:10:33dadadaoh and I exported of course with `[]=`*[T](...
15:10:37krisppurgowo
15:10:44FromDiscord<codic> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/710147015635501106
15:11:19dadadaalso tried without generics, not working
15:13:22*silvernode quit (Ping timeout: 260 seconds)
15:16:22FromDiscord<Recruit_main707> https://play.nim-lang.org/#ix=2lTx is this possible?
15:16:41Yardanicoyes why not?
15:16:46Yardanicooh wait
15:16:49Yardanicowhat is "index"
15:17:14FromDiscord<Recruit_main707> whatever its specified later
15:17:34FromDiscord<Recruit_main707> (the index of the root Bot class)
15:17:41Yardanicowell what exactly you think is not possible?
15:18:04Yardanicoyou can store non-ref types in container types
15:18:10Yardanicoeven if it's like a recursive thing
15:18:23FromDiscord<Recruit_main707> `undeclared identifier: 'index'`
15:18:31FromGitter<kaushalmodi> `me*: index` <-- doesn't the right side need to be a type?
15:18:33Yardanicoyes, that's not possible at all
15:18:39YardanicoI asked you about "index"
15:18:42FromGitter<kaushalmodi> here you are using a variable element from parent obj
15:18:46FromDiscord<Recruit_main707> thx
15:18:56FromDiscord<Recruit_main707> good call 😅
15:20:56*poohman joined #nim
15:32:58dadadaI've just one final issue and that's really destroying all my hopes, nim always executes macros first, so macros don't see the world as the result of my pragma (which ironically is also a macro)
15:33:24dadadaso, if I just could force nim to evaluate my pragma before the macros, everything should work alright
15:34:15dadadahmm, o ooh, it actually get executed before, but why doesn't it work... my hypothesis was wrong
15:39:29dadadaah, just another tiny mistake looking far worse than it was
15:47:22dadadaworks! hahaaa
15:48:08krux02dadada: evaluation order can be controled via typed and untyped macros.
15:48:31FromGitter<kaushalmodi> dadada: That much be some emotional rollercoaster
15:48:35FromGitter<kaushalmodi> s/much/must
15:49:51dadadakaushalmodi: basically I doubted myself, I didn't know if this was doable, and then very shortly before the finish line I thought all was for naught, but with my last changes, this works on my modules I initially wanted it for, beautifully
15:50:35dadadaso yes, total rollercoaster
15:52:02krux02yea there are no macros like Nim macros.
15:53:35FromDiscord<mratsim> I yes the "I didn't know it was doable, but then somehow it worked" happens to me everytime
15:54:48*rockcavera quit (Remote host closed the connection)
15:55:17dadadado we really need old nim manuals like 0.17.2 online? I keep googling and clicking on wrong links and then I search the old manual ... without noticing
15:55:26dadadaonly to later regret it because so much has changed
15:55:34dadadatheir entries appear very high on google
15:55:49dadadaif someone wants those old manuals, they should just download them from an archive
15:55:55Yardanicodadada: well it still might be useful to someone
15:56:05Yardanicoand anyway the results to actual newest versions are the first ones
15:56:16dadadaYardanico: never doubted that, but you should put the needs of the majority first... and this gets confusing
15:56:38FromGitter<sheerluck> you guys have manuals? o_0
15:56:45dadadaYardanico: not in all cases, sometimes the old ones come first, depends on the search terms
15:56:56Yardanico@sheerluck nim manual is really useful
15:57:06YardanicoI give it to people asking questions here from time to time :P
15:57:11FromGitter<kaushalmodi> dadada: FWIW I just bookmark https://nim-lang.github.io/Nim/theindex.html
15:57:14Yardanicodadada: well that didn't happen for me
15:57:17narimirandadada: just bookmark this: https://nim-lang.github.io/Nim/manual.html and enjoy the latest and greatest
15:57:31*silvernode joined #nim
15:57:32narimiranhaha, almost the same message as kaushalmodi :)
15:57:35Yardanicooh we're at 1.3.5 now, didn't notice
15:57:42narimiranneither did i
15:57:46YardanicoI was still thinking it was 1.3.3
15:57:52*ptdel joined #nim
15:58:07*abm joined #nim
15:58:25narimiranand i immediately guessed correctly who bumped the version number :)
15:58:36*ptdel quit (Remote host closed the connection)
15:58:38Yardanico:DDD
15:59:12FromGitter<kaushalmodi> Yardanico: 1.3.5 happens few mins back in Timothee's PR
15:59:31FromGitter<kaushalmodi> s/happens/happened
15:59:41FromGitter<kaushalmodi> *too many typos today*
15:59:49Yardanicowell I already have it locally
15:59:57Yardanicoliving on the edge
16:00:00FromDiscord<mratsim> I often get 0.13.0 manual from some reason
16:00:44FromDiscord<mratsim> but we can add "canonical" url to the manual or maybe even a latest version field if GOogle supports that?
16:01:09FromDiscord<mratsim> because the content is duplicated and Google will lower the ranking
16:01:19*abm quit (Client Quit)
16:01:27FromGitter<kaushalmodi> (https://files.gitter.im/nim-lang/Nim/Kc15/image.png)
16:01:29FromGitter<kaushalmodi> about the nim manual, I have set this bookmark in Firefox
16:01:56FromGitter<kaushalmodi> with that, I just type Ctrl+L `nimd manual` and I jump to the manual
16:02:05FromGitter<kaushalmodi> similarly `nimd sequtils`, and so on
16:02:50*ptdel joined #nim
16:03:06FromGitter<kaushalmodi> > but we can add "canonical" url to the manual or maybe even a latest version field if GOogle supports that? ⏎ ⏎ +1 ⏎ ⏎ ^ @narimiran [https://gitter.im/nim-lang/Nim?at=5ebc1a39852efc0adad7336a]
16:03:21narimiranPR away
16:07:47FromGitter<kaushalmodi> I haven't used Jekyll; you basically need to add this one metadata tag for each page: https://moz.com/learn/seo/canonicalization
16:08:09FromGitter<kaushalmodi> where each older version page's rel canonical points to an equivalent page on nim devel docs
16:12:16*Hideki joined #nim
16:12:39*Hideki is now known as Guest73990
16:12:59shashlickdoes set -e not work as expected on osx?
16:16:52*Guest73990 quit (Ping timeout: 272 seconds)
16:17:00FromGitter<kaushalmodi> may be you need to install GNU bash?
16:17:52FromGitter<kaushalmodi> from a random search: https://itnext.io/upgrading-bash-on-macos-7138bd1066ba?gi=78a91d651343
16:18:32*rockcavera joined #nim
16:19:17shashlickokay thanks
16:31:49krux02does macos lack behind in bash as well?
16:33:32dadadagetAst apparently doesn't get you the raw original content of a template, you get procs and variable names with gensymfoo attached instead
16:33:47dadadais there something that does the same as getAst but without meddling with ident names?
16:33:54dadadaor can I teach getAst to behave
16:34:32dadadakrux02: yes, they don't want gplv3 on mac, and therefore they stick to the old gplv2 bash
16:35:01Yardanicodadada: make a template dirty?
16:35:21krux02ok, then there is at least a reason behind it that is not to make gnu software look poor compared to shiny apple solutions.
16:35:52dadadaYardanico: I'll embed the thing in a quote do anyway, where I assume the gensyms will then get added twice
16:36:56dadadakrux02: well, that's one of the reasons, they do not really like the GNU, and especially with GPLv3's opinions of not forcing users behind closed software on Tivos an the like, Apple doesn't want a part of it
16:38:08krux02Well, apple does sort of the opposite of microsoft.
16:38:19dadadameaning?
16:39:01krux02I would expect bash on windows to get all sorts of extensions that rely on windows builtin feautures that can't be reproduced on other platforms.
16:39:16krux02embrace extend extinguish
16:39:54dadadahmm, I think WSL is pretty cool, I've never heard it adds anything of the embrace extend extinguish fashion, deb packages just seem to work on Windows... who would have ever thought that?
16:40:10dadadastill not making me consider Windows as a OS though :-)
16:40:39dadadas/as a/as my/
16:41:05krux02yea, I kind of like minimalism. And I would really like to know if there are any operating systems out there that try to be as minimal as possible?
16:41:15krux02probably minix
16:41:21Yardanicowell there's KISS but it's a linux distro at the end of the day
16:41:36Yardanicohttps://k1ss.org/
16:41:36FromGitter<sheerluck> krux02 gentoo
16:41:52FromDiscord<Clyybber> krux: OpenBSD, minix, plan9
16:41:52krux02it is still a Linux distro
16:41:56FromDiscord<Clyybber> redux
16:42:02dadadakrux02: the Linux foundation is supporting a new microkernel, I think it's pretty minimalistic and well tested, there was an article about it
16:42:23krux02The problem I see with linux is, they keep adding stuff to the kernel. It always grows.
16:42:31Yardaniconew drivers
16:42:34FromDiscord<Clyybber> because the world grows
16:42:36FromDiscord<Clyybber> and the needs
16:42:40FromDiscord<Clyybber> of the people
16:42:46krux02I don't have a problem with new drivers. That is a good thing.
16:43:09krux02But probably it some point in the future it might become unmaintainable because there is just too much code written by people long dead.
16:43:29Yardanicothen we'll have a new kernel/os :P
16:43:39dadadaactually I see it as the great thing, the network effect is basically what makes Linux successful, and if you look at for example what's going on with Linux filesystems, you'd rather have one too many than one too few, personally all I need is ext4, but bcachefs will be very interesting for many once it's there
16:43:52Yardanicobcachefs is meh
16:43:56FromDiscord<Clyybber> nah
16:43:56Yardanicobtrfs has been around for years
16:43:59FromDiscord<Clyybber> its btrfs but better
16:44:01dadadaYardanico: why?
16:44:07krux02There is this rust operating system with a true microkernel. I might take a look into that at some point in the future.
16:44:14dadadaYardanico: did you read about all the design shortcoming of btrfs?
16:44:44FromDiscord<Clyybber> they have been fixed
16:44:48FromDiscord<Clyybber> btrfs is fine nowadays
16:44:52FromDiscord<Clyybber> but bcache is faster
16:44:56FromDiscord<Clyybber> *fs
16:45:15FromDiscord<Clyybber> krux02: That *is* redux
16:45:18dadadaClyybber: it's not btrfs, it has made completely different design choices... but I don't want to go into this, because I wanted to get work done
16:45:23FromDiscord<Clyybber> *redox
16:45:51FromDiscord<Clyybber> dadada: Of course its not btrfs, but it serves the same purpose
16:46:01FromGitter<sheerluck> in gentoo you can remove everything from kernel. It will boot, print "Hello krux02" and then poweroff. No microkernel will ever compete with that
16:46:04*poohman quit (Ping timeout: 265 seconds)
16:46:18krux02I always mix up redox os with react os
16:46:50krux02sheerluck: that is interesting.
16:47:03krux02and Gentoo has been around for quite some time and it doesn't seem to die.
16:47:43FromDiscord<Clyybber> void linux is pretty nice
16:48:05FromDiscord<Rika> hello
16:48:30krux02I am actually pretty happ with Arch Linux as a linux distribution.
16:48:54*couven92 joined #nim
16:49:19krux02I just don't like the concept of an always growing kernel.
16:51:36*fredrik92 joined #nim
16:51:44*fredrikhr quit (Disconnected by services)
16:51:48*fredrik92 is now known as fredrikhr
16:52:08*xet7 quit (Remote host closed the connection)
16:53:01*poohman joined #nim
16:54:14*xet7 joined #nim
16:55:25*couven92 quit (Ping timeout: 264 seconds)
16:58:44*xet7 quit (Remote host closed the connection)
16:59:19FromGitter<sheerluck> this is how fresh gentoo looks like -- https://i.imgur.com/vKdJaOf.jpg nothing is running, nothing is installed. Even mlocate, even dhcpcd
16:59:36Yardanicowell gentoo doesn't define what you install
16:59:41Yardanicoso you can't really say gentoo is "minimal"
16:59:51Yardanicoif you install systemd + plasma with all apps it won't be exactly "minimal"
16:59:57livcdsheerluck: yeah but why would you use it?
17:01:06*xet7 joined #nim
17:02:26dadadaI know I can't be cool as a Fedora user, but I've never found a compelling reason to switch, the only thing is maybe that Arch has newer packages faster, but it's possible to install Arch package on Fedora with some tricks... I think people want to have a distro they believe in, it's not only about the technical aspects, they want to be different from everybody else
17:05:27zacharycarteris everyone 12?
17:06:03FromGitter<sheerluck> livcd That is a philosophical question. You must decide for yourself why you need Gentoo. Most people do not need Gentoo. They usually say "I don't like compiling". And they are right. Nobody likes compiling. Well, except me.
17:07:04dadadazacharycarter: it can be seen as a good thing to keep the inner child alive, so yes, many are and they're not
17:07:12livcdsheerluck: most of my devices are not suitable for compiling anything bigger than the nim compiler
17:07:28livcdAraq: do you think Nim would be more popular if you were an american?
17:08:02Yardanicolol
17:08:11zacharycarteris this a serious question?
17:08:17FromDiscord<Rika> ok what
17:08:20FromDiscord<Rika> lmao
17:08:23FromDiscord<Clyybber> ?
17:08:32livcdit is
17:09:02FromDiscord<exelotl> let's use a bald eagle as the nim mascot :p
17:09:09zacharycarterbald eagle with guns
17:09:11FromGitter<kaushalmodi> ah crap, Araq isn't American? /s
17:09:17Yardanicosmh
17:09:20Yardanicoim going to zig
17:09:21zacharycarteryeah I'm leaving guys sorry
17:09:25alexander92hehehehe
17:09:26zacharycarterthought Araq was US born and bred
17:09:28Yardanicozig creator is a true american at least
17:09:34zacharycarterpeace out
17:09:37alexander92new yorker!
17:09:47FromDiscord<exelotl> @zacharycarter Heck yeah
17:10:06alexander92andrewk are you a true american
17:10:12Yardanicohe's not here
17:10:15livcdI am serious. I am not trolling.
17:10:24*couven92 joined #nim
17:10:27zacharycarterit's a ridiculous question though isn't it?
17:10:29*fredrikhr quit (Disconnected by services)
17:10:30FromDiscord<Generic> I would question whether Nim would have ever come to be in America
17:10:32*lritter joined #nim
17:10:32*couven92 is now known as fredrikhr
17:10:33alexander92well
17:10:37FromDiscord<Generic> considering the Pascal influence
17:10:38YardanicoI remember when andrewk joined to congratulate nim on 1.0 :P
17:10:40alexander92many designers are not american
17:10:42Yardanicoand guess what 4raq said xDD
17:10:43alexander92so i dont think so
17:10:54alexander92japanese, danish, dutch, german
17:11:01livcdzacharycarter: Why would it be ridiculous?
17:11:03YardanicoR U S S I A N
17:11:08Yardanicoxd
17:11:16alexander92cyrillic language man
17:11:19Yardanicoда
17:11:20zacharycarterbecause I don't think anyone considers the nationality of a technology creator when they pick a technology
17:11:32zacharycarterand most people who stumble across Nim don't even know of 4raq
17:11:32livcdIt's a serious issue that a lot of decisions in the Ruby world happen in Japan. And a lot of people simply feel "excluded".
17:11:32alexander92`ако ен > 2: излез(
17:11:37Yardanicowhat
17:11:39dadadalivcd: C++ was created by a dane, so from a very very small country, it became very successful, maybe Araq in the American Araq Parallel Universe (someone please write that book) would've made better connections to promote his stuff, but apart from that I don't see why a western European country can't be good starting ground, case in point the Linux kernel was started in Finland, which is also much smaller
17:11:45dadada(in population) than Germany
17:11:52zacharycarterlet's stop pinging him guys
17:12:01Yardanicojust write it as 4raq
17:12:02Yardanicoez
17:12:07alexander92livcd eh in a way, but its about env not so much as original country
17:12:33FromDiscord<exelotl> I still wish we used that minim creature as the nim mascot :(
17:12:38alexander92now with the whole internet work, maybe it matters less
17:12:42livcdJust imagine someone needs support during the US working hours.
17:12:44livcdMost of us are asleep.
17:12:50livcdThere's only disruptek LOL
17:12:54YardanicoXD
17:13:06zacharycarterNim doesn't have support
17:13:12zacharycarterit's not like anyone gets paid to help anyone in here
17:13:14FromDiscord<exelotl> such a good design but rejected for being too cute and too similar in proportions to the gopher
17:13:17Yardanicozacharycarter: well it kinda does
17:13:27alexander92well, its about communities not so much crreator
17:13:35Yardanicozacharycarter: "Commercial support includes priority bug fixes and feature requests. All interested parties should email [email protected]."
17:13:39livcdzacharycarter: you know what I meant.
17:13:40zacharycarterand there are more Americans than disruptek
17:13:50alexander92zachary is almost an american
17:13:52zacharycarterI'm sure if you pay someone for support during US horus you can get it
17:13:56alexander92he want to finland
17:14:06alexander92so he got a little europe probably
17:14:10zacharycarterbut I'm back in the states baby!
17:14:30zacharycarterbut yeah Europe rubbed off on me, I'm at least like 1 percent European now
17:14:36alexander92i need to put some springsteen on
17:14:48livcdjust imagine newcommers stopping by and the channel is silent
17:14:58Yardanico~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17:15:01alexander92livcd we can just tell disruptek to spam more
17:15:24alexander92i dont mean that he spams, just he can use stuff like disbot
17:15:29zacharycarterI just think the question is a bit ridiculous
17:15:31solitudesf-livcd, and how does that relate to 4raq's origin?
17:15:36*solitudesf- is now known as solitudesf
17:15:43alexander92if only he was bulgarian
17:16:22livcdsolitudesf: he would have connections to FB,Google,Amazon and not to SAP :D
17:16:39alexander92google have many offices in europe
17:16:42solitudesf.
17:16:52alexander92we got dom96 in facebook
17:17:12alexander92we just need to put yardanico in yandex
17:17:18alexander92and make it yardandex
17:17:22livcdOO
17:17:29livcdor jetbrains :)
17:17:43alexander92which also have office in munich btw
17:17:52FromGitter<sheerluck> Most people are Chinese
17:18:08FromGitter<bung87> why says that?
17:18:18livcdalexander92: you do realize that these big companies have offices almost in every tier1 city in the world right?
17:18:18alexander92it's a good thing for you man
17:18:28livcdyet you dont hear from Google Tokyo, Google Seoul that much
17:18:35FromDiscord<Rika> > livcd: It's a serious issue that a lot of decisions in the Ruby world happen in Japan. And a lot of people simply feel "excluded".
17:18:44FromDiscord<Rika> this is an issue of japan, not ruby, afaik
17:19:00FromGitter<sheerluck> I love Japan
17:19:02FromDiscord<Rika> anything that's from japan tends to be fairly exclusive of intl issues
17:19:11alexander92but you
17:19:14FromDiscord<Rika> same thing in the other way
17:19:17alexander92do you imagine how much support japan gives them
17:19:23livcdbtw we can switch to #nim-offtopic if you mind :P
17:19:23alexander92they had like industrial marketing and stuff
17:19:25dadadasomeone from Japan writes moe, the vim like editor written in Nim, highly recommended that you check it out
17:19:27alexander92on rubykaigi
17:19:36dadadait's neat for editing small files without the overhead of other editors
17:19:46alexander92japanese people are proud of their tech, so i guess they help their own
17:19:54FromDiscord<Rika> but vim doesnt have much overhead either no?
17:20:20dadadaRika: depends on how many plugins you load, and I bet the installed size of vim is much bigger than moe
17:20:35FromDiscord<Rika> @Yardanico the "@nim-lang" message you sent has a ping, you should check it and fix
17:20:40dadadaI see moe as a replacement for joe/nano, not vim
17:21:19livcdBut I am also curious if zig builds momentum just because Andrew is an american :P
17:21:39alexander92we can go and ask them :D
17:21:49FromDiscord<Rika> > too cute↵@exelotl wtf how does a design get rejected for being too cute xd
17:22:22livcdalexander92: you will see that in some stats i guess...
17:22:39FromDiscord<Rika> speaking of vim i'm more inclined to move to it because i realized i could ssh from my laptop to my desktop and use vim on there instead of on my laptop
17:22:55FromDiscord<Rika> not sure if that works too well on vscode...
17:23:02livcdRika: switch to emacs
17:23:08livcdYou can use "tramp" for that
17:23:17FromDiscord<Clyybber> switch to kakoune
17:23:32FromDiscord<Rika> @_@
17:24:14alexander92livcd i asked them
17:24:30livcdsomeone needs to ask the tabnine guy to give it for free for Nim
17:25:25alexander92is it good for nim?
17:25:43FromDiscord<exelotl> @Rika this one https://github.com/nim-lang/RFCs/issues/104
17:25:44disbotNim's mascot proposal
17:25:57livcdalexander92: even andreas said it's not that bad
17:26:04FromDiscord<exelotl> Its so good!! people have bad taste smh
17:26:11alexander92we do need a different mascot yeah!
17:26:32alexander92i want to get rid of the crown too ..
17:26:45dadadawhat the heck
17:26:48dadadathe crown rules
17:26:56dadadaalexander92: you can't be serious
17:27:00FromDiscord<Rika> oh
17:27:05FromDiscord<Rika> i see why they rejected it
17:27:38*poohman quit (Ping timeout: 265 seconds)
17:28:59zacharycartermascot discussions have been going on for years
17:29:11FromDiscord<Technisha Circuit> What's a simple GUI library for Nim?
17:29:19zacharycarterwhat kind of GUI library?
17:29:29zacharycarterimmediate mode? retained?
17:29:42zacharycarterwhat platform?
17:29:57dadadaTechnisha Circuit: I'm using gintro/gtk it works well, though there're rough edges, gtk is a solid toolkit
17:29:57FromGitter<bung87> !repo webgui
17:29:59disbothttps://github.com/juancarlospaco/webgui -- 9webgui: 11Web Technologies based Crossplatform GUI Framework with Dark theme 15 25⭐ 3🍴 7& 1 more...
17:30:17FromDiscord<Technisha Circuit> Thanks
17:30:58alexander92dadada i am serious! no crown!
17:31:19dadadaTechnisha Circuit: I use glade to design the UI -> load it with gintro and add my signals/connectors in code, then manipulate stuff in code, it has a learning curve though, glade also has some nasty bugs, but you can adjust to them, liststores/treestores are particularly difficult to work with, but it can be done
17:31:24FromDiscord<Technisha Circuit> Does webgui need to use the js backend?
17:31:34FromDiscord<Technisha Circuit> Oh?
17:32:10*couven92 joined #nim
17:32:13FromGitter<bung87> no
17:32:21dadadaalexander92: you are my enemy then!
17:32:37FromDiscord<Clyybber> nimisis
17:32:53FromDiscord<Technisha Circuit> How does webgui work then? Does it display html and css?
17:33:20FromGitter<bung87> use os webview api
17:33:27FromDiscord<Technisha Circuit> Oh okay
17:33:35alexander92livcd btw
17:33:40alexander92timothee is american as well
17:33:47alexander92which changes the balance a bit :D
17:33:49FromDiscord<Technisha Circuit> So how would i use it for making a complex gui?
17:33:54alexander92or at least he lives in the usa
17:33:58alexander92his name sounds french
17:34:18zacharycarterdidn't you just say you wanted a simple gui library?
17:34:20zacharycarterlol
17:34:56FromGitter<bung87> @Technisha Circuit write your html , give the file path as newWebview first param
17:35:42FromGitter<bung87> using bindProcs interation between js and nim
17:35:57alexander92he is french! sorry.
17:38:52dadadawhy doesn't anybody take gtk seriously, I got a lot of work done with gintro/gtk in just a few days... it's like everything has to be done with web technologies today, even on the desktop... why? Yes I get it everybody already knows CSS/JS/HTML, but that doesn't mean gtk or Qt are obsolete, you can use CSS with GTK (and I think with Qt, too), and there are webviews/webengines for both if you really need it,
17:38:58dadadaalso constructing GUIs gets very easy with glade/qt-designer, they're tried and tested with huge communities behind them, ..., there's a bit of a learning curve but it's not really hard
17:39:37dadada+ at least on Linux everybody has those two toolkits
17:40:34dadadaevery GTK/QT question you can imagine is already answered on the net/can be googled
17:40:38FromDiscord<Rika> i want to be able to make a qt app in nim xd but i dont know how xddd
17:40:43FromGitter<bung87> maybe the company just want hire one guy write on project runs on everywhere.
17:41:27FromDiscord<Technisha Circuit> Thanks!
17:41:32dadadabung87: gtk/qt both run on Windows/Linux/Mac/BSDs, Qt also runs on Android(iPhone, too I think?), Qt even runs on the web
17:42:20FromGitter<bung87> yeah, they just dont want hire a guy write c++
17:42:23dom96dadada, I built an IDE in GTK, it was a pain in the ass
17:42:41dadadadom96: in what language?
17:42:44dom96In Nim
17:42:47dadadawhen?
17:42:51FromDiscord<Rika> who said html would make it easier tho 😛
17:42:55*krisppurg quit (Quit: Connection closed for inactivity)
17:43:00dom96Web technologies may be slow, but they allow basically limitless flexibility
17:43:08FromDiscord<Rika> dom are you talking about aphoria? did you make aphoria? i dont remember
17:43:22dom96dadada, in the gtk2 days, now you'll tell me that Gtk3 is better
17:43:40zacharycarterWhy not just use electron?
17:43:44dom96show me an app that uses gtk and runs well on MacOS
17:43:45zacharycarterif you're going to use web technologies
17:43:51dadadadom96: I'm developing something with the latest gtk3 gintro bindings now and apart from very stupid liststore/treestore stuff, it is pretty smooth, yes
17:43:51dom96Rika: yeah, Aporia :)
17:44:00FromDiscord<Rika> i dont know the name sorry
17:44:09*couven92 quit (Quit: Client disconnecting)
17:44:11FromGitter<Willyboar> ~stream
17:44:11disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat)
17:44:25dadadadom96: I've written apps in both gtk/qt, I like Qt better in general, but it's not like gtk is impossible bad, I think it's quite decent
17:44:27*couven92 joined #nim
17:44:39dom96dadada, it definitely depends on what you're making
17:44:49dom96gtksourceview has always been a pain
17:44:57dom96so for IDEs I wouldn't recommend it
17:45:01dom96and VS Code's success speaks for itself
17:45:11*fredrikhr quit (Disconnected by services)
17:45:27*couven92 is now known as fredrikhr
17:45:41*couven92 joined #nim
17:45:50alexander92ys
17:46:01alexander92electron is just good enough for many cases
17:46:13FromDiscord<Rika> how do you use electron with nim? would that require using the js backend?
17:46:14zacharycarterthere's also this - https://deplinenoise.files.wordpress.com/2017/03/webtoolspostmortem.pdf
17:46:28dadadadom96: oh gtksourceview is still weird, but you get a lot for free there too, and don't forget that VS code was developed with MS paid people (nothing wrong there), they could do a good job with a classical toolkit as well, I don't use MS products, but I've heard the old visual studio is also pretty good
17:46:56FromGitter<sheerluck> Nim's mascot proposal -- https://i.imgur.com/XImwlWy.png
17:47:03disruptek~stream
17:47:03disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
17:47:07disruptekcompiler stuff.
17:47:08FromDiscord<Recruit_main707> no
17:47:14FromDiscord<Rika> sheerluck: ok weeb xd
17:47:22FromDiscord<Rika> ~~i am joking~~
17:47:31FromDiscord<Recruit_main707> ba-nim-e
17:47:36zacharycarterno thanks on that mascot
17:47:39FromDiscord<Rika> also that's touhou? i think?
17:48:07dadadadom96: do not underestimate gtk, gtk4 is on the horizon, I think a lot of the work is financed by RedHat/IBM
17:48:13alexander92ok, so
17:48:17dadadasince they're a gnome shop
17:48:40alexander92PMunch i'll send you tomorrow some notes for what i thought about a bit more general web framework
17:48:47alexander92hm, time to openmp
17:49:34FromGitter<Willyboar> alehander92 you decide to do it?
17:50:04alexander92oh, not really sure, just wanted to brainstorm a bit and see what happens
17:50:35alexander92i dont have much time, but i can help a bit if several people agree on some design
17:51:50PrestigeI keep typing "echo" at work instead of "console.log" now .-. I'm stuck in Nim-mode
17:52:12FromGitter<Willyboar> i can help a lot if the framework targets from beginner to pro
17:52:35FromDiscord<Rika> prestige: but nim has a js backend
17:52:51Prestigetis true but I have to use JS for work D:
17:53:25FromGitter<Willyboar> also i have a lot of ideas too :P
17:53:40FromDiscord<exelotl> bruh
17:53:51FromDiscord<exelotl> The mascot was the crown all along
17:53:55zacharycartermake a web framework like microsoft's blazor
17:54:37FromDiscord<Rika> prestige: easy, just write nim and use the generated output xddddd
17:54:39alexander92willyboar absolutely
17:54:43alexander92i'll link you as well
17:55:01PrestigeLol @Rika code review will be fun after doing that :P
17:55:17alexander92zachary hmm, i dont really know well .net world
17:55:19alexander92the *
17:55:26FromGitter<Willyboar> me neither
17:56:03FromGitter<Willyboar> i have used rails, sinatra, flask and a little django
17:56:11FromDiscord<Rika> i'm not serious dont worry
17:56:28zacharycarterwell just check it out and thinka bout how it would work in Nim
17:56:40FromGitter<Willyboar> rails and flask are the coolest
17:56:45zacharycarteralso when you mentioned web framework I thought you meant frontend
17:56:52zacharycarterhttps://dotnet.microsoft.com/apps/aspnet/web-apps/blazor
17:57:01*waleee-cl quit (Quit: Connection closed for inactivity)
17:58:51kungtottedadada: if RH are forking up for gtk4 it's probably going to depend on systemd :P
17:59:30dadadakungtotte: they were a Gtk shop for forever, it's not new, they also developed for gtk3 and probably gtk2
17:59:35FromGitter<Willyboar> zachary i mean mostly server side
18:01:19FromGitter<Willyboar> It will be interest to see something like razor to nim. But this is not what i really like.
18:01:41dom96dadada, the thing with VS Code is that it's fundamentally extensible in a really easy way, this is the killer feature of Electron IMO
18:02:01zacharycartermaybe I'll work on something like blazor for Nim
18:02:05dom96the fact that MS has created Visual Studio, written in a native toolkit, and that it's not used as widely as VS Code proves that it's not just about money
18:02:07zacharycarterI've said that before though :P
18:02:47dadadadom96: hmm, vscode is free though, wasn't visual studio restrictively licensed, and not available on Linux? only reason I use vscode is that I now can, before I couldn't
18:04:06FromGitter<Willyboar> zachary i would love to see it. I am watching anything about nim-web area
18:04:37dadadadom96: agree on importance of extensions, but again, look at the gnome desktop, it has a javascript engine at its heart and can be extended to your hearts content, no reason that you can't do the same with a any desktop app/toolkit, I think the real reason behind electron's success is that people already have all the knowledge of JS/HTML/Web/CSS, when with other toolkits you have to relearn
18:05:30*tane joined #nim
18:07:35dom96yeah, for someone that's already got very little time though, electron sounds very good
18:07:53dom96there is tons of resources out there for how to work around weird html/css issues
18:07:56dom96not so with GTK
18:08:06FromGitter<Willyboar> Razor looks a lot like a template engine
18:08:34FromDiscord<dom96> Like, I spent lots of my time debugging issues like this for example: https://picheta.me/articles/2013/08/gtk-plus--a-method-to-guarantee-scrolling.html
18:10:14dadadadom96: thanks for writing that down, now people can find it :-)
18:11:42dom96might be about time I revive this blog
18:12:35dadadabtw. is there any inbuilt method for loading code from a string directly like you would use include for code from a file?
18:12:41*PMunch joined #nim
18:12:52dadadaI know I can use a macro ...
18:13:02*silvernode quit (Ping timeout: 256 seconds)
18:13:38leorizeparseStmt?
18:13:51dadadaI know, I would use that for the macro
18:14:04dadadaso the answer is no
18:14:54leorizeif all you need is parseStmt, use parseStmt :P
18:15:06leorize!eval import macros; parseStmt("echo \"Hello\"")
18:15:08NimBotCompile failed: /usercode/in.nim(1, 25) Error: expression 'parseStmt("echo \"Hello\"")' is of type 'NimNode' and has to be discarded
18:15:20leorizewelp, guess you can't cheat like this :P
18:15:26leorize!eval import macros; eval("echo \"Hello\"")
18:15:28NimBotCompile failed: /usercode/in.nim(1, 16) Error: undeclared identifier: 'eval'
18:15:58leorize!eval import macros; emit("echo \"Hello\"")
18:16:00NimBotHello
18:16:13leorizebut emit is deprecated anyway :P
18:16:57FromDiscord<Recruit_main707> !eval import macros; discard parseStmt("echo "Hello"")
18:16:59NimBotCompile failed: /usercode/in.nim(1, 41) Error: undeclared identifier: 'Hello'
18:17:24leorizeI think discord cancelled your backslashes :P
18:17:38FromDiscord<Recruit_main707> !eval import macros; discard parseStmt("echo \"Hello\"")
18:17:40NimBotCompile failed: /usercode/in.nim(1, 24) Error: request to generate code for .compileTime proc: parseStmt
18:17:57FromDiscord<Recruit_main707> it cancelled yours actually
18:18:33leorizethis will be fixed once Yardanico got the new bridge to work correctly I hope :)
18:18:35dadadaleorize: is there any way to get dirt y results from quote do or getAst? I want to get Nim code as NimNodes, but with no gensym symbol magic
18:18:59Araqdadada, template {.dirty.} plus getAst on it
18:19:05leorizedadada: well getAst will return whatever the template returns
18:19:16dadadafinally, Araq saves the day
18:19:59leorizedisruptek: did you catch the latest nim.nvim update I posted earlier?
18:20:11disrupteki forgot to update.
18:20:20FromGitter<Willyboar> do it live
18:21:33FromGitter<Willyboar> he did it :P
18:21:40leorizeyay
18:22:08PMunchleorize, I think this is the new bridge..
18:22:26leorizenah, Yardanico rolled it back because his bridge crashed too much
18:22:45PMunchToday?
18:22:52FromDiscord<Clyybber> sick
18:23:02leorizehe rolled it back shortly after introducing it :P
18:23:13leorizedunno if he sorted the issue out
18:23:14FromDiscord<Clyybber> but its on
18:23:31leorizeah, it does appear so
18:24:07leorizeI think there might be leaks in nimsuggest regarding template/macro instantiations
18:25:13leorizehttps://github.com/alaviss/nim.nvim/issues/18#issuecomment-572722537 <- some log from one of nim.nvim users
18:25:15disbotHighlighting sometimes disappears
18:25:29leorize> Error: template instantiation too nested
18:25:57leorizeI definitely need to spend sometime sorting this out...
18:28:22*poohman joined #nim
18:29:33PMunchleorize, he switched back to his bot today: https://irclogs.nim-lang.org/13-05-2020.html#14:21:56 I went through the logs and doesn't look like he reverted it
18:29:52leorizeI stand corrected then :)
18:31:13*superbia joined #nim
18:33:57*vqrs quit (Ping timeout: 272 seconds)
18:35:18FromDiscord<mratsim> sent a long message, see http://ix.io/2lUD
18:35:18*vqrs joined #nim
18:36:00FromDiscord<Clyybber> submit/complete
18:37:16*poohman quit (Ping timeout: 246 seconds)
18:38:29FromDiscord<Rika> same as cly
18:38:30*fanta1 quit (Quit: fanta1)
18:38:50*silvernode joined #nim
18:39:21zacharycartershashlick looks like some enums weren't handled correctly for cimgui by nimterop
18:40:17FromDiscord<mratsim> mmmm, I'll think about it, thanks
18:40:21zacharycarter`ImGuiMouseCursor_` being one
18:41:13FromDiscord<mratsim> I was leaning toward settle, because the thread that "submits" doesn't actually do any "completion" it just waits in a loop until the job is ready
18:41:38FromGitter<Willyboar> submit/complete too
18:42:02zacharycarterI like submit/waitFor
18:43:21FromDiscord<Rika> "ready" can be used as a verb
18:43:56zacharycarteryou could have a non-blocking `testIfDone` and then a blocking `waitForDone` or something
18:44:06shashlick@zacharycarter can you please open an issue? I'm really behind on stuff
18:44:12zacharycartersure
18:44:15FromDiscord<FromIRC> Uptime - 4 hours, 21 minutes, 1 second, 227 milliseconds, 166 microseconds, and 95 nanoseconds
18:44:15FromDiscord<Yardanico> !status
18:44:16livcdalexander92: i thouht timothee is french
18:44:34leorizePMunch: looking forward to your semantic highlighting to nimlsp :)
18:44:43FromDiscord<mratsim> I have isReady for that already @Zachary Carter
18:44:59leorizethen after that you just need to get nimlsp into nim itself and I can happily drop a ton of my code :P
18:45:37FromDiscord<mratsim> 4s: spawn sync, submit, settle
18:45:38livcddom96: port sciter
18:45:48FromDiscord<mratsim> sciter is not opensource
18:47:59zacharycarterwhy port sciter? someone wants to write an antivirus app's gui wtih Nim?
18:50:33PMunchleorize, don't hold your breath for that. It's probably going to take a while :P
18:50:59leorizeI'm already looking into implementing all the goodies directly myself :P
18:51:00FromDiscord<mratsim> HTML/CSS/JS compat is interesting for visualization for example
18:51:13FromDiscord<mratsim> but you can use webview and build on UI on top
18:51:37livcdmratsim: why does it matter if it's open source or not?
18:51:54livcdzacharycarter: you can build whatever you want with that not only antivirus UI
18:52:01zacharycarterit was a joke
18:52:21livcdsorry I am drunk already :X
18:52:50zacharycarterjust don't use web tech for native gui's and if you really want to just use electron
18:52:59zacharycarterthat would be my advice
18:53:10*gsingh93 quit (Ping timeout: 260 seconds)
18:53:14FromGitter<Willyboar> I think there is a nim - electron lib
18:53:22livcdzacharycarter: sciter is not webtech
18:53:53zacharycarterI'm pretty sure you use HTML / JS / CSS with sciter
18:53:54PMunch@Willyboar, I did some stuff with Nim <-> Electron a while back
18:54:02PMunchBut that was just a PoC, not a library
18:54:16livcdzacharycarter: and does that mean that indicates it's a webtech?
18:54:18FromGitter<Willyboar> yeap is yours i was checked a while ago
18:54:41zacharycarterwell it's probably using some web technology to allow guis to be built with web technologies no?
18:54:43livcdzacharycarter: Is XAML webtech? Is QML webtech?
18:54:51PMunchWhy not use wxnim though?
18:54:57FromGitter<Willyboar> Also this https://github.com/bluenote10/nim-electron-karax
18:55:09livcdzacharycarter: not at all
18:55:12zacharycarterwhat???
18:55:19PMunchIf it smells like webtech and it moves like webtech it's probably webtech
18:55:27zacharycarterI'm pretty sure you're mistaken livcd
18:55:32*gsingh93 joined #nim
18:55:37*fredrikhr quit (Quit: Client disconnecting)
18:56:06livcdzacharycarter: I am pretty sure I am not.
18:56:12zacharycarterokay show me proof then
18:56:15FromGitter<Willyboar> @PMunch i don;t want to use it i just check it. I am interesting more on web
18:56:31livcdzacharycarter: easy https://sciter.com/developers/engine-architecture/
18:56:49zacharycarterI see HTML DOM
18:56:52zacharycarterweb tech
18:57:22livcdnone of which is inherently webtech -,-
18:57:43zacharycarterokay I'm not sure if you're so drunk you don't understand that HTML is a web technology
18:57:55zacharycarterit's a markup langauge that's only used in browser engines
18:57:59livcdzacharycarter: is XAML a web technology?
18:58:02livcdanswer me
18:58:24zacharycarterA) I don't use XAML and B) From my understanding XAML isn't used in the browser
18:58:32zacharycarteror on the web
18:58:50zacharycarterthis is like saying client side JS or CSS aren't web technologies
18:58:54livcdzacharycarter: the guy just chose HTML/CSS to define the UI the same way QML/XAML work
18:59:05livcdthere's no v8 or chrome or electron or whatever
18:59:29zacharycarterI didn't say there was v8 or chrome or electron did I?
18:59:36zacharycarterI said it was built using web technolgoies
18:59:55zacharycarterwhich it is if it's using CSS for styling and HTML for presentation
19:00:22zacharycarterand I imagine it has the same issues that every other GUI solution buit with web technologies does
19:00:26livcdzacharycarter: I dont get you. If he was using something that was similar to QML would you still say the same?
19:00:35zacharycarterNo because QML isn't used in a gd browser!
19:00:41zacharycarterjesus
19:01:17livcdzacharycarter: sciter is just as native as QT is
19:01:25zacharycarterokay this argument is pointless
19:01:40zacharycarteryou're conflating my arguments
19:01:50zacharycarterand putting words in my mouth
19:02:05zacharycartergo port and use sciter - I don't care
19:02:11livcdzacharycarter: i cant port it XD
19:02:17FromDiscord<Rika> what is happening o_o
19:02:17livcdI can use it sure..
19:02:21zacharycarterthen go use it
19:02:26federico3PMunch: If it smells like webtech better open the window
19:02:35FromDiscord<Rika> what are you two even arguing about
19:02:41zacharycarternothing it's over
19:05:38livcdzacharycarter: You can read what the author has to write about it. Search for c-smile: https://www.reddit.com/r/programming/comments/fu4r3a/sad_state_of_cross_platform_gui_frameworks/fmdl8tv/?context=3
19:06:02livcdSciter is not a browser engine. It is rather UI engine that uses HTML/CSS in places where, for example WPF, uses XAML.
19:06:22FromDiscord<Rika> bruh
19:06:26FromDiscord<Rika> so is it over or not
19:07:44PMunchHTML and CSS is still web-tech though. It is tech designed for the web
19:07:47shashlick@zacharycarter - replied to the issue - just ridiculous stuff people do in C
19:07:50PMunchThat by itself doesn't mean sciter is bad though
19:07:59PMunchIt actually looks pretty compelling
19:09:06PMunchAlthough it might suffer a bit in the accessibility realm due to not being OS native
19:10:26livcdSciter uses GPU accelerated backend for rendering by default (e.g. on Windows it is Direct2D/DirectX ). On comparable UIs, Sciter will render stuff significantly faster than Qt (mixed CPU/OpenGL backend) or wxWidgets (GDI rendering primarily).
19:10:58livcdzacharycarter: I am sorry if i irritated you. I did not mean to :X
19:16:34*waleee-cl joined #nim
19:16:52*silvernode quit (Ping timeout: 265 seconds)
19:16:56*silvernode_ joined #nim
19:18:23zacharycarterlivcd: it's fine. I just don't enjoy an argument that there is no logical end to
19:18:55zacharycarterthanks for the reply shashlick
19:19:26shashlickno worries - not sure if we can do anything for this in nimterop - let me know if you have any ideas
19:19:52livcdzacharycarter: I was just trying to relay what the author is saying about it but I did not really do a good job
19:20:05zacharycarterdoes the cPlugin step run before cImport shashlick?
19:20:20zacharycarterif the underscore was stripped first, wouldn't that solve the issue?
19:20:28shashlickcPlugin creates a plugin.nim file which is sent to toast in the cImport call
19:20:33zacharycarterah
19:20:57shashlickthe underscore'd symbol occurs later in the code
19:21:32*silvernode_ quit (Ping timeout: 256 seconds)
19:21:37*silvernode joined #nim
19:22:10zacharycarterwell it's better than nothing - until I have time to automate the generation of hand written bindings I can live with this
19:22:34shashlickwell the other option is to not simply strip underscores
19:22:34zacharycarterI need to brush up on perl at some point anwyay
19:22:59zacharycarteryeah - I could use regex instead I guess to do it
19:23:03shashlickthey are two different symbols, just that removing underscore loses information so they look the same
19:23:09zacharycarteryeah
19:23:39shashlickanyway, you have the flexibility to choose and nimterop allows you to do it any particular way
19:23:54zacharycarteryeah that is very true
19:23:59zacharycarterbetter than not being able to do anything about it :)
19:31:16*Senketsu joined #nim
19:32:24*natrys joined #nim
19:34:33*silvernode quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
19:35:40*Hideki joined #nim
19:35:53*Senketsu quit (Ping timeout: 265 seconds)
19:36:04*Hideki is now known as Guest9018
19:39:55*Guest9018 quit (Ping timeout: 246 seconds)
19:54:53*alexander92 is now known as alehander92
19:59:07alehander92so
20:10:37FromGitter<Knaque> Out of curiosity, what's the difference between `re` and `nre`? (Besides the broken `sequtils.toSeq()` with `nre`)
20:11:06*Jesin quit (Quit: Leaving)
20:11:30*NimBot joined #nim
20:15:17*Jesin joined #nim
20:17:27FromGitter<kaushalmodi> They are similar with different API
20:17:54FromGitter<kaushalmodi> Now nim has both because we couldn't decide between them before Nim 1.0.0 got released
20:18:17Araqand the best one is an external module called nim-regex
20:18:22AraqI think
20:18:25FromGitter<kaushalmodi> There's also `regex` available via nimble (`nimble install regex`) which is a strong contender
20:18:35FromGitter<kaushalmodi> re/nre depend on pcre
20:18:56FromGitter<kaushalmodi> nim-regex aka regex is all made in and made for nim (no pcre dependency)
20:28:00*silvernode joined #nim
20:29:20silvernodeAfternoon
20:29:28superbiaafternoon sir
20:30:00silvernodeI'm just on for a quick question, and then I'll be back later tonight for a bit before work
20:30:29silvernodeJust wondering what the official method is for getting offline docs and references to functions is.
20:31:42Araqthe installer ships the docs but you can also do 'koch docs'
20:31:52FromDiscord<Varriount> Hm, a new bot
20:33:54silvernodeAraq: I used choosenim, I'll take a look in the dot folder I suppose. Thanks
20:35:29*dadada quit (Ping timeout: 258 seconds)
20:36:05silvernodekoch docs
20:36:47*natrys quit (Quit: natrys)
20:36:53silvernodewell I must have done that wrong, ha
20:39:19*narimiran quit (Ping timeout: 258 seconds)
20:40:11FromDiscord<Technisha Circuit> What's `cImport`?
20:40:32FromGitter<kaushalmodi> Technisha Circuit: It's a macro from a nimble installed package `nimterop`
20:40:59FromGitter<kaushalmodi> It's used to auto generate Nim wrapper for types and proc signatures from C header files
20:42:25*dadada joined #nim
20:42:30*gokr joined #nim
20:42:48*dadada is now known as Guest51870
20:43:19FromDiscord<Technisha Circuit> Oh okay
20:46:18leorizeI need a regex expert
20:47:05leorizeso I'd like to match the comma in a Nim's parameter list: (a: string, b: int)
20:47:46leorizethe problem is: (a: Table[string, int], b: int)
20:47:48FromDiscord<mratsim> .\*\\,.\*
20:48:02FromDiscord<mratsim> ah
20:48:13leorizeI'd like to match just the , between the params :/
20:48:15FromDiscord<mratsim> you had one problem, with regex, you have .... 😉
20:48:27FromGitter<bung87> no you dont need regex
20:48:28Araqleorize: regexes cannot parse nested structures
20:48:28leorizesplitting a Nim param list is hard :P
20:48:44Araqit's not, only with regexes because regexes suck
20:49:05alehander92leorize can't you use the nim parser
20:49:10leorizeso I'm off writing a small parser for this?
20:49:14leorizeI'm doing this for nim.nvim
20:49:23leorizesplit the param list so I can provide parameter completion
20:49:27alehander92Araq
20:49:51alehander92i am using the nim parser
20:49:59alehander92in a toy compiler for a subset of nim
20:50:06alehander92(trying to make it parallel )
20:50:09alehander92so i wondered
20:50:13alehander92can i make it pull much less somehow
20:50:16leorizeie. got proc (a: Table[string, int], b: int) -> call(Table[string, int], int) for the user to fill in
20:50:36alehander92it really slows down the compilation which is a bit strange to me
20:50:42alehander92because its just a parser
20:51:14alehander92but to use it i import modules which pull stuff like sempass and other stuff
20:51:22alehander92do i use it in a wrong way
20:52:13Araqyes.
20:53:00FromDiscord<mratsim> https://media.discordapp.net/attachments/371759389889003532/710233151871385650/unknown.png
20:53:22alehander92i do the config ref, ident cache, condsyms , extccomp init stuff
20:53:27alehander92is any of this not needed
20:54:05FromDiscord<mratsim> alehander92 started following alexander92 😛
20:54:06Araqimport compiler/parser
20:54:15Araqis what you need
20:54:22alehander92mratsim yeah i found out i took his username
20:54:24alehander92in irc
20:54:26alehander92:(
20:54:55FromDiscord<Rika> lmaoooo
20:54:55alehander92then even PNode is undefined
20:54:57dom96TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ
20:54:59Araqleorize: writing a parser is what you should do
20:55:27Araqalehander92: so add 'import ast' etc until it compiles
20:55:33FromGitter<bung87> maybe just about hundred line
20:55:33alehander92but i did that before
20:55:42alehander92and then it loads all those modules
20:55:51alehander92thats what i am trying to fix
20:56:20*letto joined #nim
20:57:21leorizeAraq: or I can be lazy and hack nimsuggest to do this for me :)
20:57:31Araqsure
20:57:49Araqwriting a parser makes you a better person though
20:57:51leorizesomething like: after a `sug`, produce `decode` lines
20:58:00leorizewell the compiler got the AST
20:58:16dom96or just get the compiler to output the AST as JSON?
20:58:16superbiaI wrote a parser, but I don't feel any better..
20:58:32leorizenimsuggest should reduce work for its user, not creating more :P
20:58:42Araqdom96: but then you need to parse the json :P
20:59:19*pbb quit (Remote host closed the connection)
20:59:20*letto_ quit (Ping timeout: 272 seconds)
20:59:27dom96you have to parse something anyway
20:59:32dom96json seems most trivial
20:59:34FromGitter<bung87> @superbia makes your code looking smart
20:59:55Araqwell you cannot parse json with regexes either
21:00:16superbiaregex is old technology, should avoid it
21:00:32leorizeI wish I could
21:00:42FromGitter<bung87> so the better choice is ??
21:01:16dom96I'm sure vim can parse json
21:01:20FromGitter<bung87> or I need a editor not support regex finding
21:02:25*pbb joined #nim
21:03:18FromDiscord<Technisha Circuit> Is there a js to nim transpiler?
21:04:02leorizedom96: I can parse whatever, but it has to be fast or the user will notice :P
21:04:49dom96seriously doubt json parsing will be a problem
21:05:00FromGitter<bung87> I have ts to nim
21:05:13dom96Technisha Circuit: that's impossible
21:06:02*Guest51870 quit (Ping timeout: 256 seconds)
21:06:18FromGitter<bung87> https://github.com/bung87/ts2nim
21:06:25FromDiscord<Technisha Circuit> Okay
21:06:26FromDiscord<Technisha Circuit> O
21:07:26leorizeAraq: is there any reason why we don't have reversible name mangling?
21:08:04*silvernode quit (Ping timeout: 256 seconds)
21:08:28Araqyeah, I don't like mangled names that take up kilobytes
21:10:54leorizeyea but it's hard to support external tooling without this :/
21:10:54*solitudesf quit (Remote host closed the connection)
21:11:11leorize.ndi have the info, but it doesn't have the full type def
21:11:47leorizeso we can't easily distinguish foo(int) and foo(string)
21:12:03leorizemakes it hard to write debugger helpers
21:12:14*dadada__ joined #nim
21:12:24Araqdo you think `string` is a unique type? well it's not. do you think `system.string` is? nope. so how about `utils.system.string`? nope, people want to be able to reuse the `utils` module name
21:12:40Araqer, I mean package name
21:12:57Araqso in the end only <full path here>.nim/string is a unique name
21:13:23Araqand now you "only" have to do that for all types in the signature
21:15:15leorizeso in the end we will still need the compiler :P
21:17:52*abm joined #nim
21:20:11Araqwell be my guest and implement something like https://en.wikiversity.org/wiki/Visual_C%2B%2B_name_mangling
21:21:08Araqand prove the mangling is sound
21:25:54*letto_ joined #nim
21:27:49*letto quit (Ping timeout: 264 seconds)
21:29:16*superbia quit (Quit: WeeChat 2.4)
21:30:02*couven92 is now known as fredrikhr
21:35:21*thomasross joined #nim
21:36:02*dadada__ quit (Ping timeout: 260 seconds)
21:39:48*everfree joined #nim
21:40:20*couven92 joined #nim
21:40:45*dadada joined #nim
21:41:08*dadada is now known as Guest71164
21:41:34*everfree is now known as arty_everfree
21:42:31*arty_everfree is now known as arty
21:48:52*pbb quit (Ping timeout: 256 seconds)
21:54:33*hax-scramper quit (Remote host closed the connection)
21:55:15Araqhttps://internals.rust-lang.org/t/pre-rfc-a-new-symbol-mangling-scheme/8501/87 of course, others have the same problems
21:57:52*tane quit (Quit: Leaving)
21:58:02*pbb joined #nim
21:59:45*abm quit (Ping timeout: 265 seconds)
22:02:14*arty left #nim (#nim)
22:02:38*Hideki joined #nim
22:03:03*Hideki is now known as Guest865
22:04:34*abm joined #nim
22:09:21alehander92scriptconfig
22:09:24alehander92loads sem
22:09:28alehander92which loads vm
22:09:33alehander92and so much other stuff
22:09:36*pbb quit (Ping timeout: 265 seconds)
22:10:12alehander92and nimconf loads it, and i
22:10:19alehander92need it `loadConfigs`
22:10:51alehander92hm, but if i just miss loadConfigs
22:10:54alehander92it seems to wok
22:10:56alehander92work*
22:11:02alehander92so that was my error, sorreh!
22:14:22*pbb joined #nim
22:14:27PMunchalehander92, what are you working on?
22:14:33*abm quit (Read error: Connection reset by peer)
22:14:42alehander92importing the parser
22:14:49alehander92and running a parse on a file
22:14:52PMunchOoh
22:14:56alehander92i was doing something i didnt need
22:15:05alehander92so i was pulling too much of the compiler :D
22:15:05PMunchI was thinking about that earlier today
22:16:04PMunchTo see if I was able to "minify" the stdlib parts nimscript needs. To ie. remove all comments, doc comments, and stuff that's behind when not defined(nimscript) switches
22:16:22PMunchI'm still stuck on this annoying issue that I can't get nimscript to see my own library as stdlib though..
22:16:59PMunchIf I register stdlib.hashes.hashVmImpl it doesn't work, I have to register it as *.hashes.hashVmImpl
22:17:20PrestigeSup PMunch
22:17:39PMunchWhich means that calling registerAdditionalOps doesn't work if I'm not using the actual stdlib..
22:17:46PMunchPrestige, actually on my way to bed :P
22:17:54PMunchIt's 12AM here..
22:18:24PMunchWell, I say on my way to bed.. I should be on my way to bed..
22:20:19PrestigeOh, well gn :P
22:20:27PMunchWhat are you up to?
22:20:41PMunchI'm still playing with NimScript as a config language
22:22:01PrestigePMunch: working on nimdow
22:22:17PMunchThat's the name of your WM right?
22:22:19PrestigeI've made good progress, only a few things left to implement.. status bar and multihead, mainly
22:22:22PrestigeYeah
22:22:27Prestigehttps://github.com/avahe-kellenberger/nimdow#roadmap
22:22:43PMunchDo you plan on supporting different bars and such?
22:23:26PrestigeYep planning on polybar first
22:23:54PMunchOh I thought your were planning on writing your own
22:24:03PMunchWhat's your story for multihead like?
22:24:35PrestigeI'm planning on using xrandr to split up the displays, haven't looked into it much
22:26:04PMunchWell yeah, xrandr is what I use to set my screen layout
22:26:16PMunchI was more thinking how your WM would handle it
22:26:32PMunchLike i3 just treats it as more places to put workspaces
22:26:45PrestigeJust creating "Screen" objects that are mapped to a certain region, each getting their own tags
22:28:12PMunchYeah I guess that's similar
22:35:26*couven92 quit (Quit: Client disconnecting)
22:39:20*oats joined #nim
22:39:27FromDiscord<Elegant Beef> PMunch if you do get a functional embbeded version of nimscript that can do actual scripting ensure to send it to me 😄
22:40:01PMunchOh, that I have already
22:40:03PMunchKind of
22:40:22FromDiscord<Elegant Beef> My WM i have each screen with it's own layout and it just layouts in a first in first drawn layout
22:40:28FromDiscord<Elegant Beef> Ah
22:40:28PMunchAnd expect an article on it in the next couple of days
22:40:35FromDiscord<Elegant Beef> Ok cool
22:43:36PrestigeSweet
22:49:52PMunchHmm, getting one step closer..
22:50:37FromGitter<bung87> when assign literal int to float ,why does it not convert it internally?
22:51:00PMunchI figured out that matches(s: PSym; x: string) in vmgen is apparently what is failing to equal stdlib.hashes.hashVmImpl when I'm using my own stdlib. And that's because s.owner when it comes to the "stdlib" part is set to "unknown"
22:51:24*monokrom quit (Quit: Leaving)
22:51:25PMunchSo I need to figure out how I can get it to set owner to "stdlib" when I'm using my own library instead
22:51:45PMunch(By the way, conf.libpath is set to my path, so it has to be something earlier..)
22:52:06PMunchs/earlier/different
22:55:48FromDiscord<Rika> bung87: it should afaik?
22:55:58FromDiscord<Rika> !eval let x: float = 23; echo x
22:56:00NimBot23.0
22:56:06FromDiscord<Rika> yeah it does
22:56:16FromDiscord<Rika> @bung87
22:59:29PMunchHalleluja!
22:59:33PMunchI figured it out
22:59:40PMunchAnd now I feel like a complete idiot :P
23:00:33*Guest865 quit (Remote host closed the connection)
23:00:48PMunchSo guess why my minilib wasn't recognised as the actual stdlib?
23:01:24PMunchThe bug that I've now tracked through the compiler with echo statements and figured had to do with how modules are resolved throughout the compiler
23:01:51PMunchThe bug that I've spent hours trying to wrap my head around earlier and tried to pry an answer from 4raq for
23:02:14*Hideki joined #nim
23:02:15PMunchIt was simply missing the "stdlib.nimble" file..
23:02:39*Hideki is now known as Guest83618
23:02:42PMunchstdlib is a nimble module like everything else
23:03:08PMunchMy minilib was seen as "unknown" because it didn't have a stdlib.nimble file in it...
23:03:16*PMunch flips table
23:03:44*PMunch puts table back carefully. Damn these standing desks are heavy..
23:03:55*gokr quit (Quit: Leaving.)
23:06:58*Guest83618 quit (Ping timeout: 260 seconds)
23:11:49*PMunch quit (Quit: leaving)
23:12:03*krux02_ joined #nim
23:14:27*krux02 quit (Ping timeout: 240 seconds)
23:15:19FromDiscord<Rika> (╯°□°)╯︵ ┻━┻
23:15:25FromDiscord<Rika> ┬─┬ ノ( ゜-゜ノ)
23:15:54zacharycarterugh - I thought that setting the content-disposition header in a HTTP response would trigger the browser to download the response as a file based on the content-type header
23:15:58zacharycarterbut apparently not?
23:18:11FromGitter<awr1> Is @dom96 here? I keep running into a strange bug with Nim 1.2.0 using webdriver, keeps telling me 'takeScreenshot' is undeclared despite it being kinda obviously there and public
23:18:13FromGitter<awr1> https://github.com/dom96/webdriver/blob/master/src/webdriver.nim#L250
23:18:49FromDiscord<Rika> maybe we can help if you elaborate on the error
23:18:56FromGitter<awr1> my code is
23:18:57FromGitter<awr1> https://play.nim-lang.org/#ix=2lWb
23:19:31FromDiscord<Rika> what about the error message?
23:19:55FromGitter<awr1> it just tells me takeScreenshot is undeclared
23:20:33FromGitter<awr1> also yes, technically i think that is the wrong way to save a screenshot from webdriver, i think it's like base64 encoded or something
23:20:43FromGitter<awr1> but that's besides the point
23:20:55FromDiscord<Rika> can you do check the version? `nimble list -i | grep webdriver` or something
23:21:05FromDiscord<Rika> might be somehow outdated
23:21:12FromGitter<awr1> 1) 2.0
23:21:15FromGitter<awr1> i just downloadeded it
23:21:21FromGitter<awr1> i can try head i guess
23:21:23FromDiscord<Rika> hmm
23:22:26FromGitter<awr1> yeah i needed to get head
23:22:36FromGitter<awr1> `nimble install webdriver@#head`
23:22:38FromGitter<awr1> fixed it
23:22:55FromDiscord<Rika> why though? the nimble file is still 2.0
23:23:39FromGitter<awr1> i don't know, it's strange
23:24:55FromDiscord<Rika> https://github.com/dom96/webdriver/blob/c2fee574c650abb706af40dee317b85ad3820cbe/src/webdriver.nim the version back in september also had this proc...
23:25:29FromDiscord<Rika> the version without it was back in 2018
23:25:34FromDiscord<Rika> thats super weird
23:38:40*mal`` quit (Quit: Leaving)
23:59:01*ftsf joined #nim