<<14-09-2020>>

00:06:36*D_ quit (Remote host closed the connection)
00:06:46*D_ joined #nim
00:07:38*D_ quit (Remote host closed the connection)
00:07:48*D_ joined #nim
00:29:23*OldFaithful quit (Ping timeout: 240 seconds)
00:30:56*OldFaithful joined #nim
00:48:19*abm quit (Read error: Connection reset by peer)
01:20:48*Tanger joined #nim
01:36:47disruptekvan morrison can kiss my ass.
01:38:25*apahl quit (Ping timeout: 240 seconds)
01:40:34*apahl joined #nim
01:47:11*krux02_ quit (Remote host closed the connection)
02:00:39*endragor joined #nim
02:01:00*Zectbumo joined #nim
02:18:53*lritter quit (Quit: Leaving)
02:36:21*leorize quit (Remote host closed the connection)
02:41:11*a_chou joined #nim
02:45:56*muffindrake quit (Ping timeout: 240 seconds)
02:48:13*muffindrake joined #nim
02:59:18*mipri joined #nim
03:04:25*endragor quit (Ping timeout: 264 seconds)
03:09:17*endragor joined #nim
03:14:22*endragor quit (Remote host closed the connection)
03:14:57*endragor joined #nim
03:18:20*a_chou quit (Quit: a_chou)
03:24:47*endragor_ joined #nim
03:28:10*endragor quit (Ping timeout: 244 seconds)
03:35:06*rockcavera quit (Remote host closed the connection)
03:43:03*opal quit (Ping timeout: 240 seconds)
03:46:27*opal joined #nim
04:06:02*supakeen quit (Quit: WeeChat 2.9)
04:06:39*supakeen joined #nim
04:21:19*shad0w joined #nim
04:21:29*shad0w left #nim (#nim)
04:21:30*vegai joined #nim
04:21:41*shad0w joined #nim
04:22:31shad0wdropping here for the first time. just started picking up nim. Hi all ! : )
04:22:41disrupteksup dawg
04:23:32shad0wjust planning on shredding the tutorials on the nim lang site the next couple days.
04:23:47disruptekwhat language(s) are you coming from?
04:24:05shad0wmost recently, haskell
04:24:12shad0wit was a bunch of em before
04:24:21disrupteknice.
04:24:23shad0wjavascript, C, python.
04:24:56disruptekyou won't have much trouble.
04:24:58shad0wany pointers? (no pun intended) for a nim newbie
04:25:52disruptekjust that you give it the benefit of the doubt. it's more powerful than it looks.
04:26:33shad0wit does have the "seems too good to be true" thing going on for it
04:26:47disrupteki mean, it kinda is.
04:27:10disruptekmost people just sorta bounce off, though, because we don't really sell it as much as we should.
04:27:36disruptekwhat are you planning on using it for?
04:28:56shad0wnothing specific really tbh. but a general tool for whatever i'll need to do. which could be stuff with a wide range
04:29:30shad0wit's fast, its nice-ish? to read, it has macros. could fit the suit
04:29:31disruptekit would easily replace js/c/python in your toolbox.
04:29:50shad0wbut ive been looking to get into compilers
04:30:07shad0wi intend to contribute to the nim compiler if i do hit it off.
04:30:40disruptekgood, there is a lot of work to do and the code is pretty hairy in spots.
04:30:45shad0wmaybe do the LLVM to nim thing, just as a learning exercise, if nothing more.
04:30:47disruptekbut luckily, it's written in nim.
04:31:43shad0wi saw.
04:32:31shad0wyou had a chance to work on the compiler code yet?
04:32:54disrupteki'm working on incremental compilation.
04:33:30disruptekwell, currently hung up on corner cases in the mangling for the c/cpp backend.
04:34:26disrupteksome of the code dates to when it was converted from pascal.
04:36:02shad0wsounds the frustrating kind of fun
04:36:37shad0wlike*
04:36:39disruptekmy approach sucks.
04:37:06shad0wyou suck your way to the top my friend.
04:37:08disruptekit seemed easier when i started. ๐Ÿ˜
04:37:33shad0wclassic lol
04:37:53disrupteki know. i went in and set everything on fire.
04:38:06disruptekit's almost back together but i've got a couple niggling issues.
04:38:40disruptekbut, it will mean that instead of hash-based identifiers, we'll have properly useful names.
04:39:31shad0wand that's good, right ?
04:40:10disruptekwhen you start looking at the c output, you'll get a feel for it.
04:40:20disruptekit's pretty tedious.
04:40:43disruptekone of those things almost no one has to see.
04:41:41disruptekthe compiler is pretty awesome, all things considered, though.
04:41:57disruptekpretty fast, very powerful, lots of knobs and levers.
04:42:06disrupteknot really optimized yet, either.
04:43:02shad0wthat just means more work for us to do. in a good way
04:43:23disruptekyeah, we have some pretty revolutionary stuff in the skunk works that will take it to the next level.
04:44:07shad0wlet me know if there's stuff a newbie to nim like me could help out with.
04:44:30disruptekwell, take notes on the confusing bits as you pick it up.
04:44:33disruptekthat's always useful.
04:45:21shad0wyou got it.
04:45:53disruptekthere is always that point where you understand it enough to want it to work a certain way, and that's frustrating, but then you get properly oriented and can begin to really see the whys and whatfers.
04:46:36disruptekthat was my experience anyway. it's not like a lot of other languages with larger, more polished experiences. this thing is a bit mad.
04:46:51shad0wcoming for haskell, i think that wont be an issue. that stuff was so different, nim feels like familiar ground.
04:47:11disruptektrue, it's not quite the same mindfuck.
04:47:30shad0wbut i'd like to incorporate the good simple parts of haskell in the style
04:47:54disruptekwe always need more of that deep functional touch.
04:48:16shad0wwhen i found out i can call procs with spaces lik `f1 arg1, arg2` instead of forcing me to `f1(arg1, arg2)`
04:48:17disruptekit's not like it isn't there; we're just bad at bringing it to the surface.
04:48:21shad0wthat was pleasent.
04:48:52disruptekyeah, but wait to you really get into macros.
04:49:15disruptekthere's almost nothing you /shouldn't/ be able to do.
04:49:37shad0wwell, i was a haskell newbie too, been picking it up for a few months, not like i was an expert or something, but i think when i see a good thing i can atleast recognise it.
04:50:00disruptekyep, nim is tasteful.
04:51:13disruptek!eval echo "hello"
04:51:15NimBothello
04:51:20disruptekalso say ~help
04:52:18disruptek~disbot
04:52:19disbotno footnotes for `disbot`. ๐Ÿ™
04:52:56shad0w!eval echo "hello"
04:52:58NimBothello
04:53:03shad0w~help
04:53:14disruptek~disbot is a bot that will message you usage instructions if you say `~help`. if you're on discord or gitter, you're shit outta luck -- get a real client.
04:53:15disbot9disbot: 11a bot that will message you usage instructions if you say `~help`. if you're on discord or gitter, you're shit outta luck -- get a real client.
04:53:53shad0wno, im on a irc client xD
04:54:00disruptekyeah, i know.
04:54:14disruptekjust a footnote i can lay on the next discord knucklehead to drop by.
04:54:29shad0wthis is pretty sweet, thanks.
04:54:55disruptekyeah, it's fun.
04:54:55shad0wdiscord is good too, in its own way. pretty decent for an electron app, if you ask me.
04:55:26disruptekit's nice to be able to ignore entirely useless segments of the community, sure.
04:55:43shad0wwhat's a better client for linux? i downloaded the first that came my way
04:55:54shad0wits called srain
04:56:19disruptekfor irc? i use irssi, but only because it feels old school to me.
04:56:32shad0wits the terminal one right ?
04:56:35disruptekyeah.
04:56:50shad0woh wait, i forgot to check the emacs packages
04:57:01shad0wim sure there'd be something
04:57:07disruptekemacs... krux02 is the guy that knows what's up.
04:57:16disrupteki use nvim and this one:
04:57:21disruptek!repo nim.nvim
04:57:22disbot12https://github.com/alaviss/nim.nvim -- 9nim.nvim: 11Nim plugin for NeoVim 15 95โญ 13๐Ÿด 7& 3 more...
04:57:24shad0wopen a client in an emacs buffer or something
04:57:32shad0wcan you @ users here ?
04:57:41disrupteksure.
04:59:04shad0whi @krux02, id like some more insight on a good nim emacs environment, hit me up when you get a chance : )
04:59:04*FromDiscord quit (Remote host closed the connection)
04:59:21*FromDiscord joined #nim
04:59:58disruptekwell, he's an irc user and apparently offline.
05:00:08disruptekbut yeah, that works for people that are online.
05:00:30disruptekit works for discord people, too, i'm told.
05:00:34shad0wi'll get goin now. thanks for the time and lovely chat @disruptek.
05:00:41disruptekhave fun.
05:00:52FromDiscord<Elegant Beef> Wow i was here too!
05:02:14disrupteki thought that was bentley's breath i was smelling.
05:02:37FromDiscord<Elegant Beef> Nah that sounds more like dead mouse, i smell like dead rat
05:04:04disruptekhaven't seen any mice since the other night when i had one run across my legs.
05:05:21FromDiscord<Rika> Holy fuck did the real disruptek die or something
05:05:35FromDiscord<Elegant Beef> No Diprustek did
05:05:50FromDiscord<Rika> Never seen him this chill with a newbie before
05:06:00FromDiscord<Elegant Beef> Yea me either, must be a little tipsy
05:06:08*shad0w is now known as shad0ws
05:06:13*shad0ws is now known as shad0w
05:06:17*shad0w is now known as shad0w_
05:09:26*shad0w_ left #nim ("Leave.")
05:09:52*shad0w_ joined #nim
05:11:22*shad0w_ quit (Remote host closed the connection)
05:16:28*waleee-cl quit (Quit: Connection closed for inactivity)
05:31:44*narimiran joined #nim
05:41:38FromDiscord<Avatarfighter> ahah
05:45:03FromDiscord<acek7> do you people ever sleep
05:46:14FromDiscord<Avatarfighter> sometimes
05:50:04FromDiscord<acek7> fiddling around with the fidget and figma thing more
05:50:18FromDiscord<acek7> i exported something from figma
05:50:21PrestigeWe do not sleep
05:50:35FromDiscord<acek7> and it keeps telling me frame was not instantiated
05:50:35PrestigeAvatar lied
05:53:26*solitudesf joined #nim
06:00:10*bouzu_ joined #nim
06:05:00*shad0w_ joined #nim
06:16:11*kinkinkijkin quit (Remote host closed the connection)
06:18:47*PMunch joined #nim
06:21:18*kinkinkijkin joined #nim
06:22:48*Zectbumo quit (Read error: Connection reset by peer)
06:29:44FromDiscord<iWonderAboutTuatara> @dom96 sorry for the tag, is the forum down?
06:30:03FromDiscord<iWonderAboutTuatara> seems to be down, i was told to make a Github issue
06:30:50*konkrrrrrr joined #nim
06:31:21*kinkinkijkin quit (Read error: Connection reset by peer)
06:41:49*konkrrrrrr is now known as kinkinkijkin
06:44:16*PMunch quit (Remote host closed the connection)
06:45:23*PMunch joined #nim
06:55:43*MightyJoe is now known as cyraxjoe
06:59:29*shad0w_ quit (Remote host closed the connection)
06:59:50*shad0w_ joined #nim
07:01:03*shad0w_ left #nim ("Killed buffer")
07:03:11*superbia quit (Ping timeout: 244 seconds)
07:11:16*shad0w_ joined #nim
07:15:44shad0w_just logged in from Emacs, this is so cool : D
07:21:19*lolz343434 joined #nim
07:21:33lolz343434Cool
07:21:47shad0w_: D
07:22:20*lolz343434 quit (Remote host closed the connection)
07:23:07*shad0w_ quit (Remote host closed the connection)
07:23:51*shad0w_ joined #nim
07:25:33*shad0w_ quit (Remote host closed the connection)
07:27:09*shad0w_ joined #nim
07:37:17*shad0w_ quit (Remote host closed the connection)
07:41:16*OldFaithful quit (Remote host closed the connection)
07:41:48*shad0w_ joined #nim
08:00:30voidpi
08:00:37voidpil
08:00:40voidpicreรฑ
08:00:44voidpicrap
08:01:03idfcrenp
08:02:00voidpicrypt?
08:02:49FromDiscord<juan_carlos> cryptocrap?
08:05:18*shad0w_ quit (Remote host closed the connection)
08:06:47*bouzu_ quit (Quit: Leaving)
08:06:50*shad0w_ joined #nim
08:07:18*shad0w_ quit (Remote host closed the connection)
08:09:40*shad0w_ joined #nim
08:13:10*arecacea1 quit (Remote host closed the connection)
08:13:55*arecacea1 joined #nim
08:15:06*fredrikhr joined #nim
08:24:45*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:35:00*newUser joined #nim
08:38:03newUserHi, I have in c++: inp.read( (char *) &Data, sizeof(Data) ) where Data is a struct and want it to program in Nim. My solution is: InputFile.readData(addr(data), sizeof(data)) where InputFile is a FileStream. What is the int which I get back and I get wrong results?
08:39:08newUserinp.read( (char *) &Data, sizeof(Data) ); (Not a smilie)
08:39:28newUserinp.read( (char *) &Data, sizeof(Data) );
08:39:29*kungtotte quit (Read error: Connection reset by peer)
08:40:06FromDiscord<dom96> @iWonderAboutTuatara works for me right now?
08:40:18FromDiscord<iWonderAboutTuatara> Lemme check
08:40:44*kungtotte joined #nim
08:40:48FromDiscord<iWonderAboutTuatara> Back up for me as well
08:40:55FromDiscord<iWonderAboutTuatara> Thanks!
08:41:13FromDiscord<Recruit_main707> inp is a File right? newUser
08:41:16FromDiscord<iWonderAboutTuatara> While I'm here, bit of a stupid question
08:41:19newUseryes
08:41:26FromDiscord<iWonderAboutTuatara> Does Nim support pipe operator or similar?
08:41:40newUserifstream inp
08:42:02FromDiscord<iWonderAboutTuatara> sent a code paste, see https://play.nim-lang.org/#ix=2xwa
08:42:09FromDiscord<iWonderAboutTuatara> (edit) 'https://play.nim-lang.org/#ix=2xwa' => 'https://play.nim-lang.org/#ix=2xwb'
08:42:21FromDiscord<iWonderAboutTuatara> Does Nim have support for a similar thing?
08:42:23FromDiscord<Recruit_main707> and you are reading binary data?
08:42:28FromDiscord<Elegant Beef> cand o the same thing using the `with`
08:42:37FromDiscord<iWonderAboutTuatara> I found a macro that implements a pipe (|>) operator
08:42:38FromDiscord<Elegant Beef> https://nim-lang.org/docs/with.html
08:42:39newUserRecruit_main707: yes
08:42:42FromDiscord<iWonderAboutTuatara> But wondering about default Nim
08:42:52FromDiscord<iWonderAboutTuatara> Oh amazing thanks!
08:43:21FromDiscord<iWonderAboutTuatara> Wow macros are powerful
08:43:59idfyes they are
08:44:25FromDiscord<Elegant Beef> Magic is more accurate ๐Ÿ˜›
08:44:37FromDiscord<Recruit_main707> then i think you want readBuffer
08:44:54FromDiscord<Recruit_main707> https://nim-lang.org/docs/io.html#readBuffer%2CFile%2Cpointer%2CNatural
08:45:29FromDiscord<Recruit_main707> `inp.readBuffer(cast[pointer](addr Data), sizeof(Data)`
08:46:48gmaggioris there a facility to make a reverse lookup on a table (biunivocal), or you have to create a reversed-table?
08:47:48FromDiscord<Elegant Beef> you could iterate over all the entries and find the one with the value, but it makes more sense to have two tables or store the key on the object if possible
08:47:55newUserRecruit_main707: isRead = InputFile.readBuffer(cast[pointer] (addr data), sizeof(data)), but get wrong results
08:48:01FromDiscord<Elegant Beef> Depending on how many times you want to ๐Ÿ˜„
08:48:17newUserRecruit_main707: isRead = 48
08:48:52FromDiscord<Recruit_main707> `Returns the actual number of bytes that have been read which may be less than len (if not as many bytes are remaining), but not greater.`
08:48:58gmaggiorElegant Beef, thanks
08:49:12newUserRecruit_main707: sizeof(data) = 48
08:49:13FromDiscord<Recruit_main707> i its fine
08:50:17newUserfree(): double free detected in tcache 2
08:50:27newUserSIGABRT: Abnormal termination.
08:52:02FromDiscord<Recruit_main707> use this website to show us the whole code snippet plsโ†ตhttps://play.nim-lang.org/
08:54:16*arecacea1 quit (Remote host closed the connection)
08:54:38*arecacea1 joined #nim
08:57:13FromDiscord<Recruit_main707> newUser?
08:57:33newUseryes, searching....
09:00:49*torbencarstens[m quit (Quit: Idle for 30+ days)
09:06:28FromDiscord<Recruit_main707> how is your `data` variable defined?
09:07:38newUsertype Data = object PPM: int RA, Dec: float pmRA, pmDec, mag: float
09:07:56newUserstruct { long PPM; double RA,Dec; float pmRA,pmDec,mag; } Data;
09:08:01FromDiscord<Recruit_main707> but thats the object definition
09:08:37FromDiscord<Recruit_main707> you need something like var myData: Dataโ†ตand pass the pointer to that variable
09:09:08newUservar data: Data
09:09:54FromDiscord<Recruit_main707> just copy the code, paste it in that web, share to ix and send us the url, it will be easier
09:10:56newUserI can't, there is a copy right...
09:11:45FromDiscord<Recruit_main707> no one will be using that code though
09:14:02shad0w_anyone here uses org-mode with nim ?
09:14:07FromDiscord<Recruit_main707> i cant help you without more information
09:14:25newUserkk, thanks.
09:15:06*newUser quit (Remote host closed the connection)
09:15:20*shad0w_ quit (Remote host closed the connection)
09:17:54*Vladar joined #nim
09:21:43FromDiscord<Rika> @iWonderAboutTuatara sorry for late reply ping but why would we need a pipe operator?
09:22:10FromDiscord<iWonderAboutTuatara> If makes things easier
09:22:31FromDiscord<iWonderAboutTuatara> Like let's say I wanted to do some sequence of mutations to a value
09:22:35FromDiscord<Rika> But we already have ufcs
09:22:40FromDiscord<iWonderAboutTuatara> Right
09:22:58FromDiscord<iWonderAboutTuatara> But having it all on 1 line makes it difficulter to read
09:23:10FromDiscord<Rika> You don't need it to be on one line
09:23:26FromDiscord<iWonderAboutTuatara> Yeah you can use the with module
09:23:35FromDiscord<iWonderAboutTuatara> Which is what I was looking for
09:24:47FromDiscord<Rika> https://play.nim-lang.org/#ix=2xwm
09:25:11FromDiscord<Rika> Or you can just do the exact thing D does
09:25:40FromDiscord<iWonderAboutTuatara> Oh
09:25:44FromDiscord<iWonderAboutTuatara> That's really good
09:25:52FromDiscord<iWonderAboutTuatara> That is exactly what I wanted
09:26:09FromDiscord<iWonderAboutTuatara> Even better than an import actually
09:39:16*Tanger quit (Quit: Leaving)
09:42:24Araqthese long pipes only work when you never have to debug your code
09:46:22*fowl quit (Ping timeout: 244 seconds)
09:47:25*fowl joined #nim
09:49:50Araqnoooooooooooooooooooooooooooo
09:49:57Araqfound the bug... omg
09:50:29Araqso stupid...
09:51:07Araqor maybe not...
09:52:43Araqyep, found it
09:55:31FromDiscord<dk> does `{.nimcall.}` do anything on the js backend?
09:55:37FromDiscord<dk> dom module uses it
09:56:32Araqit prevents closures
09:56:45Araqnot really important for JS
10:06:00*noonien joined #nim
10:15:22FromDiscord<Clyybber> Araq: What bug?
10:15:46narimiranprobably #15076
10:15:47disbot12https://github.com/nim-lang/Nim/issues/15076 -- 3Memory leaks with async (closure iterators?) under ORC ; snippet at 12https://play.nim-lang.org/#ix=2snX
10:16:12FromDiscord<Clyybber> \o/
10:24:24Araqthe leak remains though
10:24:32Araqat leat the corruption is gone
10:24:34*newUser joined #nim
10:25:36newUserRecruit_main707: thank you very much. I found many bugs. Your solution works too without pointer: isRead = InputFile.readBuffer((addr data), sizeof(data))
10:26:30newUserRecruit_main707: and must modify the types: type Data = object PPM: int32 RA: float Dec: float pmRA: float32 pmDec: float32 mag: float32
10:30:37*abm joined #nim
10:30:54newUserRecruit_main707: and the error(s) I got from closed InputFile at the end and I declared at top defer: InputFile.close()
10:34:10*Tanger joined #nim
10:35:04FromDiscord<mratsim> what's the state of incremental compilation? Especially w.r.t. generics, typeof and static? I have a feeling that generic serialization libraries are slower than usual Nim programs
10:35:23FromDiscord<Clyybber> disruptek is working on it
10:35:25FromGitter<alehander92> ok back online
10:35:34FromDiscord<Clyybber> but so far backend stuff mostly afaict
10:52:02*newUser quit (Remote host closed the connection)
10:57:35PMunchHmm, how do you wrap something that takes a `const char*` argument?
10:58:16FromDiscord<Recruit_main707> i think you ignore the const, but idk
11:01:03FromDiscord<Recruit_main707> for example. `glVertexAttribPointer` wants a `const GLvoid * pointer`, this is wrapped as `..., pointer: pointer` and it works
11:05:25*krux02 joined #nim
11:10:15*NimBot joined #nim
11:11:59FromDiscord<Recruit_main707> GLvoid == void btw
11:15:37PMunchI just had to chuck in nodecl and it works
11:27:33FromDiscord<lqdev> PMunch: i always just ignore the const
11:27:51PMunchYeah I was just having issues with conflicting types from the C compiler
11:27:54FromDiscord<lqdev> worked for me for opengl, but might not work for C wrappers
11:53:31*letto quit (Quit: Konversation terminated!)
11:54:26*letto joined #nim
12:00:48*solitudesf quit (Read error: Connection reset by peer)
12:01:52*solitudesf joined #nim
12:03:55*agent0x00 joined #nim
12:05:06*shad0w_ joined #nim
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:34*supakeen joined #nim
12:07:18*shad0w_ quit (Remote host closed the connection)
12:08:20*rockcavera joined #nim
12:20:10*waleee-cl joined #nim
12:29:53*arecacea1 quit (Remote host closed the connection)
12:31:42*arecacea1 joined #nim
12:39:43*shad0w_ joined #nim
12:46:40*superbia joined #nim
12:50:35*agent0x00 quit (Quit: WeeChat 1.9.1)
12:56:15alehander92Araq the empty root thing
12:56:30alehander92seems better otherwise need to check everywhere for index != emptySetIndex
13:12:27*Tanger quit (Quit: Leaving)
13:21:27*noonien quit (Quit: Connection closed for inactivity)
13:21:57*vicfred joined #nim
14:01:49*PMunch quit (Quit: Leaving)
14:17:28*endragor_ quit (Remote host closed the connection)
14:17:55*endragor joined #nim
14:22:21*endragor quit (Ping timeout: 244 seconds)
14:28:26*lritter joined #nim
14:48:04FromDiscord<neow> hello
14:48:26FromDiscord<neow> is there a way to list a directories' contents? :'D
14:49:01FromDiscord<neow> neither the os nor the io libraries seem to contain one, as I've read the proc list of both in the reference
14:49:11FromDiscord<neow> am I missing something?
14:49:28*waleee-cl quit (Quit: Connection closed for inactivity)
14:49:35PrestigeI think walkDir iirc
14:49:55Prestigeidk if there's a way just to get an array of names
14:50:04alehander92toSeq
14:50:11alehander92iirc
14:50:39FromDiscord<neow> iterator works just fine, thank you
14:50:45*endragor joined #nim
14:54:13*endragor quit (Remote host closed the connection)
14:54:20*endragor joined #nim
14:57:18FromDiscord<kodkuce> should building nim on arm take long?
14:58:38FromGitter<mratsim> Depends on your machine, in Travis it takes the same time as x86 for my libraries (Weave or Constantine) but it takes ages on Raspberry / Phone
14:59:34FromDiscord<Clyybber> @mratsim Do you know what the conclusion was on the weave vs rayon benchmarks?
14:59:37*narimiran quit (Ping timeout: 264 seconds)
14:59:49FromGitter<mratsim> There is no hardware advantage/disadvantage to ARM for a compiler, it's mostly loop, recursion and branches
15:00:07FromGitter<mratsim> so it's mostly frequency that explain slowness/speed
15:00:08*endragor quit (Remote host closed the connection)
15:00:24*hnOsmium0001 joined #nim
15:00:47*endragor joined #nim
15:05:03disruptekmratsim: are you saying you need IC for phone compilation?
15:05:17disruptekhow can i test the performance improvement?
15:05:40FromDiscord<kodkuce> define ages :) , anyway when it finish all build goes to /bin right
15:05:41*endragor quit (Ping timeout: 256 seconds)
15:05:45FromDiscord<kodkuce> i can delete rest stuff
15:06:15disruptekAraq, clyybber: i really need help on this mangling thing.
15:07:24FromDiscord<Clyybber> tell me
15:07:43FromDiscord<Clyybber> the problems you are encountering
15:07:55FromDiscord<kodkuce> i am kinda running arm qemu, i think its running broken i have some error with modloop, but worst thing i did not run it whit tcg-multithread
15:07:56FromDiscord<Clyybber> you solved the TaintedString thing right?
15:08:00disruptekno.
15:08:19disruptekit passes on linux but not on osx. because TaintedString.
15:08:25FromDiscord<Clyybber> huh
15:08:31disruptekwhich also breaks cpp signatures.
15:08:35FromDiscord<Clyybber> why would that be arch dependent?
15:08:35FromDiscord<Clyybber> ah
15:08:46FromDiscord<Clyybber> so what about TaintedString?
15:08:59FromDiscord<Clyybber> TaintedString is not special, its just a distinct type
15:09:21disruptekif you're satisfied with that, then i'm satisfied with that.
15:09:28disrupteksadly, i don't think osx users will be happy.
15:09:32FromDiscord<Clyybber> how does current mangling do it? Does TaintedString end up as string in the C ?
15:10:26FromDiscord<Clyybber> disruptek: I didn't quite understand the problem last time I think
15:10:28disruptekmangling uses the symbol name, what else, so add() turns into add_seqTaintedString_system(seqTaintedString *someseq, TaintedString *somes)
15:10:35FromDiscord<Clyybber> Ok
15:10:52FromDiscord<Clyybber> And why does that cause problems?
15:11:05disruptekbecause only seqString is defined.
15:11:07disruptekor vice-versa.
15:11:15disrupteki do have a linux repro using testutils.
15:11:28FromDiscord<Clyybber> seqString?
15:11:37disrupteknim cpp -f -r ntu test tests -- from inside the testutils repo.
15:11:39FromDiscord<Clyybber> Ah
15:11:59FromDiscord<Clyybber> Hmm, what does current mangling do then?
15:12:11disruptekmangling collapses some types now so that shortening works better for 1st-param-of-proc heuristic.
15:12:31disruptek/home/adavidoff/.cache/nim/ntu_d/@[email protected]:@[email protected]:function processArguments_testutils_config(TestConfig_testutils_config*): error: undefined reference to 'add_system(seqString_system*&, NimStringDesc**, long)'
15:12:36FromDiscord<Clyybber> I mean current mangling as in the one thats used in devel
15:12:53disruptekcurrent mangling just uses type_hash everywhere.
15:13:07FromDiscord<Clyybber> Yeah, but what about the name
15:13:24FromDiscord<Clyybber> is it add(seqString) or add(seqTaintedString) in the old mangling?
15:13:53disrupteklemme see exactly what it is...
15:15:32disruptekit's add__garbage -- a hash of the add proc, of course, followed by tySeq___garbage -- the hash of the sequence type.
15:15:52FromDiscord<Delta231> are nim strings mutable?
15:16:27Zevvyes
15:17:28FromDiscord<Delta231> but why?
15:17:39FromDiscord<Delta231> aren't immutable strings better for performance?
15:23:16Zevvnope
15:23:24Zevvwhat makes you think that?
15:23:55alehander92disruptek
15:25:19Zevvdisruptek is always putting wrong ideas in peoples minds
15:25:23Zevvwe all know that
15:25:46ZevvDelta231: basically, a string is a string, but "performance" is a wide subject.
15:26:05ZevvIf you have a 100Mb string and you want to add one line. What do you think is faster? Mutable or unmutable strings?
15:26:19alehander92sorry I lied
15:26:27alehander92i wanted to talk to disruptek
15:26:34alehander92not to answer zevv's question
15:27:05FromGitter<mratsim> @disruptek not only phones, nim-beacon-chain compile times start to get really long
15:29:16FromDiscord<kodkuce> does forewer mean like forewer cuz i think half hour passed
15:30:04FromDiscord<Delta231> https://stackoverflow.com/questions/8680080/why-are-python-strings-immutable-best-practices-for-using-them
15:31:01alehander92kodkuce what are you compiling
15:31:06FromGitter<mratsim> Forever depends on your codebase size.
15:31:17FromGitter<mratsim> Not Chrome-forever
15:31:25FromDiscord<Delta231> https://docs.python.org/3/faq/design.html#why-are-python-strings-immutable
15:32:17ZevvDelta231: Right. It does not talk about performance there. It talks about making programming easier
15:32:23Zevvbecause your strings don't change under your hands
15:33:22FromGitter<mratsim> I don't see any conclusive evidence to why immutable strings in those links
15:33:30FromDiscord<Delta231> `One is performance: knowing that a string is immutable means we can allocate space for it at creation time, and the storage requirements are fixed and unchanging. `
15:33:37FromDiscord<Delta231> thread safety etc
15:33:51FromGitter<mratsim> what immutable strings is strong at is ownership and multithreading. Something Python doesn't require
15:34:24FromGitter<mratsim> Also their claim about speed has a hidden assumption on a garbage collector
15:35:10FromGitter<mratsim> In low-level language you have to be able to mutate a string for speed because you don't have a garbage collector to handle frequent alloc/dealloc
15:36:12FromDiscord<Clyybber> disruptek: I think we should solve this by generating "wrapper procs" for distinct types
15:36:17*reversem3 joined #nim
15:36:44FromDiscord<Clyybber> no wait
15:36:46FromDiscord<kodkuce> @alehander42 nim on quemu arm64
15:37:10FromDiscord<Clyybber> disruptek: Why not just generate casts?
15:37:21FromDiscord<Clyybber> and if they are the same type just leave them out
15:37:25FromDiscord<kodkuce> gcc -w -O3 -fno-strict-aliasing -fno-ident -Ic_code -c c_code/2_2/@mdocgen.nim.c -o c_code/2_2/@mdocgen.nim.o << just reached here
15:37:36FromGitter<mratsim> In any low-level parser it's the temporary allocations that causes 80% of the slowdown when you implement in a naive way. Something that happens in C, C++, Rust, Nim, Swift but not in Python, Java or Javascript
15:38:32FromDiscord<Clyybber> disruptek: If add_seqTaintedString is generated seqTaintedString should be defined
15:38:53FromGitter<mratsim> side note even though Nim and swift have a GC it's reference counting based with no implicit pool so it behaves more like no GC regarding cost of alloc
15:39:14reversem3If I wanted to create a personal database with all my notes and commands , what would be the best way to create that?
15:41:49FromDiscord<haxscramper> There is a sqlite db in the stdlib, try to start with this one (if you don't have really deep document hierarchy & use tags often). Maybe you wound want to use something like xapian for full-text search. There is no bindings for it as of now, but it should be possible wrap it if necessary.
15:42:24FromDiscord<haxscramper> And of course good old solution with plaintext files + some helper CLI tool to quickly search for things is also a viable option
15:42:25FromDiscord<kodkuce> it finished yey
15:44:39FromDiscord<kodkuce> only bad thing i did not get nimble form what i see
15:45:42reversem3what about a UI , I love command line but maybe better to learn a UI library also
15:48:46FromDiscord<haxscramper> I don't really write a lot of gui applications, but there are wrappers for gtk: https://github.com/StefanSalewski/gintro and also https://github.com/treeform/fidget
15:50:11*Cthalupa quit (Ping timeout: 244 seconds)
15:50:18reversem3yeah I looked at fidget and really like it, but its still pretty early and not everything works without tweaks , which is fine. Do you know what gui lib has the most documentation?
15:52:22reversem3I though there was supposed to be a nim gui lib with the stdlib , is that not a thing anymore?
15:52:38FromDiscord<haxscramper> Yes, there was one - bindings for IUP
15:53:18FromDiscord<kodkuce> omg i acidencly ctrl c and closed qemu-alpine now i have to w8 again
15:53:38FromDiscord<haxscramper> About documentation - most likely gintro, but I don't really know actually
15:54:06FromDiscord<Clyybber> disruptek ping
15:55:34disruptekclyybber: sorry, red-head showed up. girls always trump code.
15:59:33disruptekit's a generics problem afaik, but the question is why taintedstring is so variable.
15:59:41FromDiscord<Clyybber> lol
16:00:24FromDiscord<Clyybber> disruptek: IMO the solution is either to resolve to the typename of the distinct base or to generate the appropriate aliases
16:00:27FromDiscord<Clyybber> I prefer the latter
16:00:27disruptekthe problem with cpp signatures would be nice to solve, if possible.
16:00:38FromDiscord<Clyybber> Whats the problem there again?
16:00:53disruptekcpp embeds the type of the first argument in the symbol.
16:01:31*femtotones joined #nim
16:01:37FromDiscord<Clyybber> yeah, but whats the problem
16:01:37disruptekwhen you have anonymous types like procs and tuples, the only way to match them to code in a different file is for them to agree on their name.
16:01:48disruptekthe only way to do that (currently) is to hash them.
16:01:58FromDiscord<Clyybber> ok
16:01:59disruptekthe best idea i could come up with is a global registry.
16:02:06disrupteki kinda hate it, though.
16:02:17FromDiscord<Clyybber> why would they not match when not hasing?
16:02:20disruptekso currently, procs and tuples are just hashed.
16:02:22FromDiscord<Clyybber> because we prepend the module name?
16:02:44disruptekbecause proc types can be different due to flags and whatnot.
16:02:57FromDiscord<Clyybber> well if they are different they shouldn't match?
16:03:22FromDiscord<Clyybber> flags that don't influence the equality shouldn't influence the signature probably
16:03:28disruptekyour logic makes sense but it doesn't match my reality.
16:03:43FromDiscord<Clyybber> the question is why it doesn't match the reality
16:03:57Zevv /his/ reality
16:04:13disruptekgood evening, zevv
16:04:42FromDiscord<Clyybber> sup zevv
16:05:14Zevvnot much. I'm soo done already for the day
16:05:16FromDiscord<Clyybber> zevvs part of my gangg amiritte?
16:05:34Zevvsure, I'll be you groupie
16:05:38disruptekclyybber: you have some work to do if you wanna stay in the gang.
16:05:43FromDiscord<Clyybber> senseless double letter gang
16:05:58FromDiscord<Clyybber> lets work /
16:06:08FromDiscord<Clyybber> why does it not match your reality
16:06:19disruptekwell, we can enable it and see what happens, if you want.
16:06:37disruptekbut i'd rather fix this tainted bug first.
16:06:47disrupteklet me also enumerate the other bugs i know about:
16:07:10FromDiscord<Clyybber> ok lets do the distinct type bug first
16:07:15disruptekthere's an extra line of output in an exception result which is, i'm pretty sure, a test issue with my local binary. so let's ignore that for now.
16:07:36disruptekthere's a visibility test bug that i need to talk to leorize about because i kinda understand what's happening but i don't understand the solution.
16:07:59disruptekit's not a distinct type bug. it's specifically taintedstring.
16:08:06FromDiscord<Clyybber> what
16:08:09FromDiscord<Clyybber> that doesn't make sense
16:08:19disruptekwelcome to /my/ reality.
16:08:20FromDiscord<Clyybber> taintedstring is not magic
16:08:34FromDiscord<Clyybber> nah nah, you paint your reality as you see fit :p
16:08:45FromDiscord<Clyybber> the reality theres something broken about all distinct types
16:08:51disrupteklook, do you think distincts have something to do with platform?
16:09:05disruptekis that an easier truth to add to your reality?
16:09:20disruptekbecause, y'know, the package tests *ALL* pass on linux.
16:09:22FromDiscord<Clyybber> nope, but probably the CI compiles with taintedstring mode or something
16:09:26FromDiscord<Clyybber> but only on one platform
16:09:45disruptekso you think that all the other uses of distinct are somehow fine.
16:09:52disruptekthat's a miracle, right?
16:10:04disruptekarraymancer, chronos, all fine.
16:10:14FromDiscord<Clyybber> so it is, nobody uses tainted string mode
16:10:29disruptekwhat?
16:10:54FromDiscord<Clyybber> what what?
16:10:55disrupteki can't tell if you're conceding the point wisely or stubbornly disagreeing.
16:11:58disruptekyou can see in the mac test output that, for example, environment stuff doesn't work due to type name mismatches.
16:12:04disruptekclearly a taint mode thing.
16:12:28FromDiscord<Clyybber> yeah, my suspicion is that taint mode is only tested on mac
16:12:31FromDiscord<Clyybber> but I didn't check
16:12:42disrupteki looked and i couldn't figure it out.
16:13:03disrupteki thought it might be clang-based but my test was negative.
16:14:13FromDiscord<Clyybber> so you can't repro the bug even with --taintMode:on ?
16:14:28disrupteki can repro it in testutils locally /without/ taint mode.
16:14:38FromDiscord<Clyybber> whats testutils
16:14:44disruptek!repo testutils
16:14:45disbot12https://github.com/status-im/nim-testutils -- 9nim-testutils: 11testrunner et al 15 8โญ 3๐Ÿด 7& 1 more...
16:14:54FromDiscord<Clyybber> ah
16:14:58disruptekit's the test framework i pulled out of chronicles for status.
16:15:05FromDiscord<Clyybber> Hmm, and whats the mac CI using?
16:15:08FromDiscord<Clyybber> taintmode or nah?
16:15:18disrupteki could find no evidence of any explicit setting.
16:15:22FromDiscord<Clyybber> its probably some IO code thats behind defined(osx)
16:15:30FromDiscord<Clyybber> which causes the bug
16:16:09FromDiscord<Clyybber> you can try -d:osx or whatever it is that one needs
16:16:26disrupteki can repro it in testutils with g++ on linux.
16:16:37disruptekno taint options.
16:16:44FromDiscord<Clyybber> Yeah, I get that
16:16:46*leorize joined #nim
16:16:58FromDiscord<Clyybber> well it doesn't matter which one we minimize
16:17:13FromDiscord<Clyybber> either you minimze the code thats behind defined(osx) or the testutils code
16:17:24leorizeo/
16:17:29FromDiscord<Clyybber> o/
16:17:37disruptekdude.
16:18:47leorizeso what is this issue that you wanna talk to me about?
16:18:53FromGitter<mratsim> constantine is distinct all the way down: https://github.com/mratsim/constantine/blob/master/constantine/primitives/constant_time_types.nim#L12
16:19:08FromGitter<mratsim> Also for some reason distinct uint64 are broken in the VM
16:19:24disruptekvisibility test failing due to exported_thr undefined. it has to do with detecting the wrong size of NimThreadVars and thus copying an insufficient amount of memory.
16:19:33FromGitter<mratsim> when you do a function call with them, their value magically changes
16:19:45FromDiscord<Clyybber> mratsim: weird, can you report it?
16:20:01FromDiscord<Clyybber> disruptek: so?
16:20:09FromGitter<mratsim> I think it's already reported, let me check
16:20:14FromDiscord<Clyybber> ah ok
16:20:20disruptekso?
16:20:30FromDiscord<Clyybber> taintedstring
16:20:40leorizedisruptek: where can I find the error?
16:20:54disruptekleorize: should be in the nim test suite under my mangling tests.
16:20:59disruptek!pull author:disruptek mangling
16:21:00disbot12https://github.com/nim-lang/Nim/pull/14632 -- 3porting name mangling from ic effort
16:21:05leorizeand copying insufficent amount of memory shouldn't be a problem...
16:21:17leorizeexporting just means that the variable is marked for export
16:21:24disruptekwell, that was my naive interpretation. this is where you come in.
16:21:50disrupteki actually thought it was fixed and maybe it actually works fine in ci, but it fails for me locally.
16:22:34disruptekiirc it's because the threadvars go into a special struct and get copied out later, but we target the wrong symbol, so we get the size wrong.
16:23:21reversem3sweet "blog" works now with prologue , thanks @xflywind
16:23:36leorize[m]disruptek: ci is passing for linux on that test...
16:23:57FromGitter<mratsim> actually it's not, I had 3 or so different distinct issues in the VM while writing this file, I just gave up investigating I was losing a lot of time: https://github.com/mratsim/constantine/blob/master/constantine/config/precompute.nim#L28
16:24:01disruptekclyybber: the seq is defined as seq[string] in testutils. indeed, the code generated is seq[string]. but system defines TaintedString.
16:24:18disruptekleorize[m]: okay, ty for looking. we'll assume it's fixed until proven otherwise.
16:24:35leorize[m]if you can reproduce it locally then I'll test that on my machine later
16:26:01disruptekclyybber: it's because the option parser from stdlib results in TaintedString.
16:26:03FromDiscord<Clyybber> disruptek: Yeah. lets minimize it first, You can repro it with testutils independent of the C compiler, right?
16:26:11disruptekyes.
16:26:12FromDiscord<Clyybber> disruptek: Aha!
16:26:19leorizedisruptek: are you going to document how the mangling is done in the manual later?
16:26:28disruptekleorize: just tell me where.
16:26:43disruptekit's fairly complex, though i can simplify the description.
16:26:47FromDiscord<Clyybber> I would document that in internals
16:26:57FromDiscord<Clyybber> instead of the manual
16:26:57leorizenah, it should be a part of the spec
16:27:04leorizeso that interop can be done reliably
16:27:12disrupteki dunno about that.
16:27:15FromDiscord<Clyybber> IMO it shouldn't be part of the spec
16:27:20disruptekagree.
16:27:20FromDiscord<Clyybber> if you want interop you should exportc
16:27:24disruptekexactly.
16:27:42leorize`$1` in exportc is the problem
16:27:49disruptekthis stuff is highly unreliable, even if it's more reliable than it was.
16:27:55disruptekwe'd need an RFC to spec it.
16:28:19leorize$1 resolves to the "mangled" symbol iirc
16:28:31reversem3do we always have to have a dbconnect when using db_postrgres for databases ? ,
16:28:41leorizeit's used in the stdlib for nimrtl
16:28:49disruptek$1 is cheap-mangle; basically, making sure it's a valid identifier.
16:28:59disruptekmangle(s: string): string
16:28:59reversem3I'm looking at this for a reference https://nim-lang.org/docs/db_postgres.html
16:29:08FromDiscord<Clyybber> nimrtl should be gone with arc
16:29:20disruptekleorize: afaik anyway.
16:29:32leorize@Clyybber nope it won't
16:30:09leorizewe still have the allocator in there
16:30:24*shad0w_ quit (Remote host closed the connection)
16:30:52FromDiscord<Clyybber> yeah, but we don't need the nimrtl pragma
16:31:10leorize?
16:31:12FromDiscord<Clyybber> but its not related to interop with C anyways
16:31:27leorizeit's useful for code sharing between nim libraries
16:32:26leorizebuild several .so and have them linked to libnimrtl is much more economical than duplicating the stdlib in the memory several times
16:32:46FromDiscord<Clyybber> LTO should accomplish the same thing
16:32:58FromDiscord<Clyybber> unless you are dynamically linking
16:33:10leorizeI'm talking about the use case for plugins
16:33:23FromDiscord<Clyybber> Ok, but how is any of that related to mangling?
16:33:38disruptekit's not.
16:34:02leorizeso we can have a common mangling for linking with nimrtl
16:34:20leorizewell it's not urgent in anyway to spec this out since there's only one nim compiler
16:34:24FromDiscord<Clyybber> yeah
16:34:47disruptekyou're arguing for a spec that won't change between compiler versions, though.
16:35:07disruptekthe current mangler cannot achieve this, btw.
16:35:57FromDiscord<Clyybber> disruptek: and? Got it down to something small and explosive?
16:36:11disruptekno.
16:36:20disrupteki'm trying to understand how this is a thing.
16:36:42disruptekthere's no need to minimize it, afaik.
16:36:58FromDiscord<Clyybber> if you think so
16:37:08FromDiscord<Clyybber> IMO its always much easier to work with something minimized
16:38:02FromDiscord<Clyybber> and minimizing isn't something that requires a lot of brainpower so you can do something else in that time
16:38:16disruptekwhat do you suggest?
16:38:40*leorize quit (Quit: WeeChat 2.8)
16:39:56disruptekhere's the problem: /home/adavidoff/.cache/nim/ntu_d/stdlib_system.nim.cpp:N_LIB_PRIVATE N_NIMCALL(void, add_seqString_system)(seqTaintedString_system/*4960236*/*& x, NimStringDesc** y, NI yLen_0)
16:41:02disruptekthe call is to add_seqString (although it's nominally tainted string) which c is fine with, because whatever. but cpp fails because the type name differs, changing the signature and causing a link error.
16:41:14disruptekie. the type name of the first argument.
16:41:26*endragor joined #nim
16:42:51*Trustable joined #nim
16:43:38disrupteki guess it might be a nim bug; shouldn't we be defining this generic?
16:44:12disruptekor should we make testutils cast this value?
16:44:28FromDiscord<Clyybber> no need to cast if TaintedString = string
16:44:31disruptekor should we make testutils convert this value?
16:44:49FromDiscord<Clyybber> not either. This is a nim bug
16:44:56*leorize joined #nim
16:46:00FromDiscord<Clyybber> also why is it add_seqString_system)(seqTaintedString
16:46:04FromDiscord<Clyybber> shouldn't these names match?
16:46:19disruptekthe type of the seq is seq[string]
16:46:40FromDiscord<Clyybber> no its seq[TaintedString] ?
16:47:13FromDiscord<Clyybber> I mean clearly the first arg is seqTaintedString
16:47:28FromDiscord<Clyybber> but its not when appended to the proc signature
16:47:29disruptekyes, but the seq is actually seq[string].
16:47:43FromDiscord<Clyybber> Yes, but why skip distincts when appending it to the signature
16:47:50FromDiscord<Clyybber> to the proc name I mean
16:48:27disruptekwe should be mangling them the same in any event.
16:48:32FromDiscord<Clyybber> yeah
16:48:53*endragor quit (Remote host closed the connection)
16:49:20*endragor joined #nim
16:49:57disrupteklemme not skip distincts and see what changes.
16:50:37disruptekbecause of the way codegen works, we encounter params twice. the first time, we do a naive mangle. the second time, we do a proper mangle. in theory.
16:51:01disruptekmaybe the problem is that the proper mangle of the 1st param needs to remangle the proc name, too.
16:52:41*cyraxjoe quit (Quit: I'm out!)
16:54:42*solitudesf quit (Remote host closed the connection)
16:54:44disruptekthat's a pretty good theory.
16:54:49*endragor quit (Ping timeout: 264 seconds)
16:55:27*cyraxjoe joined #nim
17:08:09FromDiscord<whisperdev> Is there an obvious way how one could protect the nim binary from being identified as Nim program?
17:08:59FromDiscord<ShalokShalom> Code obfuscation?
17:09:30FromDiscord<whisperdev> would a C obfuscator work on a Nim c source file(s)?
17:10:27leorizewhat would be the use case for obfuscation though?
17:11:09leorizeand I don't see why a C obfuscator wouldn't work, but it's not something I've tried
17:12:05FromDiscord<whisperdev> I dont have a clear use case but I imagine you could identify the patterns even from an obfuscated Nim->C code.
17:13:20leorizeif you try hard enough you can infer anything
17:14:12FromDiscord<Clyybber> disruptek: any progress?
17:16:13disruptekmoving some param mangling around.
17:19:58FromDiscord<Clyybber> disruptek: Unrelated, but have a good name for a uint type without wraparound semantics?
17:20:06FromDiscord<Clyybber> I'm thinking suint or something
17:20:41FromDiscord<lqdev> @whisperdev what would be the use case? why would you want to protect the binary like that, what's the point?
17:20:56disruptekclyybber: seems like what we want.
17:21:42disruptekthis mangle change isn't working yet, though.
17:21:50FromDiscord<Clyybber> why?
17:22:05disruptekwe're mangling the proc too early.
17:22:11disruptekwe're mangling the proc name too early.
17:22:31FromDiscord<Clyybber> so mangle the proc name twice?
17:22:31disruptekoh maybe i'm wrong.
17:23:20leorize@lqdev usually used as a deterrent for hooking into the program (it never actually work for that), I think MMOs usually do something like that to resist hacks
17:23:35leorizeother than that I'm not aware of any useful uses for it
17:23:55FromDiscord<lqdev> resisting hacks is not a good solution tho
17:24:46disruptekclyybber: mangling twice is hard because once you surrender the name, the counters are wrong.
17:25:08disruptekyou really just want to reuse the symbol name once you've mangled it.
17:26:51*waleee-cl joined #nim
17:27:54FromGitter<eagledot> I am using *Channel* to share data b/w threads, but data producing thread in much faster than consuming one,but i couldnot find a function to check the length/size of channel to limit the maximum size ,is there any way that allows me to find the length/size of channel?
17:29:55FromDiscord<lqdev> you can `open` with the `maxItems` param, but there isn't a way of checking that after the channel is open.
17:29:57FromDiscord<lqdev> PRs welcome
17:30:30FromDiscord<Clyybber> disruptek: Ah, makes sense
17:30:56FromDiscord<whisperdev> @lqdev to protect against `strings`
17:31:03disrupteki tell you, i'm so tired of this code.
17:31:45FromDiscord<lqdev> @whisperdev i see. then you're in a bit of a pickle, as all the exception messages are shown there
17:31:54FromDiscord<lqdev> and afaik there's no easy way of getting rid of them
17:32:18*endragor joined #nim
17:32:38FromDiscord<whisperdev> Is there a switch that can remove exceptions?
17:33:30FromDiscord<whisperdev> I mean unhandled exceptions
17:33:39disruptekgah i'm dumb.
17:33:50FromDiscord<lqdev> well, nim already has dead code elimination
17:33:58disruptekso that's where all my code went.
17:34:01FromDiscord<lqdev> but a lot of procs can raise
17:34:09FromDiscord<lqdev> even opening a file
17:34:09FromDiscord<whisperdev> disruptek I thought you are the wonder boy of this channel
17:34:17disruptekthe wut
17:34:24FromDiscord<whisperdev> the wonder boy
17:34:27FromDiscord<whisperdev> the wonder man?
17:34:34FromDiscord<whisperdev> Do you identify as a male?
17:34:45disrupteki think you're confusing me with someone else.
17:35:06FromDiscord<whisperdev> ZEVV?
17:35:43FromDiscord<kodkuce> omg noooooooooo
17:35:44FromDiscord<kodkuce> rror: unhandled exception: errno: 28 `No space left on device` [IOError]
17:36:13FromDiscord<whisperdev> How does Nim output work? If it compiles does it mean it will work?
17:36:27FromDiscord<lqdev> in most cases
17:36:30Zevvzupp
17:36:37FromDiscord<lqdev> it can raise at runtime
17:36:42ZevvZUPP!
17:36:42FromDiscord<whisperdev> If I can compile on Sparc/Solaris will it work?
17:36:53*endragor quit (Ping timeout: 260 seconds)
17:36:55disruptekZevv: you are the wunderkind.
17:36:55FromDiscord<lqdev> Zevv: ZUCC
17:36:55*gmaggior quit (Ping timeout: 246 seconds)
17:37:18FromDiscord<whisperdev> wunderjunge
17:37:18FromDiscord<lqdev> @whisperdev i wouldn't be so sure, you better check at least once
17:37:27Zevvverified
17:37:32FromDiscord<lqdev> after all, some C library you're wrapping might not have solaris support
17:37:35Zevvthe latter half
17:37:58FromDiscord<whisperdev> But the STD could work?
17:38:17disruptekSTDs usually work against me.
17:38:22disruptekymmv
17:39:29FromDiscord<lqdev> @whisperdev if i were you i wouldn't really _trust_ the stdlib to support obscure backends like that
17:39:35FromDiscord<lqdev> :s/backends/OSs
17:39:58FromDiscord<whisperdev> So are you telling me the battle tested perl is still the king?
17:40:07FromDiscord<lqdev> maybe.
17:40:15FromDiscord<lqdev> no clue, haven't used perl.
17:40:15Zevvalways will be
17:40:40FromDiscord<whisperdev> I thought Nim generates very dummy C code that "could work anywhere"
17:40:46*Jesin quit (Quit: Leaving)
17:40:47FromDiscord<lqdev> it's actually platform-specific
17:40:55FromDiscord<lqdev> due to conditional compilation and stuff
17:41:04FromDiscord<whisperdev> That's...bad.
17:41:17FromDiscord<Recruit_main707> there are cross compilation options
17:41:21FromDiscord<Recruit_main707> in the nim compiler
17:41:21FromDiscord<lqdev> so you can't just compile code generated for windows eg. to a linux ELF and expect it to work
17:41:34FromDiscord<lqdev> but keep in mind that C is just the IR
17:41:52FromDiscord<lqdev> so you can still cross-compile
17:41:55FromDiscord<whisperdev> I am thinking very basic stuff not something that is using "platform specific" code
17:42:02FromDiscord<lqdev> wdym basic stuff?
17:42:03disruptekwhisperdev: it'll be fine.
17:42:08disrupteksolaris/sparc is not obscure.
17:42:12FromDiscord<whisperdev> IO
17:42:22FromDiscord<lqdev> even something as basic as enumerating files in a directory is OS-specific
17:42:34FromDiscord<whisperdev> Is not that glibc specific?
17:42:40FromDiscord<lqdev> but IO is handled by libc, so _theoretically_, _just maybe_ it could work
17:42:49FromDiscord<lqdev> i haven't tried
17:42:55disruptekit'll be fine.
17:43:15FromDiscord<lqdev> because you don't expect the generated C to be portable. keep in mind you're compiling Nim, not C
17:43:22FromDiscord<whisperdev> Hmmm
17:43:34FromDiscord<lqdev> would you expect an arm binary to run on x86? no.
17:43:37reversem3trying to upgrade to inim 6.0 http://pastebin.ws/1gop33
17:43:42FromDiscord<whisperdev> @lqed
17:44:01FromDiscord<whisperdev> I would expect hello world C code to compile fine on x86 and arm just fine
17:44:15reversem3I have tried with devel and stable both error out when trying to upgrade inim
17:44:17*Jesin joined #nim
17:44:32Zevvwhisperdev: fair enough, I think you could expect that
17:44:32FromDiscord<lqdev> but you're not invoking the C compiler yourself
17:44:36Zevvdoesnt it?
17:44:43FromDiscord<lqdev> nim invokes it for you
17:44:50FromDiscord<lqdev> so the C code shouldn't really worry you
17:44:53*femtotones quit (Ping timeout: 244 seconds)
17:45:04FromDiscord<lqdev> just use a compiler switch to change the architecture
17:45:12FromDiscord<lqdev> and the configs will handle everything
17:45:35FromDiscord<whisperdev> But yes you have a point. There are no guarantees. Especially when we are talking about io/network stuff
17:45:53FromDiscord<lqdev> a hello world would likely work though
17:46:35FromDiscord<lqdev> but i'm not really sure why you'd want to compile and link all the generated C yourself
17:46:58FromDiscord<Recruit_main707> there was also os:any
17:47:08FromDiscord<Recruit_main707> but im not sure whats its state
17:47:13FromDiscord<whisperdev> But I would expect whatever is supported by eg glibc would work
17:47:51FromDiscord<lqdev> you can always try yourself and see
17:49:44FromDiscord<whisperdev> What's the story with static binaries?
17:49:49FromDiscord<whisperdev> Do we still have to resort to musl?
17:49:50disruptekthey are delicious.
17:50:02FromDiscord<whisperdev> And is not that slow?
17:50:22FromDiscord<lqdev> nim depends on having libc, so yes you have to use musl for the time being
17:50:39FromDiscord<lqdev> or some other lightweight, statically-linkable libc
17:50:41*gmaggior joined #nim
17:50:50Zevv~os:any is just fine
17:50:51disbot9os:any: 11just fine
17:50:56disrupteklol
17:51:25FromDiscord<whisperdev> Why does not disruptek write performant musl in Nim?
17:51:41Zevvyeah disruptek
17:51:50disruptekno, he said !disruptek.
17:51:55disruptekthat means all of you.
17:52:37FromDiscord<lqdev> well, *i* don't because a) it's not the default, most supported option and b) you can't link to any glibc-using libraries when using musl, which rules out _pretty much_ every library out there.
17:53:11FromDiscord<whisperdev> But glibc is unix/linux specific ๐Ÿ˜ฆ
17:53:22disruptekboo hoo
17:53:34FromDiscord<lqdev> so what?
17:53:39FromDiscord<lqdev> most distros use glibc.
17:53:52FromDiscord<lqdev> so all libraries there are compiled with glibc.
17:54:33FromDiscord<lqdev> ah, windows.
17:54:55FromDiscord<lqdev> i don't use windows. all of my stuff works on windows flawlessly anyways.
17:55:04FromDiscord<lqdev> i guess that's a good sign.
17:55:21FromDiscord<whisperdev> It's a good sign.
17:55:39FromDiscord<lqdev> see, fully statically linked are just not that much of a priority. fixing critical compiler bugs is more important
17:55:59FromDiscord<JSGRANT> Just say it targets 'Windows' but in small letters (with WSL) lol
17:56:25FromDiscord<whisperdev> But fully statically linked binaries are possible it's just a performance issue because of musl
17:56:44FromDiscord<whisperdev> @JSGRANT That's not a solution if you dont have WSL available
17:58:34FromDiscord<JSGRANT> That was also a joke; lol
18:00:21FromDiscord<whisperdev> Oh sorry
18:00:27FromDiscord<whisperdev> "haha"
18:00:31*disruptek throbs.
18:00:46*idf braaps
18:02:01FromDiscord<whisperdev> Is Karax something worth investing into?
18:02:12idfYes.
18:02:43FromGitter<mratsim> Nim works fine on windows or mac and they don't have glibc
18:03:00disruptekmost of the bugs are written for windows.
18:04:42FromDiscord<Clyybber> disruptek: progresas?
18:04:42FromGitter<mratsim> Ive seen more compiler bugs as in semcheck or symbol resolution than windows bug
18:04:53*shad0w_ joined #nim
18:05:05FromDiscord<JSGRANT> Reminded me of this https://twitter.com/deech/status/1302792901274087424 ; Is this even true -- is Araq 'prefered platform' Windows?
18:05:06FromDiscord<whisperdev> @disruptek Bradley Spengler says Windows is a bit more secure than Linux anyway
18:05:26FromDiscord<JSGRANT> Another question, is anyone's "prefered platform" Windows? lol
18:05:49FromDiscord<JSGRANT> Maybe the C# / F# folks
18:05:52idf@whisperdev I used Karax quite a bit and I feel like using it is worth it, makes developing single page applications quite easy and still lets you get dirty by doing some DOM stuff yourself, I also really love the dom diffing
18:06:29FromDiscord<Rika> @JSGRANT AFAIK yes he uses windows
18:06:51FromDiscord<JSGRANT> via WSL? (again joking) lol
18:07:38FromDiscord<whisperdev> I could only make myself use Elementary OS or Ubuntu but even they themselves suck
18:08:26FromDiscord<lqdev> @JSGRANT yeah 4raq prefers windows
18:08:38disruptekclyybber: trying to track down this early mangle of the proc
18:09:03FromDiscord<JSGRANT> Don't want to get too offtopic in here; But last-year I tried moving back to Windows exclusively after like 10 years away -- and it just went like giving up WAY too much. Windows is slooooowly copying some "standard tech" on the 'open-nix" end but it's like 20-50%
18:09:24shad0w_@whisperdiv pop_os is nice-ish?
18:09:42FromDiscord<JSGRANT> I get using it for convience reasons; But "preferd platform" seems like a bit much
18:10:12FromDiscord<Rika> Prolly easier for those who already have their work flows work on windows
18:10:20FromDiscord<Clyybber> theres no preferred nim platform
18:10:27disruptekof course there is.
18:10:32FromDiscord<JSGRANT> RodOS
18:10:40FromDiscord<lqdev> wut
18:10:45FromDiscord<Clyybber> disruptek: no. I prefer linux and araq prefers windows
18:10:50FromDiscord<Avatarfighter> Whatโ€™s good everyone
18:11:00FromDiscord<Clyybber> and leorize prefers haiku
18:11:07disruptekaraq is simply wrong.
18:11:08FromDiscord<Avatarfighter> Of course nim has a perfect platform
18:11:13FromDiscord<JSGRANT> Does Nim actually work on Haiku?
18:11:14idfI prefer templeos
18:11:21FromDiscord<Avatarfighter> its what ever it works on ๐Ÿ‘
18:11:24FromDiscord<Clyybber> there si not preferring; its not ike theres a tradeoff to be made
18:11:34FromDiscord<Clyybber> (edit) 'si not' => 'is no'
18:11:38FromDiscord<whisperdev> I just dont want to care about the OS at all ๐Ÿ˜ฆ
18:11:44FromDiscord<Clyybber> and you don't have to
18:11:46FromDiscord<Avatarfighter> ive heard that using arch makes you good at coding so YMMV
18:11:48voidpilet's pray for Araq's OS choice
18:11:49FromDiscord<treeform> @Elegant Beef I think using Figma is pretty important for Fidget, because its a tool people already use. Don't make user (UX designers) come to you, come to them instead. I will not be able to convince entire industry to use my "Fidget" UI tool. But I could siphon off the popularity of Figma to make UIs.
18:11:56FromDiscord<Rika> As long as it's thoroughly tested it should be good
18:12:12FromDiscord<Rika> Lq is just really pessimistic I assume
18:12:14FromDiscord<whisperdev> @Clyybber I do because things usually dont work out of the box on Linux
18:12:27FromDiscord<Clyybber> maybe its time for you to actually try nim :)
18:13:13FromDiscord<treeform> @disruptek I am here every day, what do you mean? No one pings me so I don't respond.
18:13:16disrupteki use linux because i can easily code whatever i want.
18:13:20FromDiscord<Avatarfighter> What was the original discussion
18:13:20FromDiscord<lqdev> @Rika i'm pessimistic by default because i haven't tested it first hand
18:13:27disruptektreeform: we like to hear your input.
18:13:41FromDiscord<Avatarfighter> @treeform i can ping you into all the petty arguments if youโ€™d like its pretty comical
18:13:45FromDiscord<whisperdev> @treeform I wanted support on your asyncss ๐Ÿ˜„
18:13:51FromDiscord<whisperdev> asyncssh*
18:13:51FromDiscord<JSGRANT> Oooookay, I have to sadly get ready for my 10-12 hour shift; Peace peoople
18:14:04FromDiscord<Avatarfighter> enjoy @JSGRANT hope to see you back here soon
18:14:08FromDiscord<treeform> @disruptek you did not ping me correctly ๐Ÿ™‚
18:14:09FromDiscord<lqdev> @Avatarfighter you're looking at it the wrong way. arch does not make you good at coding, it's just that people that are good at coding prefer arch.
18:14:16*endragor joined #nim
18:14:21disruptektreeform: eh, get a real client.
18:14:21FromDiscord<Avatarfighter> i was kidding lol
18:14:31FromDiscord<Avatarfighter> imagine not using Solaris smh
18:14:44FromDiscord<treeform> real clients don't work in guest mode on my locked down work computer
18:14:52disrupteknot my problem.
18:14:59FromDiscord<lqdev> @Avatarfighter you know how hard it is to convey jokes through text amirite
18:15:03FromDiscord<whisperdev> Not my chair. Not my problem amr?
18:15:11disrupteklook, you had your chance to hire me at reddit.
18:15:11FromDiscord<treeform> I made my own chair ๐Ÿ™‚
18:15:23FromDiscord<Avatarfighter> @lqdev ik ill add emojis to convey my humor lmao
18:15:23FromDiscord<JSGRANT> @Avatarfighter Good chance I'll be back in here (or offtopic or gamedev) and being annoying after -- unless I pass out. lol Okay, computer screen going off noooooooow
18:15:24FromDiscord<whisperdev> treeform is cto at reddit? ๐Ÿ˜ฎ
18:15:31FromDiscord<lqdev> or `/s`
18:15:37FromDiscord<Avatarfighter> ๐Ÿ˜ณ
18:15:42disruptektreeform is hot shit.
18:15:44FromDiscord<treeform> @whisperdev no I am all of the board directors
18:16:17FromDiscord<whisperdev> @treeform does asyncssh work on windows? ๐Ÿ˜Š
18:16:29FromDiscord<treeform> @whisperdev I don't think so
18:16:34FromDiscord<whisperdev> ๐Ÿ˜ข
18:16:45FromDiscord<treeform> it requires libssh2 so you got to get that some how
18:16:46disruptekthere's no libssh2 on windows iirc.
18:16:54disruptekJBB supplies it, now.
18:17:29FromDiscord<whisperdev> They have includes for windows. I just checked
18:17:59FromDiscord<treeform> @whisperdev I was working on a system, which would SSH and run commands on multiple sergers. But instead i used db queue to put commands into table and had workers look for work in the db.
18:18:00disruptekclyybber: it's mangling procs before it even generates the header. it's maddening.
18:18:25*endragor quit (Ping timeout: 240 seconds)
18:18:33FromDiscord<whisperdev> @treeform That's unfortunate. Ill just use Go then ๐Ÿ˜ฆ
18:18:44FromDiscord<Avatarfighter> ๐Ÿ˜ณ
18:19:47idftraitor
18:19:59disruptek.kick whisperdev
18:20:02disruptekoops
18:21:21FromDiscord<whisperdev> Hey I am not the wonder boy here I cant figure it out myself
18:21:47disruptekZevv: he wants your help, wonder boy.
18:21:54FromDiscord<treeform> I just used the libssh2 api. I really did not add much to it.
18:22:18FromDiscord<whisperdev> I have to compile libssh2 as DLL?
18:22:26FromDiscord<treeform> you do?
18:22:41FromDiscord<Avatarfighter> That was a question
18:23:06FromDiscord<Avatarfighter> Can i get a link to asyncssh
18:23:14FromDiscord<Avatarfighter> !repo asyncssh
18:23:15disbot12https://github.com/treeform/asyncssh -- 9asyncssh: 11SSH and run commands on other servers asynchronously for Nim. 15 18โญ 0๐Ÿด 7& 1 more...
18:24:31FromDiscord<Avatarfighter> also sorry about that random message i just switched to my phone and it sent
18:24:46FromDiscord<Avatarfighter> Disruptek: how goes the mangling
18:34:25disruptekclyybber has been helpful.
18:35:31disruptekbut i pulled a muscle in my back moving an iron and marble stove. gotta stretch it out in a minute.
18:40:10disruptekiron and marble is a pretty heavy combination.
18:41:54FromDiscord<juan_carlos> It runs with Rust
18:42:51disruptekpainful indeed.
18:52:52*narimiran joined #nim
18:54:18FromDiscord<ThothLoki> ok.....easiest way to upgrad nim? i am rocking 1.2 right now. do i just need to download and reinstall?
18:54:53FromDiscord<haxscramper> `choosenim update stable`
18:55:49FromDiscord<ThothLoki> wonder if it isnt in my path on my work computer.........
18:55:53FromDiscord<ThothLoki> that didnt work
18:56:07FromDiscord<ThothLoki> i probably fucked it up when i set it up last time
18:56:16disruptek~gitnim
18:56:17disbot9gitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- 7disruptek
18:58:20FromDiscord<juan_carlos> How do I update by git short hash on gitnim?.
18:58:41FromDiscord<Clyybber> disruptek: I think you missed it last time I asked you this
18:58:54disruptekgit nim 2dd06cb1
18:59:03FromDiscord<Clyybber> lol?
18:59:06FromDiscord<Clyybber> we have some problems when we turn proc params into syms
18:59:19disruptekthat's a short hash git nim update to 1.2.7 from 9/13.
18:59:35disruptekclyybber: yeah, i didn't understand your question.
18:59:51FromDiscord<Clyybber> because if some macro author would copy a typed proc and change its name
18:59:57FromDiscord<Clyybber> and return both declarations
19:00:04FromDiscord<Clyybber> they would share their param syms
19:00:18disruptekyeah.
19:00:24FromDiscord<Clyybber> which is wrong
19:00:28disruptekright.
19:00:46disrupteki have a desym filter in cps for this.
19:00:58disruptekbut, it doesn't help... enough.
19:01:06FromDiscord<Clyybber> ah, yeah I was thinking about adding a refreshTree to macros.nim
19:01:18FromDiscord<Clyybber> which would act like copyTree, but would also give us refreshedSyms
19:01:36disruptekwe wouldn't need to re-sem them?
19:01:44FromDiscord<Clyybber> nope
19:01:51disruptekthat would be a win, certainly.
19:02:05*Jesin quit (Quit: Leaving)
19:02:17FromDiscord<Clyybber> it should be relatively simple, just a recursive copyTree with a few genSym mixed in
19:02:30disrupteki have some code that just does substitution of individual symbols. i could just use that for the params, yes?
19:02:34disrupteksame effect?
19:02:59FromDiscord<Clyybber> yeah, I think so
19:03:46disruptekokay, then i think these aren't harmful to add, but i dunno about adding stuff to stdlib. i'm of two minds on the thing.
19:03:52disruptekmaybe macroutils is better.
19:03:59FromDiscord<Clyybber> but this is fundamental
19:04:15disruptekyou say that, but it hasn't been fixed until now.
19:04:23disruptekso i dunno how many people could be struggling with this.
19:04:27FromDiscord<Clyybber> well, it didn't turn up until my PR
19:04:35disruptekthat's fair.
19:04:41disruptekwell, up to you.
19:04:53disruptekjc: doesn't that work for you?
19:04:56FromDiscord<Clyybber> I would like to get Araqs opinion on the whole thing
19:05:03disruptekyeah.
19:05:30FromDiscord<Clyybber> because it could be possible to just refresh a sym automagically if we detect it would be illegally reused
19:05:54FromDiscord<ThothLoki> nvm. totally forgot about scoop
19:06:54FromDiscord<Clyybber> disruptek: Essentially, we could determine a point after which an sym is "sealed" after which modifications to it would just generate a new sym
19:07:27disruptekit would be useful to have access to that feature from macros.
19:07:34FromDiscord<Clyybber> but theres an issue
19:07:41disruptekmaybe only giving us a way to seal the sym.
19:08:15FromDiscord<Clyybber> because if a macro generates: var sym111: int; var sym111: uint; echo sym111
19:08:29FromDiscord<Clyybber> the compiler would detect the illegal symbol reuse in the second declaration
19:08:38stisa[m]is there an easy way to see what the ast looks like after compiler transformations are applied?
19:08:41stisa[m]Possibly without writing my own own compiler pass and calling renderTree
19:08:42FromDiscord<Clyybber> and would do this: var sym111: int; var sym112
19:08:53FromDiscord<Clyybber> but now what does `echo sym111` refer to?
19:08:53disruptekeh the seal should last for the sem pass and that's it. that macro code is obvs broken.
19:09:13FromDiscord<Clyybber> stisa: Yeah, getImplTransformed
19:09:35disruptekbbiab
19:09:51FromDiscord<Clyybber> disruptek: Yeah, probably best to just use it for error messages
19:13:26stisa[m]@Clyybber oh nice, thanks
19:13:43*shad0w_ quit (Ping timeout: 260 seconds)
19:14:03stisa[m]I was looking in macros but I forgot to check the devel version
19:21:22*solitudesf joined #nim
19:33:41*tane joined #nim
19:46:11*D_ quit (Ping timeout: 240 seconds)
19:46:49*Vladar quit (Remote host closed the connection)
19:47:27*D_ joined #nim
19:51:23*narimiran quit (Ping timeout: 240 seconds)
19:52:30*NimBot joined #nim
20:09:16disruptektell me something good.
20:15:20Prestigework will be over soon disruptek. That's about it
20:15:52disruptekis it time for the weekend already?
20:18:56Prestigeno but 5pm. haha
20:26:54*Cthalupa joined #nim
20:33:49*solitudesf quit (Ping timeout: 264 seconds)
20:43:08disruptekclyybber: zero_functional
20:43:53alehander92what
20:44:01alehander92i hope with views
20:44:07*lritter quit (Ping timeout: 265 seconds)
20:44:15alehander92we can get a simpler functional thin
20:46:51disruptekremember, it's not about length. girth is what counts.
20:46:55alehander92dude
20:49:16FromDiscord<Clyybber> disruptek: zero_functional what?
20:49:21alehander92thing*
20:49:28FromDiscord<Clyybber> is your mangling zero functional :PP
20:49:30alehander92one_imperative
20:49:30disruptekit crashes on your pr.
20:49:40alehander92beta_declarative
20:49:42FromDiscord<Clyybber> damn, looks like my PR is zero-functional
20:50:05*lritter joined #nim
20:50:08FromDiscord<Clyybber> disruptek: What does it crash with
20:50:15FromDiscord<Clyybber> is it a nice error msg?
20:50:19disruptekcannot instantiate T1.
20:50:27FromDiscord<Clyybber> nice
20:50:45disrupteksuper helpful.
20:52:00alehander92forgive me
20:52:07disruptekthere's a cligen thing too, but that might be corrected by a programmer.
20:52:08alehander92i can take a look later
20:52:59FromDiscord<Clyybber> disruptek: Oh, yeah I know about the cligen thing
20:53:18FromDiscord<Clyybber> issue is I can't repro it
21:13:07disruptekaiieieeee it burns
21:13:35disruptekman i hate this tainted string thing.
21:16:46disruptekit's like the compiler decides to change the type after generating the code for seq[string] and then it updates system.nim but the main module is already closed.
21:17:51disrupteki wonder if i can safely cache ptype.loc.r.
21:21:48alehander92hmm
21:22:14alehander92can you move it around
21:22:21*mipri left #nim (#nim)
21:22:26alehander92and isn't it just a distinct string?
21:22:30disrupteki can use my pc muscles to make it dance.
21:22:38disruptekwait what
21:23:13FromDiscord<Clyybber> alehander92: Without taintedmode its not a distinct string
21:23:18FromDiscord<Clyybber> but with taintedmode it is
21:23:53FromDiscord<Clyybber> disruptek: system.nim should be processed before the contents of your main module
21:24:15disruptektype name caching doesn't quite work. yet.
21:24:27alehander92is the zero thing bad
21:24:32FromDiscord<Clyybber> just disable the caching for now
21:24:39FromDiscord<Clyybber> alehander92: Nah, probably a bug in my code
21:24:47FromDiscord<Clyybber> unless you are using macros that have typed params
21:24:59disruptekthe caching could solve the problem, ultimately.
21:25:03FromDiscord<Clyybber> then its not really a bug, I think
21:25:14FromDiscord<Clyybber> disruptek: caching should never solve a problem except for performance
21:25:32FromDiscord<Clyybber> but maybe you are thinking of a better kind of caching
21:25:54disrupteki'm just stashing the rope and using it if i've already generated a type name for the type.
21:25:56FromDiscord<Clyybber> disruptek: The real question is why this doesn't hold true > system.nim should be processed before the contents of your main module
21:26:13disruptekmaybe it is.
21:26:14FromDiscord<Clyybber> disruptek: Aha!
21:26:23FromDiscord<Clyybber> disruptek: Well, it probably makes sense
21:26:32FromDiscord<Clyybber> system.add is not defined for taintedstring
21:26:38FromDiscord<Clyybber> but for string
21:27:12disruptekit turns into tainted due to a newSeq call, i think, not an add.
21:27:46disruptekit's like we instantiate the generics as strings and then later we decide, oh, this is actually tainted.
21:28:05FromDiscord<Clyybber> yeah
21:29:00FromDiscord<Clyybber> instead of overwriting the original signature, maybe we should generate an alias
21:29:06FromDiscord<Clyybber> so that if TaintedString == string
21:29:20FromDiscord<Clyybber> in the end we end up with add_seqString and add_seqTaintedString
21:30:25disrupteki wish i had the pcontext seal in this branch.
21:32:13disruptekactually, the newSeq that notices the tainted string comes along before the add gets generated.
21:32:58FromDiscord<Clyybber> see it shouldn't matter what comes first. We should generate aliases
21:33:07FromDiscord<Clyybber> Or maybe not
21:33:32FromDiscord<Clyybber> maybe we should generate add_seqString_seqTaintedString
21:34:12FromDiscord<Clyybber> but then adding a MyType = YourType would change all proc signatures that use YourType
21:34:14FromDiscord<Clyybber> which sucks
21:34:23alehander92Clyybber maybe they expect idents!
21:34:28disruptekwell, it's tricky. it's an alias, so we shouldn't need a generic instantiation. but in the case of cpp, we need the signature. so the easiest way to do that is to go through the instantiation.
21:35:17FromDiscord<Clyybber> alehander92: Yeah, could be it
21:35:52FromDiscord<Clyybber> disruptek: Ah, so thats the source of the issues
21:35:53disruptekoh this is probably the problem. we think distincts are "irrelevantForBackend" but in fact they aren't whatfer sig reasons.
21:36:14FromDiscord<Clyybber> But you encounter the bug without taintMode
21:36:32disrupteki know, even aliases aren't irrelevant i guess.
21:36:39FromDiscord<Clyybber> They should be
21:36:47alehander92huh semytiped <3
21:36:56FromDiscord<Clyybber> :D
21:37:01disruptekmaybe we should just get rid of this proc_1starg naming scheme.
21:37:19FromDiscord<Clyybber> the typo is typed too
21:37:20disruptekugh, it won't solve the cpp problem, though.
21:37:58disruptekand currently the codebase needs tyDistinct for getTypeInfo.
21:38:12FromDiscord<Clyybber> disruptek: Thinking about it, we *must* get rid of the 1st arg scheme, I think. Either that or we always resolve aliases
21:38:14disruptekmy back hurts and this is a pain in my ass.
21:38:36disruptekit's first argument, too.
21:38:42disruptek(only under c++)
21:39:08FromDiscord<Clyybber> Hmm, can you try resolving aliases as far as possible always?
21:39:30disruptekthe problem is that the mangle becomes useless.
21:39:39disruptekit's like add_string_45 and stuff.
21:40:01disruptekwe already skip aliases.
21:40:01FromDiscord<Clyybber> You mean because when we have MyType = YourType
21:40:12FromDiscord<Clyybber> we define your add(MyType)
21:40:22FromDiscord<Clyybber> and the C code ends up as add_YourType?
21:40:58disrupteki'll separate out our naming rule from our codegen rule.
21:41:29FromDiscord<Clyybber> Is what I've written above what you mean with "mangle becomes useless"?
21:41:48disrupteklet's say that aliases and distincts are meaningless for codegen but meaningful for naming.
21:42:09disruptekyeah, i don't want a lot of YourType.
21:42:23FromDiscord<Clyybber> so you want MyType there
21:42:24disruptekbecause what happens is we devolve to tons of base types everywhere.
21:42:28disruptekideally, yes.
21:42:30FromDiscord<Clyybber> yeah
21:43:13FromDiscord<Clyybber> but I'm thinking, if a module uses add(MyType) without being aware of MyType, it will try to generate a call to add_YourType
21:43:55FromDiscord<Clyybber> because it doesn't know that add will end up as add_MyType
21:44:05FromDiscord<Clyybber> disruptek: do you think thats a problem?
21:44:15FromDiscord<Clyybber> Or do you already have a solution in mind for that?
21:44:32disruptekhmm, Lock_str_locks is an unknown type name. so i guess that answers the question.
21:45:24FromDiscord<UNIcodeX> Returning the same test string of text, does anyone know why Prologue would give me 27000 requests per second (with debug set to false) vs Jester at 55000 requests per second? both built with `-d:release -d:danger`
21:45:48disruptekprologue does more work?
21:46:06FromDiscord<UNIcodeX> Prologue seems to have more support for middleware and templating, etc...
21:46:30disruptekdo you need more than 27,000 replies per second?
21:46:50FromDiscord<UNIcodeX> > prologue does more work?โ†ต@disruptek[IRC]#0000 it gets less requests per second with `wrk` test. it's just a simple route which returns the same thing between both frameworks.
21:47:06FromDiscord<UNIcodeX> I'm evaluating it against Jester for usage in production for an app back end
21:47:08disrupteki stand by my claim.
21:47:13FromDiscord<UNIcodeX> so... the more the better
21:47:32disruptekwell, no point if you aren't delivering 27,000/s, right?
21:47:44FromDiscord<Clyybber> there is a point
21:47:46*tane quit (Quit: Leaving)
21:47:48FromDiscord<Clyybber> conserving energy
21:48:02disruptekaside from global warming, then.
21:48:02FromDiscord<Clyybber> and having the potential to handle spikes
21:48:06FromDiscord<UNIcodeX> don't want to have to re-implement if go above that. and sure; energy
21:48:28FromDiscord<Clyybber> disruptek: What is Lock_str_locks ?
21:49:32disrupteki think it's just there to break my balls.
21:49:52FromDiscord<Clyybber> or rather, why is it Lock_str_locks and not just Lock?
21:52:07FromDiscord<UNIcodeX> Bueller? Bueller? ๐Ÿ˜…
21:52:56disruptekwho knows.
21:53:47disruptekunicodex: the numbers are useless because real work takes real time, context switches, etc.
21:53:55disruptekmake a real test.
21:54:22*Trustable quit (Remote host closed the connection)
21:54:32disruptekclyybber: anything exported will get a module name appended.
21:57:28disruptekanyway, why wouldn't it work? stupid code.
22:00:08alehander92maan
22:00:26disruptekbecause our locks are now `typedef long arrClong[5];`
22:01:00disruptekand you ask me why i drink.
22:03:58FromDiscord<UNIcodeX> fair enough
22:04:50disruptekask yourself whether the time prologue saves you is worth buying a second server.
22:05:08disruptekservers are cheap.
22:09:47*krux02 quit (Remote host closed the connection)
22:14:34FromDiscord<Rika> Also are you really paying by energy use of your server
22:19:26FromDiscord<Clyybber> saving energy/processing is a good idea regardless
22:24:18disrupteki'd rather save programmer time.
22:24:48disrupteki have this crazy idea that computers serve /me/ and not the other way around.
22:25:47FromDiscord<Rika> Only a good idea if whatever you're switching to has a big absolute difference for power usage
22:26:49disruptekit varies with the gear, of course, but most programmers... well, /other/ programmers, are more valuable than hardware.
22:28:29disrupteki mean, i'm trying to trade Clyybber for a TI-86 and getting no bites, but other than that... most programmers are more valuable than hardware...
22:38:16*endragor joined #nim
22:42:52*endragor quit (Ping timeout: 258 seconds)
22:53:36FromDiscord<kodkuce> i am still compiling in qemu i think like i 4 hour passed
22:53:48*endragor joined #nim
22:58:08*endragor quit (Ping timeout: 256 seconds)
23:04:50shashlickHow often do you folks need to develop both your main project and it's deps
23:07:32leorizeI just keep it bundled then split up later
23:16:40FromDiscord<Rika> Wtf disruptek insulting someone else and not me? Legit did the real disruptek die or what
23:17:43FromDiscord<kodkuce> peopel change ower time :)
23:17:49FromDiscord<kodkuce> at least moste do
23:17:53FromDiscord<kodkuce> (edit) 'moste' => 'most'
23:21:57*femtotones joined #nim
23:23:40*gmaggior quit (Quit: Leaving)
23:33:53*abm quit (Quit: Leaving)
23:53:06FromDiscord<kodkuce> it just finished
23:53:31FromDiscord<kodkuce> it took me aprox 6hours
23:56:00FromDiscord<kodkuce> i all build is in bin right
23:56:05FromDiscord<kodkuce> those are outputs
23:56:14FromDiscord<kodkuce> i can delete rest
23:56:27disruptekrika: i wouldn't dream of trying to trade you for a calculator.
23:56:54FromDiscord<Rika> Lol nice
23:57:07disruptekwell i think i mentioned that i'm broke as shit.
23:57:14disrupteki can't afford to sweeten the pot.
23:57:44FromDiscord<kodkuce> dudes confirm before i delete and need to w8 6 more hours
23:58:00FromDiscord<kodkuce> i can just save stuff that went to /bin after build
23:58:06disrupteknot really, no.
23:58:07FromDiscord<kodkuce> right, dont need anything else
23:58:08FromDiscord<Clyybber> there have been times where I would have traded myself for a calculator as well
23:58:23disruptekyou will need the lib and compiler directories at least.
23:58:29FromDiscord<kodkuce> what you trolling me?
23:58:30disruptekyou probably want config, too.
23:58:54disruptekshashlick: i usually dev deps at the same time.
23:59:03FromDiscord<Clyybber> question. WTF builds for 6 hours?
23:59:12disrupteknim on arm.
23:59:15FromDiscord<Clyybber> disruptek: progress, progress progress?
23:59:27FromDiscord<Clyybber> nim on arm, but why so slow
23:59:34FromDiscord<kodkuce> nim on qemu emulating arm
23:59:41FromDiscord<Clyybber> y tho
23:59:57disruptekno reason.