00:11:24*ng0 quit (Quit: Alexa, when is the end of world?)
00:13:37disruptekkiloneie: seems like a good exercise. at least your code has comments!
00:20:51*HP-YC9 quit (Remote host closed the connection)
00:20:59*HP-YC9 joined #nim
00:21:42*stefanos82 quit (Quit: Quitting for now...)
00:42:15*sagax quit (Remote host closed the connection)
00:47:31*sagax joined #nim
01:05:26*steshaw quit (Quit: Connection closed for inactivity)
01:30:35*aq60 quit (Ping timeout: 260 seconds)
01:38:17*laaron quit (Remote host closed the connection)
01:51:32*steshaw joined #nim
01:53:41*krux02_ quit (Remote host closed the connection)
02:16:40*dddddd quit (Read error: Connection reset by peer)
02:23:30leorize_@Kiloneie well not that we can see others w/o an account either :P
02:23:57*leorize_ is now known as leorize
02:24:09leorizealthough you might have allocated too many strings
02:41:53*laaron joined #nim
02:52:51leorizeFWIW this is my solution: https://play.nim-lang.org/#ix=1RmO, not sure if it's efficient though
02:56:55*lritter_ joined #nim
02:58:04*lritter quit (Ping timeout: 246 seconds)
03:29:00*lritter_ quit (Quit: Leaving)
03:56:31*endragor joined #nim
03:57:57*jaens[m] joined #nim
04:07:42*fjellfras joined #nim
04:38:34*nsf joined #nim
05:09:19*joshbaptiste quit (Ping timeout: 258 seconds)
05:27:03*solitudesf joined #nim
05:38:01*joshbaptiste joined #nim
05:46:20*narimiran joined #nim
06:25:51leorizeooh, narimiran returned
06:26:11narimiranleorize: hell yeah, stronger than ever :P
06:26:53leorizemany things happened while you're gone :p
06:27:16narimiranleorize: give me some TL;DR
06:27:24leorizecheck out those new features :P
06:27:46leorizealso the chronos vs. asyncdispatch is going to be properly settled
06:34:09Zevvoh, how is that
06:34:25Zevvwb narimiran!
06:34:48leorizeZevv: thought you wrote that RFC for settling that fight? :P
06:35:09Zevvyeah, and its basically dead on arrival, no discussions at all :)
06:35:50*nif quit (Quit: ...)
06:35:59*nif joined #nim
06:36:31Zevvwhere you been to narimiran?
06:38:53narimirantwo weeks of dalmatian coast: mostly just chilling in the shade, reading some Vonnegut, playing backgammon and some board games. no computers nearby :)
06:39:02leorizeZevv: I guess that's how the fight has always been settled: both sides forget about it then move on
06:43:44AraqI am writing a new RFC, "stdlib v2"
06:43:57Araqwith design guidelines
06:44:02Zevvnarimiran: wow, no computers nearby. I should try that. I'm currently on a little island, but i did bring my computer. I do read tons though
06:44:34Araqand it will be a collection of Nimble packages. So yay, replacing old mistakes by new mistakes
06:45:14leorizeas long as I don't have to build nimble before I can build Nim, I probably can live with that
06:46:17*ehmry quit (Ping timeout: 245 seconds)
06:46:28narimiranZevv: i can really recommend it — it's like supercharging for my batteries :)
06:48:56Araqwell I'm really happy we now have a destructor spec that somewhat relates to reality :P
06:49:51leorizeis new spec up yet?
06:50:22Araqyeah, doc/destructors.rst in devel
06:50:30Araqthe wiki page is dead
06:58:32*ehmry joined #nim
06:58:52FromGitter<bevo009> @leorize is running ```git pull origin master``` on your plugin dir the recommended update method?
06:59:36FromGitter<bevo009> cheers
06:59:39leorizethat's like the only update method :P
07:00:00*gmpreussner quit (Quit: kthxbye)
07:00:13FromGitter<mratsim> Stdlib v2, we can follow Linux distros packaging, the official ones are in "gold", those tested are in testament a "silver"
07:00:23FromGitter<bevo009> I've done a million git clones but never updated anything :)
07:01:02FromGitter<alehander42> guys , do you prefer shortcut => command, or command => shortcut configs
07:01:16FromGitter<alehander42> do editors use mostly one of those or the other
07:01:26FromGitter<alehander42> Araq: new stdlib sounds awesome
07:01:33leorizeAraq: is `lent T` an automated transformation?
07:01:52FromGitter<alehander42> would it contain common "interfaces" / "protocols" to which some of the packages to conform ?
07:02:25leorizemeaning that the compiler automatically optimize stuff to `lent`?
07:02:32FromGitter<mratsim> Araq said that we need working implementations to have working interfaces
07:02:45FromGitter<alehander42> ok, but this is
07:02:53FromGitter<alehander42> v1's libs + current packages
07:03:00FromGitter<mratsim> When we talk about scheduler/multithreading API/interface
07:03:11*steshaw quit (Quit: Connection closed for inactivity)
07:03:46FromGitter<alehander42> well i am talking about interfaces that already seem more "tested"/smaller
07:04:42*gmpreussner joined #nim
07:05:03*krux02 joined #nim
07:05:39Araqleorize, no, it is not
07:16:48*fjellfras quit (Quit: Leaving)
07:20:14*nif quit (Quit: ...)
07:20:23*nif joined #nim
07:23:25*PMunch joined #nim
07:25:05krux02Araq: good morning
07:25:21*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
07:25:39*laaron joined #nim
07:26:19*laaron quit (Remote host closed the connection)
07:28:02*laaron joined #nim
07:28:37*hoijui joined #nim
07:30:00*solitudesf quit (Ping timeout: 272 seconds)
07:30:36Araqkrux02, no meeting today
08:04:15*freddy92 is now known as couven92
08:04:27*floppydh joined #nim
08:10:51*JustASlacker joined #nim
08:34:34*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
08:35:30*laaron joined #nim
08:42:39*narimiran quit (*.net *.split)
08:42:40*meff[m] quit (*.net *.split)
08:42:40*lqdev[m] quit (*.net *.split)
08:42:40*msmorgan quit (*.net *.split)
08:42:40*Guest9706 quit (*.net *.split)
08:42:40*deansher quit (*.net *.split)
08:42:40*dashed quit (*.net *.split)
08:42:40*odc quit (*.net *.split)
08:42:40*enthus1ast quit (*.net *.split)
08:42:41*LyndsySimon quit (*.net *.split)
08:42:41*surma quit (*.net *.split)
08:42:55*deansher joined #nim
08:43:15*narimiran joined #nim
08:43:20*lqdev[m] joined #nim
08:43:35*meff[m] joined #nim
08:43:38*msmorgan joined #nim
08:45:08*shomodj joined #nim
08:47:56*dashed joined #nim
08:47:56*odc joined #nim
08:47:56*snowolf joined #nim
08:47:56*enthus1ast joined #nim
08:47:56*LyndsySimon joined #nim
08:47:56*surma joined #nim
08:48:00*odc quit (Changing host)
08:48:00*odc joined #nim
08:48:00*dashed quit (Changing host)
08:48:00*dashed joined #nim
08:49:55*snowolf is now known as Guest1685
09:05:41*mfiano joined #nim
09:24:51*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:25:59*stefanos82 joined #nim
09:34:34mfianoHow do I modify $PATH for choosenim? It seems it installs things in ~/.choosenim/toolchains/<version>, which won't do if I upgrade.
09:35:28*hoijui quit (Ping timeout: 264 seconds)
09:35:36leorizeset your path to ~/.nimble/bin
09:36:08mfianoAha thanks
09:42:29*PMunch quit (Remote host closed the connection)
09:45:03*clyybber joined #nim
09:45:24*lj00nal joined #nim
09:46:16*ljoonal quit (Ping timeout: 264 seconds)
09:54:45leorizeAraq: I've addressed your comments on the gc:regions PR
09:54:56*shomodj joined #nim
09:59:02*hoijui joined #nim
10:00:48*shomodj_ joined #nim
10:00:49*shomodj quit (Ping timeout: 276 seconds)
10:02:47leorizenarimiran: this is how some new features of nim.nvim look like: https://asciinema.org/a/HE7wBXtJiWALBFdBde7BvXhiI
10:02:54leorizeyou might like them :)
10:03:27*dddddd joined #nim
10:03:52narimiranleorize: oooh, nice! (btw, which colorscheme is that?)
10:04:31leorizemy own scheme
10:05:33*MarderIII joined #nim
10:06:02leorizenow with all these new features I should make a new demo for nim.nvim, any suggestions?
10:07:14narimiransuggestion: type slowly and/or explain in the text below what you're doing, so we can follow :)
10:09:21*solitudesf joined #nim
10:12:23*lj00nal is now known as ljoonal
10:27:23FromDiscord_<Kiloneie> leorize: how long did it take you to write your own solution to that exercise ?
10:27:44leorize2 mins (incl. time to read the docs)
10:28:14FromDiscord_<Kiloneie> You don't wanna know how long it took me xD
10:29:30leorizedon't worry :p when I was new to Nim it also took me a lot of time to do stuff like that
10:30:49leorizeI'm doing some of the exercism stuff in my spare time, so feel free to check on my solutions :)
10:30:49*PMunch joined #nim
10:31:10FromDiscord_<Kiloneie> Yeah that + the fact i've mostly been playing around game engines here and there, like every couple of months, my only real programing work is back 8 years ago.
10:31:16leorizeI'm trying to strike the balance between ergonomics and performance, and things like this can be fun :)
10:31:38FromDiscord_<Kiloneie> Sure i will, i do check other people's solutions to see just how much shorter it can be made, mine are usually the longest with a lot of comments xD
10:32:41FromDiscord_<Kiloneie> Right now i need to learn a bit more Nim to be comfortable with it, then i will do some videos on it, i don't wanna start making any if i have no clue on what i will be talking about D:
10:33:27*rockcavera quit (Remote host closed the connection)
10:34:30FromDiscord_<Kiloneie> Also, is noone doing mentoring on exercism ? my Two Fer is still in progress for 2 days now.
10:36:12*MarderIII quit (Ping timeout: 272 seconds)
10:36:38leorizeI guess they're busy
10:37:59FromDiscord_<Kiloneie> How do i find your solutions btw ? i don't see a search field for users/students
10:39:46leorizedoesn't look like you can :P
10:40:11*MarderIII joined #nim
10:40:11FromDiscord_<Kiloneie> Can you see mine: https://exercism.io/profiles/Kiloneie
10:40:36leorizeyes, I can
10:40:53FromDiscord_<Kiloneie> I guess you gotta go into profile
10:41:31leorizejust created a profile
10:41:40leorizethere you go :P
10:41:53leorizedon't check my Haskell ones, they're terrible (I think)
10:42:41FromDiscord_<Kiloneie> Thanks, i will have a look. (I tried Haskell once, i couldn't figure out anything xD... pure functional programing, my brains can't think like that D:)
10:44:09leorizeit's done me a lot of good though
10:44:17leorizea bit of functional thinking can be useful
10:44:58FromDiscord_<Kiloneie> I will try that once i get a hang of everything first.
10:46:02*Vladar joined #nim
10:47:53clyybberAraq: Elements of an array constructor should always be treated like sink parameters right?
10:48:24Araqright, it's even covered by the spec
10:50:02clyybberWell, I've found a problem with that.
10:50:11clyybberI think
10:51:11*abm joined #nim
10:52:03clyybberI'll send a snippet
10:53:40clyybberIn twidgets_unown.nim there is a leak introduced by my PR.
10:54:08clyybber#devel produces this transformation for draw: http://ix.io/1Rov
10:54:26clyybberWith my PR it produces this: http://ix.io/1Rou
10:54:38clyybberAs echo has varargs
10:54:46clyybberand thus introduces an array.
10:56:37Araqlooks to me that array construction must be smart
10:56:49Araqand see whether 'echo' uses a sink parameter or not
10:57:39Araqlet a = [arg1, arg2]
10:57:51Araqecho a # meh, ok, 'a' sinked the stuff
10:58:17Araqecho [arg1, arg2] # don't sink. And don't copy, it's just some syntactic quirk ?
10:58:58Araqit's conceptually really echo(arg1, arg2)
10:59:14Araqand for ordinary, non-sink parameter passing we neither produce a copy nor a move
11:00:18Araqit's a special rule but at least it is not echo-specific
11:00:29Araqand rather easy to detect in the AST
11:02:43Araqclyybber, what do you think?
11:03:21clyybberI'm thinking..
11:03:37clyybberAraq: How to detect if it was varargs though?
11:04:28Araqit doesn't matter, the pattern is f([...])
11:04:56clyybberYeah, but that will break what I fixed, the `@` proc
11:05:11clyybberI think
11:06:07Araqf([...]) --> handle it like f(...) but keep the nkBracket
11:09:43*ng0 joined #nim
11:19:56clyybberOk, I'll try
11:24:30FromGitter<alehander42> btw araq ⏎ talking about stdlib 2 and newruntime(no gc) ⏎ is there a plan for something like https://doc.rust-lang.org/core/ ⏎ which doesnt depend on system/libc etc [https://gitter.im/nim-lang/Nim?at=5d514c6e9baa6938407c0408]
11:27:57*MarderIII quit (Ping timeout: 245 seconds)
11:37:25*rockcavera joined #nim
11:40:29*MarderIII joined #nim
11:42:21Zevvdisruptek: I think I got the most simple setup for importing paterns and doing name lookups. I'd appreciate any feedback if you have some time one of these days
11:43:17disruptekdid you push it?
11:44:49Zevvits in a branch, but the basic idea is very simple: all patterns in the global library get fully qualified names <libname>.<pattname>, and all non-qualified pattern names they refer get qualified to their own libname.
11:45:02ZevvWhen you want to use a pattern from the global lib, prefix it with the lib name.
11:45:05ZevvThat's it.
11:45:21ZevvSo you can now do 'net.ipv6address' in your grammar
11:45:37ZevvThe whole importing I leave to nim by just using normal nim files which you can import the normal way
11:45:48Zevvso no explicit imports needed in thet grammar itself
11:46:10Zevvthe global namespace will probably bite me one day, but for now this is cool
11:46:39Zevvjust pushed to master - it should not break anything
11:46:42disruptekit sounds simple but i don't get it. :-D where does `net` come from? not the `net` lib.
11:47:00Araqalehander42: it comes up from time to time but there is no concrete plan to remove the libc dependencies. For Windows I can do it
11:47:09Zevvdisruptek: no, that would be a npeg/net
11:47:09AraqI mean I *could*
11:47:39Zevvto-be-written, just an example. I plan to offer npeg/uri, npeg/net, npeg/http and other obvious candidates
11:48:07disruptekah, i see. so if i author my own pattern for import/export, how do i reuse it?
11:50:06Zevvdisruptek: ttps://paste.debian.net/1095444/
11:51:11Zevvcan't make it any more simply I guess
11:51:13disrupteksuper cool, can't wait to see what people come up with.
11:54:08*Kaivo joined #nim
12:03:19*HP-YC9 quit (Remote host closed the connection)
12:03:28*HP-YC9 joined #nim
12:07:57leorize[m]Zevv: any plan to use that email parser I wrote? :p
12:08:11*NimBot joined #nim
12:08:14disruptekis it rfc822?
12:08:50leorize[m]yea, i used several rfcs to write it
12:09:10Zevvleorize[m]: well, it is in my personal pool of tests stuff, so I might just add it.
12:09:32Zevvat the time I aquired it, it was not open source if I recall correcrly :)
12:09:34disrupteksweet, i need that. it's crazy, but i can't find a simple tool to pluck addresses from an email.
12:10:15FromGitter<alehander42> Araq the point is to remove it for *some* subset of the stdlib i guess
12:10:42FromGitter<alehander42> i think thats usually useful for osdev/embedded etc, but not an expert admittedly
12:11:01leorize[m]Zevv: that thing is MIT licensed :p just that i didn't release the source
12:11:20disruptekZevv: maybe you should make a web-site where people can input their npeg and get back a js module for matching and captures, etc. i bet that would be popular.
12:12:08leorize[m]well I can do that now but that parser is the only salvageable part
12:12:27*laaron quit (Remote host closed the connection)
12:13:15Zevvdisruptek: haha, that would be a pretty cool :)
12:14:36disruptekit really would. and you could somehow ix.io out the grammars and let people mix-and-match from grammars others had construction. let your library of grammars grow organically.
12:14:51*laaron joined #nim
12:15:53Zevvnah, I bet the js ecosystem has its solutions already...
12:16:52Araqio.nim(465, 6) Error: 'open' is
12:16:52Araqnot GC-safe as it calls 'fopen'
12:16:58Araq^ it's a Monday
12:17:03disrupteki don't recall the pegs js stuff as being composable like npeg.
12:17:06Araqmy compiler hates Mondays
12:17:27Araqstupid compiler, surely fopen is GC-safe, it's imported from C
12:22:14*sacredfrog joined #nim
12:23:35*laaron quit (Remote host closed the connection)
12:25:07*laaron joined #nim
12:28:38*Kaivo quit (Quit: WeeChat 2.5)
12:29:29clyybbercompiler wants to keep you busy
12:29:58FromGitter<alehander42> disrupter peg js has online stuff
12:29:59FromGitter<alehander42> iirc
12:30:15FromGitter<alehander42> and npeg has to start generating trees
12:30:19FromGitter<alehander42> to be really useful
12:30:50FromGitter<alehander42> but it would be cool to make js grammars online indeed
12:30:50*Kaivo joined #nim
12:30:53FromGitter<alehander42> zevv
12:31:02FromGitter<alehander42> can it generate trees these days
12:31:05Araqclyybber, I think you discovered a new concept, a "partially materialized object"
12:31:59clyybberGreat :D bbl
12:43:09*shomodj joined #nim
12:46:59*shomodj_ quit (Ping timeout: 248 seconds)
12:50:04*adeohluwa joined #nim
12:54:53Araqhttps://www.macrumors.com/2019/04/08/mac-apps-notarization-macos-10-14-5/ yay, OSX is getting less usable
12:56:14xacePMunch: if you like to discuss nimcr in person, you can reach me here too, but I keep an eye open on both irc and github. I hope my message wasn't too confusing
12:57:27Zevvlehander42: yes it can
12:58:02ZevvIt already could build JsonNode tree, but I added a more simple ASTtree type, which are just nodes which hold a string and a seq of kids
13:01:24*adeohluwa quit (Remote host closed the connection)
13:03:10*adeohluwa joined #nim
13:09:36*nc-x joined #nim
13:09:58nc-xTrying to bootstrap latest devel, I get an error - iteration: 2 compiler\nim1.exe c -d:danger --nimcache:nimcache/r_windows_amd64 --compileOnly compiler\nim.nim could not load: sqlite3_64.dll
13:10:30nc-xretrying, i get - error evaluating JSON file: C:\Nim\nimcache\r_windows_amd64\nim.json
13:10:47nc-xideas, anyone?
13:11:01Araqthe devel compiler now requires SQLite
13:11:31*adeohluwa quit (Ping timeout: 248 seconds)
13:11:48nc-xI have the sqlite dll in the same folder though
13:12:15Araqwell it works for me and the CIs
13:12:26nc-xretrying after deleting nimcache
13:12:37nc-xand restarting cmder
13:13:56nc-xcompiled fine now. it requires the dll to be either in the /compiler folder or in PATH. restarting cmder for path changes made it work
13:14:32Araqah ok
13:18:52leorizewhy does the compiler requires sqlite though? for CI?
13:18:53*nc-x quit (Remote host closed the connection)
13:19:31*kungtotte quit (Ping timeout: 248 seconds)
13:20:46*nsf quit (Quit: WeeChat 2.4)
13:24:34FromGitter<alehander42> Zevv, nice
13:24:57FromGitter<alehander42> But what if I want to store int or other literals
13:25:08FromGitter<alehander42> Not too important tho
13:25:25FromGitter<alehander42> also would this be generalize to custom tree types
13:26:15*kungtotte joined #nim
13:27:14Zevvwell, you can already pass custom types into the parser and have code blocks do whatever you want
13:28:25Zevvso you can parse and store in and object, or build some kind of tree. you'd have to do the tree handling yourself though
13:29:18ZevvI tried making this part of the parser so that you can build some kinde of node T, and make these part of the capatures tree, but that broke too much stuff and i was not able to make this fit without smoothly
13:31:38*jmiven quit (Quit: reboot)
13:31:58Zevvthe pattern libs are also not really usuable as they are now, as these predefined grammars do not capture anything, and you can't make them. but I rather ignore that problem for now and just act if all is cool, maybe the problem goes away then
13:32:39*jmiven joined #nim
13:33:40*hoijui quit (Ping timeout: 264 seconds)
13:33:55*solitudesf quit (Ping timeout: 248 seconds)
13:40:03*MarderIII quit (Ping timeout: 245 seconds)
13:50:41*laaron quit (Remote host closed the connection)
13:53:11*laaron joined #nim
13:53:17*sagax quit (Remote host closed the connection)
13:53:44*MarderIII joined #nim
13:58:14*PMunch quit (Remote host closed the connection)
14:11:43*sagax joined #nim
14:16:31stefanos82Araq: may I ask what's the use of SQLite in devel?
14:21:23Zevvi believe its used for incremental compilation
14:24:35stefanos82of the compiler itself or in general?
14:33:07*endragor quit (Remote host closed the connection)
14:34:23clyybberAraq: You mean the varargs array is a "partially materialized object"?
14:38:44Araqyou can generalize the idea to object constructors and anything that is only plugged together for the duration of a function call
14:42:32*solitudesf joined #nim
14:44:18Araqit's related to my .cursor idea: you don't have to construct an object properly if it doesn't "escape"
14:45:53*Vladar quit (Remote host closed the connection)
14:53:55*MarderIII quit (Ping timeout: 258 seconds)
15:04:10*JustASlacker quit (Quit: Leaving)
15:06:55disruptekthat sounds like a powerful concept.
15:08:55*laaron quit (Remote host closed the connection)
15:09:28disruptekso any part of the function env can be loosely constructed as long as it doesn't have a lifetime outside of the function? what about calls that function makes? that's an escape, right? or can it be bearded somehow?
15:11:00*laaron joined #nim
15:11:15Araqif you pass it to a proc that takes it "by const&" (Nim's default) it cannot mess with it
15:13:22disruptekso pure functional stuff could work without regard to ownership?
15:13:40*endragor joined #nim
15:17:55*endragor quit (Ping timeout: 248 seconds)
15:19:05FromGitter<alehander42> Stefanos82, incremental is for the compiler
15:19:25stefanos82@alehander42: nice
15:19:40FromGitter<alehander42> Zevv, I might take a look, I wanted to use it for some custom trees but maybe they are too custom
15:19:41stefanos82so where is the database located?
15:20:58disrupteknim should probably reserve the %< scissor operator for some common operation. :-)
15:21:20leorizestefanos82: looks like in nimcache/rodfiles.db
15:21:39stefanos82leorize: ah you mean in case I use the --nimcache flag?
15:22:00leorizeit's basically stored in the cache
15:23:08stefanos82can you share the actual flag I should use please?
15:23:23*Trustable joined #nim
15:23:30stefanos82I used --nimcache=nimcache and cannot see anything in there, apart from .c, .o files
15:23:36stefanos82and .json
15:24:46stefanos82ah OK
15:25:28stefanos82yep, no I see it
15:26:01leorizeare you on git HEAD?
15:26:44stefanos82I think I git a bug
15:26:52stefanos82Error: unhandled exception: modules.nim(85, 14) `result.id < 0` [AssertionError]
15:27:19leorizewell, IC is still unstable
15:27:29stefanos82ah OK
15:30:20*Vladar joined #nim
15:32:26*hoijui joined #nim
15:38:29*nif quit (Quit: ...)
15:38:37*nif joined #nim
15:51:24*endragor joined #nim
16:00:49*endragor quit (Remote host closed the connection)
16:09:43clyybberAraq: The issue I'm trying to fix. It would be wrong to fix it I think
16:09:48disruptekin `case x: of y: ... of z: ...` how many colons is the right amount? most of stdlib appears to omit a trailing : on the `case` line, but i guess nimpretty isn't opinionated? https://github.com/nim-lang/Nim/blob/devel/lib/core/macros.nim#L1215
16:10:18clyybberAraq: I mean fixing it in injectdestructors
16:10:29clyybberBecause I think the transformation is correct
16:11:00clyybberits just that @ does things that should not be done.
16:11:07leorizedisruptek: the trailing colon is an optional thing f
16:11:12leorizefor "consistency" iirc
16:12:49disruptekyeah, i think nimpretty should take a stance on it, either way. i personally use a : on my case line. also, with respect to indenting the `of` clauses, with and without indent seems a matter of preference.
16:12:53clyybberAraq: Nevermind, need to think more about it
16:14:06*shomodj_ joined #nim
16:14:59*laaron quit (Remote host closed the connection)
16:15:57*laaron joined #nim
16:16:17*shomodj quit (Ping timeout: 245 seconds)
16:34:49Araqdisruptek, no colon after the 'case x'
16:35:00Araqand no indentation for the 'of' branches
16:35:09disruptekwant a pr for nimpretty?
16:35:11Araqis the one true way (TM)
16:35:58Araqwell nimpretty needs a --onestyle vs --mystyle distinction
16:36:05clyybberYeah pls
16:36:35Araqeverybody wants the --onstyle as long as it's --mystyle, but *shrug*
16:37:06AraqI've given up on this nonsense, I accepted that programmers are fascists
16:37:16clyybberNim makes it easy to not care about other ppls styles
16:37:18clyybberso thats what I do
16:37:50*shomodj_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:38:14AraqI am using a generic solutions, I only read books by Terry Pratchett
16:38:32Araqcan't read other books, the style isn't the same
16:41:55clyybberAraq: `@` takes ownership over the array it gets
16:42:06clyybberOr it *should*
16:42:17Araqclyybber, so give it a 'sink' annotation?
16:42:29clyybberAraq: Yeah, and that will fix all the problems I think
16:43:00Araqwhat about let x = @[f(), g()]
16:43:04clyybberMy point is that I have a suspicion that `@` cant work without sink no matter the rewrite rules
16:43:29Araqwell if @ needs 'sink' then our design has a bug
16:44:20clyybberAraq: Ok, imma eat for a bit. What should `var x = @[@[Foo()]]` be transformed to in your opinion?
16:45:06Araqto the very same
16:45:26Araqbut var x = @[@[a]] needs to copy 'a'
16:46:32Araqyou're right, @ is like an imported proc that doesn't play nice
16:46:55Araqand so it's not a bug in the spec.
16:46:57*actuallybatman joined #nim
16:47:14Araqactuallybatman, are you a scientist?
16:48:04*hoijui quit (Ping timeout: 264 seconds)
16:48:45Araqclyybber, however in 'let x = [a]' we need to copy 'a' and in 'echo [a]' we don't have to
17:10:04Zevvalehander42: keep me informed, would be interested in your use case
17:12:41*shomodj joined #nim
17:16:50*laaron quit (Remote host closed the connection)
17:19:57clyybberAraq: Yeah
17:20:10*laaron joined #nim
17:24:37*shomodj_ joined #nim
17:25:06leorizenarimiran: can we have a link to the playground of the header bar?
17:25:15leorizeit seems that many doesn't notice that a playground exists
17:25:29narimiranleorize: dom96 is the one to ask for that
17:25:47Zevvshould newruntime be able to support things like pure/json.nim by now?
17:25:56leorizeI think it should
17:26:21clyybberZevv: Try it :)
17:26:31ZevvI tried very naively to add "owned"s until nothing complained anymore, but i got stuck
17:26:45clyybberHow did you get stuck?
17:26:50Zevvi forgot the exact error message, it was something like "needs a copy because it is not the last read"
17:27:03Zevvand I didnt know what to do from there
17:27:25Zevvwas inside a recursive function iirc
17:28:20clyybberZevv: Owned refs cant be copied, so `x = y` is invalid when x gets used after the assignment
17:28:47*shomodj quit (Ping timeout: 268 seconds)
17:29:38clyybberBut without context its hard to say how to change things to make it work
17:29:52ZevvI figured that much, so I guess I will need to put some more thought in it
17:29:58ZevvI might try tonight
17:30:15clyybberZevv: Tell me when you're stuck, I might be able to help out
17:30:35Zevvit does make sense that the whole jsonnode tree would be owned, right? It is a proper tree without cycles, so that should be just fine
17:30:49clyybberAraq: Ugh, ./koch temp just stopped working. Generates invalid C code..
17:31:51leorizeZevv: yea
17:33:48clyybberGreat. Changing `@` broke bootstrapping
17:33:53FromDiscord_<Kiloneie> The playground should be on the front page as well as Learn sub section
17:33:55clyybberZevv: It sounds like it should
17:44:09clyybberHey, narimiran wb o/
17:44:17narimiran clyybber thanks! :)
17:49:13AraqZevv, json.nim doesn't work with --newruntime
17:49:24Araqand I'm not sure if it can, you can do
17:49:32Araqnode[x] = x
17:49:57Araqand the new runtime is not compatible with it ;-)
17:53:55*Trustable quit (Remote host closed the connection)
17:59:51clyybberAraq: I think I might have uncovered a gcc bug
18:00:18clyybberBecause where the compiler will fail to bootstrap seems random
18:00:26clyybbersometimes it fails at CC: sem
18:00:57clyybbersometimes at CC: ast, CC: injectdestructors
18:01:00*nsf joined #nim
18:01:36clyybberBut once you bootstrap it, and then change the `@` in system.nim to have a sink param it works
18:02:11clyybberHow to merge/deal with such bootstrapping breaking changes?
18:05:22*rockcavera quit (Remote host closed the connection)
18:06:34*shomodj_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:18:40Araqclyybber: 'when not defined(booting): ' old '@' proc here'
18:18:53clyybberAraq: Thanks
18:23:15FromGitter<rishavs> qq about using unicode in nim; ⏎ I want to do `echo "हिंदी"`. On running the program, the console shows me `αñ╣αñ┐αñéαñªαÑÇ `. ⏎ At first I though that maybe the Win10 powershell doesnt supports unicode. But doing a simple echo on the cmd shows the unicode correctly. WHat am I doing wrong?
18:25:03*theelous3 joined #nim
18:36:53FromGitter<zacharycarter> shashlick: are you around by any chance?
18:38:38*rockcavera joined #nim
18:39:11*vegax87 joined #nim
18:44:04Araqrishavs: set the codepage to utf-8
18:45:10clyybberAraq: What to do about openarray?
18:45:35clyybberliftdestructors says: cannot copy array
18:46:33Araqhmmm I don't know
18:47:24clyybberI guess for now I'll only be changing `@` for array
18:48:19clyybberBtw, the issue is in newTree
18:49:10clyybberIts because children cant be sunk/moved
18:51:36*nsf quit (Quit: WeeChat 2.4)
18:55:29FromDiscord_<Kiloneie> How does do ordered_table[i+1] in a for loop of table's keys ?
18:55:49*stefanos82 quit (Quit: Quitting for now...)
18:56:13clyybberAraq: The change to treat f([...]) like f(...) also doesn't seem to be needed anymore. Should I include it anyways?
18:57:26clyybberThe only effective difference is that the elements of `[...]` on #devel are processed in p()
18:57:37clyybberwhile on my branch they are processed in pArg()
18:57:44clyybbernot sure whats more correct though.
18:58:33*Vladar quit (Remote host closed the connection)
18:58:45*HP-YC9 quit (Remote host closed the connection)
18:58:49clyybberpArg() is more inline with how we treat array constructors in injectdestructors
18:58:54*HP-YC9 joined #nim
18:59:16clyybberAraq: Wdyt about making p() only for statements?
18:59:37clyybberThe fact that it handles nkCall expressions that return something is kind of confusing
18:59:51*HP-YC9 quit (Remote host closed the connection)
19:00:02Araqp() vs pArg() needs to die
19:00:08Araqthere should only be p()
19:00:38clyybberAraq: I'll be happy to make that happen
19:00:42Araqp() might need some info as in "is this passed onto a sink parameter"
19:01:02Araqso I suppose pArg() is what can handle everything
19:01:07*HP-YC9 joined #nim
19:01:34clyybberOk with you if I try to unify them in this PR?
19:01:57Araqthe tests are evil
19:02:10Araqany PR that keeps them green means you got it right :P
19:02:24Araqand so I don't have to review things, makes my life easier
19:02:36clyybberI'll try to beat em up real good :D
19:10:18*PMunch joined #nim
19:24:10FromGitter<zacharycarter> with nimterop - does anyone know how to reference a symbol in C in a cOverride section?
19:24:18FromGitter<zacharycarter> basically I have a type that is causing issue - but it references another type defined in C
19:24:32FromGitter<zacharycarter> when I try to override the Nim type I get an undeclared identifier error
19:28:34FromGitter<zacharycarter> this is what's causing it - https://gist.github.com/zacharycarter/db58886ba7cdcdf17937f335ed163242
19:38:20*HP-YC9 quit (Remote host closed the connection)
19:38:30*HP-YC9 joined #nim
19:57:50*rockcavera quit (Remote host closed the connection)
19:58:23*laaron- joined #nim
20:01:52*laaron quit (Ping timeout: 260 seconds)
20:02:24*ljoonal quit (Ping timeout: 272 seconds)
20:08:37*PMunch quit (Remote host closed the connection)
20:09:45*Jesin quit (Quit: Leaving)
20:14:56FromDiscord_<Shield> I'm going through the coroutine lib and it seems that once you hit the run function will only exist when all coroutines exist? wouldn't it be more helpful if it only runs X amount of coroutines or has a timeout so you can do other stuff too?
20:15:12FromDiscord_<Shield> it will*
20:16:32Araqcoroutines are not supported
20:16:46Araquse async or a tasking system based on closure iterators
20:17:02*lritter joined #nim
20:19:29*ljoonal joined #nim
20:20:07*HP-YC9 quit (Remote host closed the connection)
20:20:16*HP-YC9 joined #nim
20:21:31*HP-YC9 quit (Remote host closed the connection)
20:21:38*HP-YC9 joined #nim
20:47:47FromGitter<Varriount> Araq: Is there any way closure iterators could be more performant? That is, are there any obvious optimizations that could be done?
20:52:02*hoijui joined #nim
20:54:28*abm quit (Quit: Leaving)
21:00:31AraqI'm not aware of any
21:01:12Araqwe could move the data into the closures...
21:01:19Araqif only we could move... oh wait
21:01:33FromDiscord_<Shield> I noticed that using switch is faster than closure iterators, even if nim doesn't allow Duff's device
21:01:58FromDiscord_<Shield> but that means you hardcore the statemachine yourself
21:02:01Araqdo you mean 'case'?
21:02:07FromDiscord_<Shield> yeah
21:02:57FromDiscord_<Shield> hardcode*
21:07:25*HP-YC9 quit (Remote host closed the connection)
21:07:37*HP-YC9 joined #nim
21:08:00FromGitter<Varriount> Araq: Regarding the new runtime and file handles/sockets, the destructors document says that `close` won't be required anymore. Does this mean some sort of internal refcount will be added to those types?
21:12:49Araqno, it works with moves, you can think of it as a one bit reference count
21:15:43*HP-YC9 quit (Remote host closed the connection)
21:15:51*HP-YC9 joined #nim
21:23:06*shomodj joined #nim
21:30:33shashlickHey @zacharycarter
21:31:50shashlickBasically you are facing https://github.com/nimterop/nimterop/issues/133
21:34:07*narimiran quit (Ping timeout: 258 seconds)
21:37:37ozdom96: I made two issues on jester for you. This one is a little puzzling https://github.com/dom96/jester/issues/206
21:37:50ozHope this helps anyway. :)
21:39:16*HP-YC9 quit (Remote host closed the connection)
21:39:31dom96oz, just released 0.4.3 for you
21:40:02*hoijui quit (Quit: Leaving)
21:40:43dom96try that for your other bug too
21:42:55clyybberAraq: Somehow while trying to unify pArg and p I managed to reduce the alloc/dealloc counters of tgcdestructors by 1. It doesn't leak, runs as expected and otherwise all tests pass.
21:43:27Araqthat's good but look at the transformed code
21:43:30disruptekhah, nice.
21:43:33AraqA/B testing
21:43:54Araqcompile with devel, make it output the transformed proc then do the same with your compiler
21:48:23*solitudesf quit (Ping timeout: 245 seconds)
21:53:33FromDiscord_<treeform> New error? "'bar' is of type <var int> which cannot be captured as it would violate memory safety, declared here" why? how do I fix it?
22:05:44ozdom96: both issues fixed. Thanks! :)
22:07:47dom96yay :)
22:07:48lqdev[m]@treeform you cannot capture a var parameter from a proc, make it a ref
22:07:55lqdev[m]or ptr
22:08:12lqdev[m]s/proc/nested proc/
22:13:42clyybberAraq: Found the diff
22:14:02clyybberIn devel `var o = Obj(f: [1, 2, 3])` gets
22:14:07clyybbertransformed to:
22:15:05*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:15:34clyybber`=sink`(o, Obj(f:
22:15:44clyybber wasMoved(:tmpD)
22:16:02clyybber `=`(:tmpD, [1,2,3])
22:16:06clyybber :tmpD))
22:16:30clyybberBut due to the unification of p and pArg it now gets transfromed to:
22:16:55clyybber`=sink`(o, Obj(f: [1,2,3]))
22:18:40clyybberBecause of the nkBracket thing.
22:19:02clyybberIt looks correct to me. WDYT?
22:25:41clyybberping @Araq
23:08:46FromGitter<Varriount> disruptek: Neat!
23:11:51*Jesin joined #nim
23:14:52*krux02_ joined #nim
23:17:21*krux02 quit (Ping timeout: 250 seconds)
23:23:14FromDiscord_<Shield> I'm checking the code generated for closures, I think that it's slower than a case statement because a lot of things are done to the closure environment, which is a pointer, then there's a bunch of gotos
23:34:51*ng0 quit (Quit: Alexa, when is the end of world?)
23:39:54FromGitter<kayabaNerve> treeform lqdev[m] I was dealing with that recently. What counts as captured? Isn't the point of passing car being to about to write to the variable? ref only allows writing to it's memory.
23:40:29FromGitter<kayabaNerve> I was passing around a JSONNode and needed to be able to set the node to null. That type is a ref.
23:41:02FromGitter<kayabaNerve> *... JSONObject? I ended up with a ref of a ref of an object because var JSONNode wouldn't play nice.
23:41:23*m171273 joined #nim
23:41:28FromGitter<kayabaNerve> *passing var
23:43:58*rockcavera joined #nim
23:44:09m171273Hello, I created an account on the Nim forum but apparently waited too long to verify my email address. Now I cannot post my question. I also cannot re-send the verification email. I tried deleting and recreating my account, but no dice. I sent replied to my verification email, but I don't know if that email is monitored. I also don't see a contact email address on the forum or main website. Anyone on here that has the a
23:44:09m171273bility to fix my account?
23:46:20FromGitter<bevo009> That happened to me too. dom can fix it
23:46:39*m171273_ joined #nim
23:47:02FromGitter<bevo009> @dom96
23:49:52*m171273 quit (Ping timeout: 264 seconds)
23:55:54*Jesin quit (Quit: Leaving)
23:56:32*m171273 joined #nim
23:59:35*krux02_ quit (Remote host closed the connection)
23:59:56*clyybber quit (Quit: WeeChat 2.5)