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:47 | disruptek | van 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:31 | shad0w | dropping here for the first time. just started picking up nim. Hi all ! : ) |
04:22:41 | disruptek | sup dawg |
04:23:32 | shad0w | just planning on shredding the tutorials on the nim lang site the next couple days. |
04:23:47 | disruptek | what language(s) are you coming from? |
04:24:05 | shad0w | most recently, haskell |
04:24:12 | shad0w | it was a bunch of em before |
04:24:21 | disruptek | nice. |
04:24:23 | shad0w | javascript, C, python. |
04:24:56 | disruptek | you won't have much trouble. |
04:24:58 | shad0w | any pointers? (no pun intended) for a nim newbie |
04:25:52 | disruptek | just that you give it the benefit of the doubt. it's more powerful than it looks. |
04:26:33 | shad0w | it does have the "seems too good to be true" thing going on for it |
04:26:47 | disruptek | i mean, it kinda is. |
04:27:10 | disruptek | most people just sorta bounce off, though, because we don't really sell it as much as we should. |
04:27:36 | disruptek | what are you planning on using it for? |
04:28:56 | shad0w | nothing specific really tbh. but a general tool for whatever i'll need to do. which could be stuff with a wide range |
04:29:30 | shad0w | it's fast, its nice-ish? to read, it has macros. could fit the suit |
04:29:31 | disruptek | it would easily replace js/c/python in your toolbox. |
04:29:50 | shad0w | but ive been looking to get into compilers |
04:30:07 | shad0w | i intend to contribute to the nim compiler if i do hit it off. |
04:30:40 | disruptek | good, there is a lot of work to do and the code is pretty hairy in spots. |
04:30:45 | shad0w | maybe do the LLVM to nim thing, just as a learning exercise, if nothing more. |
04:30:47 | disruptek | but luckily, it's written in nim. |
04:31:43 | shad0w | i saw. |
04:32:31 | shad0w | you had a chance to work on the compiler code yet? |
04:32:54 | disruptek | i'm working on incremental compilation. |
04:33:30 | disruptek | well, currently hung up on corner cases in the mangling for the c/cpp backend. |
04:34:26 | disruptek | some of the code dates to when it was converted from pascal. |
04:36:02 | shad0w | sounds the frustrating kind of fun |
04:36:37 | shad0w | like* |
04:36:39 | disruptek | my approach sucks. |
04:37:06 | shad0w | you suck your way to the top my friend. |
04:37:08 | disruptek | it seemed easier when i started. 😁 |
04:37:33 | shad0w | classic lol |
04:37:53 | disruptek | i know. i went in and set everything on fire. |
04:38:06 | disruptek | it's almost back together but i've got a couple niggling issues. |
04:38:40 | disruptek | but, it will mean that instead of hash-based identifiers, we'll have properly useful names. |
04:39:31 | shad0w | and that's good, right ? |
04:40:10 | disruptek | when you start looking at the c output, you'll get a feel for it. |
04:40:20 | disruptek | it's pretty tedious. |
04:40:43 | disruptek | one of those things almost no one has to see. |
04:41:41 | disruptek | the compiler is pretty awesome, all things considered, though. |
04:41:57 | disruptek | pretty fast, very powerful, lots of knobs and levers. |
04:42:06 | disruptek | not really optimized yet, either. |
04:43:02 | shad0w | that just means more work for us to do. in a good way |
04:43:23 | disruptek | yeah, we have some pretty revolutionary stuff in the skunk works that will take it to the next level. |
04:44:07 | shad0w | let me know if there's stuff a newbie to nim like me could help out with. |
04:44:30 | disruptek | well, take notes on the confusing bits as you pick it up. |
04:44:33 | disruptek | that's always useful. |
04:45:21 | shad0w | you got it. |
04:45:53 | disruptek | there 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:36 | disruptek | that 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:51 | shad0w | coming for haskell, i think that wont be an issue. that stuff was so different, nim feels like familiar ground. |
04:47:11 | disruptek | true, it's not quite the same mindfuck. |
04:47:30 | shad0w | but i'd like to incorporate the good simple parts of haskell in the style |
04:47:54 | disruptek | we always need more of that deep functional touch. |
04:48:16 | shad0w | when i found out i can call procs with spaces lik `f1 arg1, arg2` instead of forcing me to `f1(arg1, arg2)` |
04:48:17 | disruptek | it's not like it isn't there; we're just bad at bringing it to the surface. |
04:48:21 | shad0w | that was pleasent. |
04:48:52 | disruptek | yeah, but wait to you really get into macros. |
04:49:15 | disruptek | there's almost nothing you /shouldn't/ be able to do. |
04:49:37 | shad0w | well, 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:00 | disruptek | yep, nim is tasteful. |
04:51:13 | disruptek | !eval echo "hello" |
04:51:15 | NimBot | hello |
04:51:20 | disruptek | also say ~help |
04:52:18 | disruptek | ~disbot |
04:52:19 | disbot | no footnotes for `disbot`. 🙁 |
04:52:56 | shad0w | !eval echo "hello" |
04:52:58 | NimBot | hello |
04:53:03 | shad0w | ~help |
04:53:14 | disruptek | ~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:15 | disbot | disbot: 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:53 | shad0w | no, im on a irc client xD |
04:54:00 | disruptek | yeah, i know. |
04:54:14 | disruptek | just a footnote i can lay on the next discord knucklehead to drop by. |
04:54:29 | shad0w | this is pretty sweet, thanks. |
04:54:55 | disruptek | yeah, it's fun. |
04:54:55 | shad0w | discord is good too, in its own way. pretty decent for an electron app, if you ask me. |
04:55:26 | disruptek | it's nice to be able to ignore entirely useless segments of the community, sure. |
04:55:43 | shad0w | what's a better client for linux? i downloaded the first that came my way |
04:55:54 | shad0w | its called srain |
04:56:19 | disruptek | for irc? i use irssi, but only because it feels old school to me. |
04:56:32 | shad0w | its the terminal one right ? |
04:56:35 | disruptek | yeah. |
04:56:50 | shad0w | oh wait, i forgot to check the emacs packages |
04:57:01 | shad0w | im sure there'd be something |
04:57:07 | disruptek | emacs... krux02 is the guy that knows what's up. |
04:57:16 | disruptek | i use nvim and this one: |
04:57:21 | disruptek | !repo nim.nvim |
04:57:22 | disbot | https://github.com/alaviss/nim.nvim -- 9nim.nvim: 11Nim plugin for NeoVim 15 95⭐ 13🍴 7& 3 more... |
04:57:24 | shad0w | open a client in an emacs buffer or something |
04:57:32 | shad0w | can you @ users here ? |
04:57:41 | disruptek | sure. |
04:59:04 | shad0w | hi @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:58 | disruptek | well, he's an irc user and apparently offline. |
05:00:08 | disruptek | but yeah, that works for people that are online. |
05:00:30 | disruptek | it works for discord people, too, i'm told. |
05:00:34 | shad0w | i'll get goin now. thanks for the time and lovely chat @disruptek. |
05:00:41 | disruptek | have fun. |
05:00:52 | FromDiscord | <Elegant Beef> Wow i was here too! |
05:02:14 | disruptek | i thought that was bentley's breath i was smelling. |
05:02:37 | FromDiscord | <Elegant Beef> Nah that sounds more like dead mouse, i smell like dead rat |
05:04:04 | disruptek | haven't seen any mice since the other night when i had one run across my legs. |
05:05:21 | FromDiscord | <Rika> Holy fuck did the real disruptek die or something |
05:05:35 | FromDiscord | <Elegant Beef> No Diprustek did |
05:05:50 | FromDiscord | <Rika> Never seen him this chill with a newbie before |
05:06:00 | FromDiscord | <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:38 | FromDiscord | <Avatarfighter> ahah |
05:45:03 | FromDiscord | <acek7> do you people ever sleep |
05:46:14 | FromDiscord | <Avatarfighter> sometimes |
05:50:04 | FromDiscord | <acek7> fiddling around with the fidget and figma thing more |
05:50:18 | FromDiscord | <acek7> i exported something from figma |
05:50:21 | Prestige | We do not sleep |
05:50:35 | FromDiscord | <acek7> and it keeps telling me frame was not instantiated |
05:50:35 | Prestige | Avatar 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:44 | FromDiscord | <iWonderAboutTuatara> @dom96 sorry for the tag, is the forum down? |
06:30:03 | FromDiscord | <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:44 | shad0w_ | just logged in from Emacs, this is so cool : D |
07:21:19 | * | lolz343434 joined #nim |
07:21:33 | lolz343434 | Cool |
07:21:47 | shad0w_ | : 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:30 | voidpi | |
08:00:37 | voidpi | l |
08:00:40 | voidpi | creñ |
08:00:44 | voidpi | crap |
08:01:03 | idf | crenp |
08:02:00 | voidpi | crypt? |
08:02:49 | FromDiscord | <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:03 | newUser | Hi, 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:08 | newUser | inp.read( (char *) &Data, sizeof(Data) ); (Not a smilie) |
08:39:28 | newUser | inp.read( (char *) &Data, sizeof(Data) ); |
08:39:29 | * | kungtotte quit (Read error: Connection reset by peer) |
08:40:06 | FromDiscord | <dom96> @iWonderAboutTuatara works for me right now? |
08:40:18 | FromDiscord | <iWonderAboutTuatara> Lemme check |
08:40:44 | * | kungtotte joined #nim |
08:40:48 | FromDiscord | <iWonderAboutTuatara> Back up for me as well |
08:40:55 | FromDiscord | <iWonderAboutTuatara> Thanks! |
08:41:13 | FromDiscord | <Recruit_main707> inp is a File right? newUser |
08:41:16 | FromDiscord | <iWonderAboutTuatara> While I'm here, bit of a stupid question |
08:41:19 | newUser | yes |
08:41:26 | FromDiscord | <iWonderAboutTuatara> Does Nim support pipe operator or similar? |
08:41:40 | newUser | ifstream inp |
08:42:02 | FromDiscord | <iWonderAboutTuatara> sent a code paste, see https://play.nim-lang.org/#ix=2xwa |
08:42:09 | FromDiscord | <iWonderAboutTuatara> (edit) 'https://play.nim-lang.org/#ix=2xwa' => 'https://play.nim-lang.org/#ix=2xwb' |
08:42:21 | FromDiscord | <iWonderAboutTuatara> Does Nim have support for a similar thing? |
08:42:23 | FromDiscord | <Recruit_main707> and you are reading binary data? |
08:42:28 | FromDiscord | <Elegant Beef> cand o the same thing using the `with` |
08:42:37 | FromDiscord | <iWonderAboutTuatara> I found a macro that implements a pipe (|>) operator |
08:42:38 | FromDiscord | <Elegant Beef> https://nim-lang.org/docs/with.html |
08:42:39 | newUser | Recruit_main707: yes |
08:42:42 | FromDiscord | <iWonderAboutTuatara> But wondering about default Nim |
08:42:52 | FromDiscord | <iWonderAboutTuatara> Oh amazing thanks! |
08:43:21 | FromDiscord | <iWonderAboutTuatara> Wow macros are powerful |
08:43:59 | idf | yes they are |
08:44:25 | FromDiscord | <Elegant Beef> Magic is more accurate 😛 |
08:44:37 | FromDiscord | <Recruit_main707> then i think you want readBuffer |
08:44:54 | FromDiscord | <Recruit_main707> https://nim-lang.org/docs/io.html#readBuffer%2CFile%2Cpointer%2CNatural |
08:45:29 | FromDiscord | <Recruit_main707> `inp.readBuffer(cast[pointer](addr Data), sizeof(Data)` |
08:46:48 | gmaggior | is there a facility to make a reverse lookup on a table (biunivocal), or you have to create a reversed-table? |
08:47:48 | FromDiscord | <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:55 | newUser | Recruit_main707: isRead = InputFile.readBuffer(cast[pointer] (addr data), sizeof(data)), but get wrong results |
08:48:01 | FromDiscord | <Elegant Beef> Depending on how many times you want to 😄 |
08:48:17 | newUser | Recruit_main707: isRead = 48 |
08:48:52 | FromDiscord | <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:58 | gmaggior | Elegant Beef, thanks |
08:49:12 | newUser | Recruit_main707: sizeof(data) = 48 |
08:49:13 | FromDiscord | <Recruit_main707> i its fine |
08:50:17 | newUser | free(): double free detected in tcache 2 |
08:50:27 | newUser | SIGABRT: Abnormal termination. |
08:52:02 | FromDiscord | <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:13 | FromDiscord | <Recruit_main707> newUser? |
08:57:33 | newUser | yes, searching.... |
09:00:49 | * | torbencarstens[m quit (Quit: Idle for 30+ days) |
09:06:28 | FromDiscord | <Recruit_main707> how is your `data` variable defined? |
09:07:38 | newUser | type Data = object PPM: int RA, Dec: float pmRA, pmDec, mag: float |
09:07:56 | newUser | struct { long PPM; double RA,Dec; float pmRA,pmDec,mag; } Data; |
09:08:01 | FromDiscord | <Recruit_main707> but thats the object definition |
09:08:37 | FromDiscord | <Recruit_main707> you need something like var myData: Data↵and pass the pointer to that variable |
09:09:08 | newUser | var data: Data |
09:09:54 | FromDiscord | <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:56 | newUser | I can't, there is a copy right... |
09:11:45 | FromDiscord | <Recruit_main707> no one will be using that code though |
09:14:02 | shad0w_ | anyone here uses org-mode with nim ? |
09:14:07 | FromDiscord | <Recruit_main707> i cant help you without more information |
09:14:25 | newUser | kk, 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:43 | FromDiscord | <Rika> @iWonderAboutTuatara sorry for late reply ping but why would we need a pipe operator? |
09:22:10 | FromDiscord | <iWonderAboutTuatara> If makes things easier |
09:22:31 | FromDiscord | <iWonderAboutTuatara> Like let's say I wanted to do some sequence of mutations to a value |
09:22:35 | FromDiscord | <Rika> But we already have ufcs |
09:22:40 | FromDiscord | <iWonderAboutTuatara> Right |
09:22:58 | FromDiscord | <iWonderAboutTuatara> But having it all on 1 line makes it difficulter to read |
09:23:10 | FromDiscord | <Rika> You don't need it to be on one line |
09:23:26 | FromDiscord | <iWonderAboutTuatara> Yeah you can use the with module |
09:23:35 | FromDiscord | <iWonderAboutTuatara> Which is what I was looking for |
09:24:47 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2xwm |
09:25:11 | FromDiscord | <Rika> Or you can just do the exact thing D does |
09:25:40 | FromDiscord | <iWonderAboutTuatara> Oh |
09:25:44 | FromDiscord | <iWonderAboutTuatara> That's really good |
09:25:52 | FromDiscord | <iWonderAboutTuatara> That is exactly what I wanted |
09:26:09 | FromDiscord | <iWonderAboutTuatara> Even better than an import actually |
09:39:16 | * | Tanger quit (Quit: Leaving) |
09:42:24 | Araq | these 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:50 | Araq | noooooooooooooooooooooooooooo |
09:49:57 | Araq | found the bug... omg |
09:50:29 | Araq | so stupid... |
09:51:07 | Araq | or maybe not... |
09:52:43 | Araq | yep, found it |
09:55:31 | FromDiscord | <dk> does `{.nimcall.}` do anything on the js backend? |
09:55:37 | FromDiscord | <dk> dom module uses it |
09:56:32 | Araq | it prevents closures |
09:56:45 | Araq | not really important for JS |
10:06:00 | * | noonien joined #nim |
10:15:22 | FromDiscord | <Clyybber> Araq: What bug? |
10:15:46 | narimiran | probably #15076 |
10:15:47 | disbot | https://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:12 | FromDiscord | <Clyybber> \o/ |
10:24:24 | Araq | the leak remains though |
10:24:32 | Araq | at leat the corruption is gone |
10:24:34 | * | newUser joined #nim |
10:25:36 | newUser | Recruit_main707: thank you very much. I found many bugs. Your solution works too without pointer: isRead = InputFile.readBuffer((addr data), sizeof(data)) |
10:26:30 | newUser | Recruit_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:54 | newUser | Recruit_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:04 | FromDiscord | <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:23 | FromDiscord | <Clyybber> disruptek is working on it |
10:35:25 | FromGitter | <alehander92> ok back online |
10:35:34 | FromDiscord | <Clyybber> but so far backend stuff mostly afaict |
10:52:02 | * | newUser quit (Remote host closed the connection) |
10:57:35 | PMunch | Hmm, how do you wrap something that takes a `const char*` argument? |
10:58:16 | FromDiscord | <Recruit_main707> i think you ignore the const, but idk |
11:01:03 | FromDiscord | <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:59 | FromDiscord | <Recruit_main707> GLvoid == void btw |
11:15:37 | PMunch | I just had to chuck in nodecl and it works |
11:27:33 | FromDiscord | <lqdev> PMunch: i always just ignore the const |
11:27:51 | PMunch | Yeah I was just having issues with conflicting types from the C compiler |
11:27:54 | FromDiscord | <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:15 | alehander92 | Araq the empty root thing |
12:56:30 | alehander92 | seems 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:04 | FromDiscord | <neow> hello |
14:48:26 | FromDiscord | <neow> is there a way to list a directories' contents? :'D |
14:49:01 | FromDiscord | <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:11 | FromDiscord | <neow> am I missing something? |
14:49:28 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
14:49:35 | Prestige | I think walkDir iirc |
14:49:55 | Prestige | idk if there's a way just to get an array of names |
14:50:04 | alehander92 | toSeq |
14:50:11 | alehander92 | iirc |
14:50:39 | FromDiscord | <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:18 | FromDiscord | <kodkuce> should building nim on arm take long? |
14:58:38 | FromGitter | <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:34 | FromDiscord | <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:49 | FromGitter | <mratsim> There is no hardware advantage/disadvantage to ARM for a compiler, it's mostly loop, recursion and branches |
15:00:07 | FromGitter | <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:03 | disruptek | mratsim: are you saying you need IC for phone compilation? |
15:05:17 | disruptek | how can i test the performance improvement? |
15:05:40 | FromDiscord | <kodkuce> define ages :) , anyway when it finish all build goes to /bin right |
15:05:41 | * | endragor quit (Ping timeout: 256 seconds) |
15:05:45 | FromDiscord | <kodkuce> i can delete rest stuff |
15:06:15 | disruptek | Araq, clyybber: i really need help on this mangling thing. |
15:07:24 | FromDiscord | <Clyybber> tell me |
15:07:43 | FromDiscord | <Clyybber> the problems you are encountering |
15:07:55 | FromDiscord | <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:56 | FromDiscord | <Clyybber> you solved the TaintedString thing right? |
15:08:00 | disruptek | no. |
15:08:19 | disruptek | it passes on linux but not on osx. because TaintedString. |
15:08:25 | FromDiscord | <Clyybber> huh |
15:08:31 | disruptek | which also breaks cpp signatures. |
15:08:35 | FromDiscord | <Clyybber> why would that be arch dependent? |
15:08:35 | FromDiscord | <Clyybber> ah |
15:08:46 | FromDiscord | <Clyybber> so what about TaintedString? |
15:08:59 | FromDiscord | <Clyybber> TaintedString is not special, its just a distinct type |
15:09:21 | disruptek | if you're satisfied with that, then i'm satisfied with that. |
15:09:28 | disruptek | sadly, i don't think osx users will be happy. |
15:09:32 | FromDiscord | <Clyybber> how does current mangling do it? Does TaintedString end up as string in the C ? |
15:10:26 | FromDiscord | <Clyybber> disruptek: I didn't quite understand the problem last time I think |
15:10:28 | disruptek | mangling uses the symbol name, what else, so add() turns into add_seqTaintedString_system(seqTaintedString *someseq, TaintedString *somes) |
15:10:35 | FromDiscord | <Clyybber> Ok |
15:10:52 | FromDiscord | <Clyybber> And why does that cause problems? |
15:11:05 | disruptek | because only seqString is defined. |
15:11:07 | disruptek | or vice-versa. |
15:11:15 | disruptek | i do have a linux repro using testutils. |
15:11:28 | FromDiscord | <Clyybber> seqString? |
15:11:37 | disruptek | nim cpp -f -r ntu test tests -- from inside the testutils repo. |
15:11:39 | FromDiscord | <Clyybber> Ah |
15:11:59 | FromDiscord | <Clyybber> Hmm, what does current mangling do then? |
15:12:11 | disruptek | mangling collapses some types now so that shortening works better for 1st-param-of-proc heuristic. |
15:12:31 | disruptek | /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:36 | FromDiscord | <Clyybber> I mean current mangling as in the one thats used in devel |
15:12:53 | disruptek | current mangling just uses type_hash everywhere. |
15:13:07 | FromDiscord | <Clyybber> Yeah, but what about the name |
15:13:24 | FromDiscord | <Clyybber> is it add(seqString) or add(seqTaintedString) in the old mangling? |
15:13:53 | disruptek | lemme see exactly what it is... |
15:15:32 | disruptek | it's add__garbage -- a hash of the add proc, of course, followed by tySeq___garbage -- the hash of the sequence type. |
15:15:52 | FromDiscord | <Delta231> are nim strings mutable? |
15:16:27 | Zevv | yes |
15:17:28 | FromDiscord | <Delta231> but why? |
15:17:39 | FromDiscord | <Delta231> aren't immutable strings better for performance? |
15:23:16 | Zevv | nope |
15:23:24 | Zevv | what makes you think that? |
15:23:55 | alehander92 | disruptek |
15:25:19 | Zevv | disruptek is always putting wrong ideas in peoples minds |
15:25:23 | Zevv | we all know that |
15:25:46 | Zevv | Delta231: basically, a string is a string, but "performance" is a wide subject. |
15:26:05 | Zevv | If you have a 100Mb string and you want to add one line. What do you think is faster? Mutable or unmutable strings? |
15:26:19 | alehander92 | sorry I lied |
15:26:27 | alehander92 | i wanted to talk to disruptek |
15:26:34 | alehander92 | not to answer zevv's question |
15:27:05 | FromGitter | <mratsim> @disruptek not only phones, nim-beacon-chain compile times start to get really long |
15:29:16 | FromDiscord | <kodkuce> does forewer mean like forewer cuz i think half hour passed |
15:30:04 | FromDiscord | <Delta231> https://stackoverflow.com/questions/8680080/why-are-python-strings-immutable-best-practices-for-using-them |
15:31:01 | alehander92 | kodkuce what are you compiling |
15:31:06 | FromGitter | <mratsim> Forever depends on your codebase size. |
15:31:17 | FromGitter | <mratsim> Not Chrome-forever |
15:31:25 | FromDiscord | <Delta231> https://docs.python.org/3/faq/design.html#why-are-python-strings-immutable |
15:32:17 | Zevv | Delta231: Right. It does not talk about performance there. It talks about making programming easier |
15:32:23 | Zevv | because your strings don't change under your hands |
15:33:22 | FromGitter | <mratsim> I don't see any conclusive evidence to why immutable strings in those links |
15:33:30 | FromDiscord | <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:37 | FromDiscord | <Delta231> thread safety etc |
15:33:51 | FromGitter | <mratsim> what immutable strings is strong at is ownership and multithreading. Something Python doesn't require |
15:34:24 | FromGitter | <mratsim> Also their claim about speed has a hidden assumption on a garbage collector |
15:35:10 | FromGitter | <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:12 | FromDiscord | <Clyybber> disruptek: I think we should solve this by generating "wrapper procs" for distinct types |
15:36:17 | * | reversem3 joined #nim |
15:36:44 | FromDiscord | <Clyybber> no wait |
15:36:46 | FromDiscord | <kodkuce> @alehander42 nim on quemu arm64 |
15:37:10 | FromDiscord | <Clyybber> disruptek: Why not just generate casts? |
15:37:21 | FromDiscord | <Clyybber> and if they are the same type just leave them out |
15:37:25 | FromDiscord | <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:36 | FromGitter | <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:32 | FromDiscord | <Clyybber> disruptek: If add_seqTaintedString is generated seqTaintedString should be defined |
15:38:53 | FromGitter | <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:14 | reversem3 | If I wanted to create a personal database with all my notes and commands , what would be the best way to create that? |
15:41:49 | FromDiscord | <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:24 | FromDiscord | <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:25 | FromDiscord | <kodkuce> it finished yey |
15:44:39 | FromDiscord | <kodkuce> only bad thing i did not get nimble form what i see |
15:45:42 | reversem3 | what about a UI , I love command line but maybe better to learn a UI library also |
15:48:46 | FromDiscord | <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:18 | reversem3 | yeah 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:22 | reversem3 | I though there was supposed to be a nim gui lib with the stdlib , is that not a thing anymore? |
15:52:38 | FromDiscord | <haxscramper> Yes, there was one - bindings for IUP |
15:53:18 | FromDiscord | <kodkuce> omg i acidencly ctrl c and closed qemu-alpine now i have to w8 again |
15:53:38 | FromDiscord | <haxscramper> About documentation - most likely gintro, but I don't really know actually |
15:54:06 | FromDiscord | <Clyybber> disruptek ping |
15:55:34 | disruptek | clyybber: sorry, red-head showed up. girls always trump code. |
15:59:33 | disruptek | it's a generics problem afaik, but the question is why taintedstring is so variable. |
15:59:41 | FromDiscord | <Clyybber> lol |
16:00:24 | FromDiscord | <Clyybber> disruptek: IMO the solution is either to resolve to the typename of the distinct base or to generate the appropriate aliases |
16:00:27 | FromDiscord | <Clyybber> I prefer the latter |
16:00:27 | disruptek | the problem with cpp signatures would be nice to solve, if possible. |
16:00:38 | FromDiscord | <Clyybber> Whats the problem there again? |
16:00:53 | disruptek | cpp embeds the type of the first argument in the symbol. |
16:01:31 | * | femtotones joined #nim |
16:01:37 | FromDiscord | <Clyybber> yeah, but whats the problem |
16:01:37 | disruptek | when 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:48 | disruptek | the only way to do that (currently) is to hash them. |
16:01:58 | FromDiscord | <Clyybber> ok |
16:01:59 | disruptek | the best idea i could come up with is a global registry. |
16:02:06 | disruptek | i kinda hate it, though. |
16:02:17 | FromDiscord | <Clyybber> why would they not match when not hasing? |
16:02:20 | disruptek | so currently, procs and tuples are just hashed. |
16:02:22 | FromDiscord | <Clyybber> because we prepend the module name? |
16:02:44 | disruptek | because proc types can be different due to flags and whatnot. |
16:02:57 | FromDiscord | <Clyybber> well if they are different they shouldn't match? |
16:03:22 | FromDiscord | <Clyybber> flags that don't influence the equality shouldn't influence the signature probably |
16:03:28 | disruptek | your logic makes sense but it doesn't match my reality. |
16:03:43 | FromDiscord | <Clyybber> the question is why it doesn't match the reality |
16:03:57 | Zevv | /his/ reality |
16:04:13 | disruptek | good evening, zevv |
16:04:42 | FromDiscord | <Clyybber> sup zevv |
16:05:14 | Zevv | not much. I'm soo done already for the day |
16:05:16 | FromDiscord | <Clyybber> zevvs part of my gangg amiritte? |
16:05:34 | Zevv | sure, I'll be you groupie |
16:05:38 | disruptek | clyybber: you have some work to do if you wanna stay in the gang. |
16:05:43 | FromDiscord | <Clyybber> senseless double letter gang |
16:05:58 | FromDiscord | <Clyybber> lets work / |
16:06:08 | FromDiscord | <Clyybber> why does it not match your reality |
16:06:19 | disruptek | well, we can enable it and see what happens, if you want. |
16:06:37 | disruptek | but i'd rather fix this tainted bug first. |
16:06:47 | disruptek | let me also enumerate the other bugs i know about: |
16:07:10 | FromDiscord | <Clyybber> ok lets do the distinct type bug first |
16:07:15 | disruptek | there'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:36 | disruptek | there'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:59 | disruptek | it's not a distinct type bug. it's specifically taintedstring. |
16:08:06 | FromDiscord | <Clyybber> what |
16:08:09 | FromDiscord | <Clyybber> that doesn't make sense |
16:08:19 | disruptek | welcome to /my/ reality. |
16:08:20 | FromDiscord | <Clyybber> taintedstring is not magic |
16:08:34 | FromDiscord | <Clyybber> nah nah, you paint your reality as you see fit :p |
16:08:45 | FromDiscord | <Clyybber> the reality theres something broken about all distinct types |
16:08:51 | disruptek | look, do you think distincts have something to do with platform? |
16:09:05 | disruptek | is that an easier truth to add to your reality? |
16:09:20 | disruptek | because, y'know, the package tests *ALL* pass on linux. |
16:09:22 | FromDiscord | <Clyybber> nope, but probably the CI compiles with taintedstring mode or something |
16:09:26 | FromDiscord | <Clyybber> but only on one platform |
16:09:45 | disruptek | so you think that all the other uses of distinct are somehow fine. |
16:09:52 | disruptek | that's a miracle, right? |
16:10:04 | disruptek | arraymancer, chronos, all fine. |
16:10:14 | FromDiscord | <Clyybber> so it is, nobody uses tainted string mode |
16:10:29 | disruptek | what? |
16:10:54 | FromDiscord | <Clyybber> what what? |
16:10:55 | disruptek | i can't tell if you're conceding the point wisely or stubbornly disagreeing. |
16:11:58 | disruptek | you can see in the mac test output that, for example, environment stuff doesn't work due to type name mismatches. |
16:12:04 | disruptek | clearly a taint mode thing. |
16:12:28 | FromDiscord | <Clyybber> yeah, my suspicion is that taint mode is only tested on mac |
16:12:31 | FromDiscord | <Clyybber> but I didn't check |
16:12:42 | disruptek | i looked and i couldn't figure it out. |
16:13:03 | disruptek | i thought it might be clang-based but my test was negative. |
16:14:13 | FromDiscord | <Clyybber> so you can't repro the bug even with --taintMode:on ? |
16:14:28 | disruptek | i can repro it in testutils locally /without/ taint mode. |
16:14:38 | FromDiscord | <Clyybber> whats testutils |
16:14:44 | disruptek | !repo testutils |
16:14:45 | disbot | https://github.com/status-im/nim-testutils -- 9nim-testutils: 11testrunner et al 15 8⭐ 3🍴 7& 1 more... |
16:14:54 | FromDiscord | <Clyybber> ah |
16:14:58 | disruptek | it's the test framework i pulled out of chronicles for status. |
16:15:05 | FromDiscord | <Clyybber> Hmm, and whats the mac CI using? |
16:15:08 | FromDiscord | <Clyybber> taintmode or nah? |
16:15:18 | disruptek | i could find no evidence of any explicit setting. |
16:15:22 | FromDiscord | <Clyybber> its probably some IO code thats behind defined(osx) |
16:15:30 | FromDiscord | <Clyybber> which causes the bug |
16:16:09 | FromDiscord | <Clyybber> you can try -d:osx or whatever it is that one needs |
16:16:26 | disruptek | i can repro it in testutils with g++ on linux. |
16:16:37 | disruptek | no taint options. |
16:16:44 | FromDiscord | <Clyybber> Yeah, I get that |
16:16:46 | * | leorize joined #nim |
16:16:58 | FromDiscord | <Clyybber> well it doesn't matter which one we minimize |
16:17:13 | FromDiscord | <Clyybber> either you minimze the code thats behind defined(osx) or the testutils code |
16:17:24 | leorize | o/ |
16:17:29 | FromDiscord | <Clyybber> o/ |
16:17:37 | disruptek | dude. |
16:18:47 | leorize | so what is this issue that you wanna talk to me about? |
16:18:53 | FromGitter | <mratsim> constantine is distinct all the way down: https://github.com/mratsim/constantine/blob/master/constantine/primitives/constant_time_types.nim#L12 |
16:19:08 | FromGitter | <mratsim> Also for some reason distinct uint64 are broken in the VM |
16:19:24 | disruptek | visibility 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:33 | FromGitter | <mratsim> when you do a function call with them, their value magically changes |
16:19:45 | FromDiscord | <Clyybber> mratsim: weird, can you report it? |
16:20:01 | FromDiscord | <Clyybber> disruptek: so? |
16:20:09 | FromGitter | <mratsim> I think it's already reported, let me check |
16:20:14 | FromDiscord | <Clyybber> ah ok |
16:20:20 | disruptek | so? |
16:20:30 | FromDiscord | <Clyybber> taintedstring |
16:20:40 | leorize | disruptek: where can I find the error? |
16:20:54 | disruptek | leorize: should be in the nim test suite under my mangling tests. |
16:20:59 | disruptek | !pull author:disruptek mangling |
16:21:00 | disbot | https://github.com/nim-lang/Nim/pull/14632 -- 3porting name mangling from ic effort |
16:21:05 | leorize | and copying insufficent amount of memory shouldn't be a problem... |
16:21:17 | leorize | exporting just means that the variable is marked for export |
16:21:24 | disruptek | well, that was my naive interpretation. this is where you come in. |
16:21:50 | disruptek | i actually thought it was fixed and maybe it actually works fine in ci, but it fails for me locally. |
16:22:34 | disruptek | iirc 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:21 | reversem3 | sweet "blog" works now with prologue , thanks @xflywind |
16:23:36 | leorize[m] | disruptek: ci is passing for linux on that test... |
16:23:57 | FromGitter | <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:01 | disruptek | clyybber: the seq is defined as seq[string] in testutils. indeed, the code generated is seq[string]. but system defines TaintedString. |
16:24:18 | disruptek | leorize[m]: okay, ty for looking. we'll assume it's fixed until proven otherwise. |
16:24:35 | leorize[m] | if you can reproduce it locally then I'll test that on my machine later |
16:26:01 | disruptek | clyybber: it's because the option parser from stdlib results in TaintedString. |
16:26:03 | FromDiscord | <Clyybber> disruptek: Yeah. lets minimize it first, You can repro it with testutils independent of the C compiler, right? |
16:26:11 | disruptek | yes. |
16:26:12 | FromDiscord | <Clyybber> disruptek: Aha! |
16:26:19 | leorize | disruptek: are you going to document how the mangling is done in the manual later? |
16:26:28 | disruptek | leorize: just tell me where. |
16:26:43 | disruptek | it's fairly complex, though i can simplify the description. |
16:26:47 | FromDiscord | <Clyybber> I would document that in internals |
16:26:57 | FromDiscord | <Clyybber> instead of the manual |
16:26:57 | leorize | nah, it should be a part of the spec |
16:27:04 | leorize | so that interop can be done reliably |
16:27:12 | disruptek | i dunno about that. |
16:27:15 | FromDiscord | <Clyybber> IMO it shouldn't be part of the spec |
16:27:20 | disruptek | agree. |
16:27:20 | FromDiscord | <Clyybber> if you want interop you should exportc |
16:27:24 | disruptek | exactly. |
16:27:42 | leorize | `$1` in exportc is the problem |
16:27:49 | disruptek | this stuff is highly unreliable, even if it's more reliable than it was. |
16:27:55 | disruptek | we'd need an RFC to spec it. |
16:28:19 | leorize | $1 resolves to the "mangled" symbol iirc |
16:28:31 | reversem3 | do we always have to have a dbconnect when using db_postrgres for databases ? , |
16:28:41 | leorize | it's used in the stdlib for nimrtl |
16:28:49 | disruptek | $1 is cheap-mangle; basically, making sure it's a valid identifier. |
16:28:59 | disruptek | mangle(s: string): string |
16:28:59 | reversem3 | I'm looking at this for a reference https://nim-lang.org/docs/db_postgres.html |
16:29:08 | FromDiscord | <Clyybber> nimrtl should be gone with arc |
16:29:20 | disruptek | leorize: afaik anyway. |
16:29:32 | leorize | @Clyybber nope it won't |
16:30:09 | leorize | we still have the allocator in there |
16:30:24 | * | shad0w_ quit (Remote host closed the connection) |
16:30:52 | FromDiscord | <Clyybber> yeah, but we don't need the nimrtl pragma |
16:31:10 | leorize | ? |
16:31:12 | FromDiscord | <Clyybber> but its not related to interop with C anyways |
16:31:27 | leorize | it's useful for code sharing between nim libraries |
16:32:26 | leorize | build several .so and have them linked to libnimrtl is much more economical than duplicating the stdlib in the memory several times |
16:32:46 | FromDiscord | <Clyybber> LTO should accomplish the same thing |
16:32:58 | FromDiscord | <Clyybber> unless you are dynamically linking |
16:33:10 | leorize | I'm talking about the use case for plugins |
16:33:23 | FromDiscord | <Clyybber> Ok, but how is any of that related to mangling? |
16:33:38 | disruptek | it's not. |
16:34:02 | leorize | so we can have a common mangling for linking with nimrtl |
16:34:20 | leorize | well it's not urgent in anyway to spec this out since there's only one nim compiler |
16:34:24 | FromDiscord | <Clyybber> yeah |
16:34:47 | disruptek | you're arguing for a spec that won't change between compiler versions, though. |
16:35:07 | disruptek | the current mangler cannot achieve this, btw. |
16:35:57 | FromDiscord | <Clyybber> disruptek: and? Got it down to something small and explosive? |
16:36:11 | disruptek | no. |
16:36:20 | disruptek | i'm trying to understand how this is a thing. |
16:36:42 | disruptek | there's no need to minimize it, afaik. |
16:36:58 | FromDiscord | <Clyybber> if you think so |
16:37:08 | FromDiscord | <Clyybber> IMO its always much easier to work with something minimized |
16:38:02 | FromDiscord | <Clyybber> and minimizing isn't something that requires a lot of brainpower so you can do something else in that time |
16:38:16 | disruptek | what do you suggest? |
16:38:40 | * | leorize quit (Quit: WeeChat 2.8) |
16:39:56 | disruptek | here'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:02 | disruptek | the 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:14 | disruptek | ie. the type name of the first argument. |
16:41:26 | * | endragor joined #nim |
16:42:51 | * | Trustable joined #nim |
16:43:38 | disruptek | i guess it might be a nim bug; shouldn't we be defining this generic? |
16:44:12 | disruptek | or should we make testutils cast this value? |
16:44:28 | FromDiscord | <Clyybber> no need to cast if TaintedString = string |
16:44:31 | disruptek | or should we make testutils convert this value? |
16:44:49 | FromDiscord | <Clyybber> not either. This is a nim bug |
16:44:56 | * | leorize joined #nim |
16:46:00 | FromDiscord | <Clyybber> also why is it add_seqString_system)(seqTaintedString |
16:46:04 | FromDiscord | <Clyybber> shouldn't these names match? |
16:46:19 | disruptek | the type of the seq is seq[string] |
16:46:40 | FromDiscord | <Clyybber> no its seq[TaintedString] ? |
16:47:13 | FromDiscord | <Clyybber> I mean clearly the first arg is seqTaintedString |
16:47:28 | FromDiscord | <Clyybber> but its not when appended to the proc signature |
16:47:29 | disruptek | yes, but the seq is actually seq[string]. |
16:47:43 | FromDiscord | <Clyybber> Yes, but why skip distincts when appending it to the signature |
16:47:50 | FromDiscord | <Clyybber> to the proc name I mean |
16:48:27 | disruptek | we should be mangling them the same in any event. |
16:48:32 | FromDiscord | <Clyybber> yeah |
16:48:53 | * | endragor quit (Remote host closed the connection) |
16:49:20 | * | endragor joined #nim |
16:49:57 | disruptek | lemme not skip distincts and see what changes. |
16:50:37 | disruptek | because 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:01 | disruptek | maybe 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:44 | disruptek | that's a pretty good theory. |
16:54:49 | * | endragor quit (Ping timeout: 264 seconds) |
16:55:27 | * | cyraxjoe joined #nim |
17:08:09 | FromDiscord | <whisperdev> Is there an obvious way how one could protect the nim binary from being identified as Nim program? |
17:08:59 | FromDiscord | <ShalokShalom> Code obfuscation? |
17:09:30 | FromDiscord | <whisperdev> would a C obfuscator work on a Nim c source file(s)? |
17:10:27 | leorize | what would be the use case for obfuscation though? |
17:11:09 | leorize | and I don't see why a C obfuscator wouldn't work, but it's not something I've tried |
17:12:05 | FromDiscord | <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:20 | leorize | if you try hard enough you can infer anything |
17:14:12 | FromDiscord | <Clyybber> disruptek: any progress? |
17:16:13 | disruptek | moving some param mangling around. |
17:19:58 | FromDiscord | <Clyybber> disruptek: Unrelated, but have a good name for a uint type without wraparound semantics? |
17:20:06 | FromDiscord | <Clyybber> I'm thinking suint or something |
17:20:41 | FromDiscord | <lqdev> @whisperdev what would be the use case? why would you want to protect the binary like that, what's the point? |
17:20:56 | disruptek | clyybber: seems like what we want. |
17:21:42 | disruptek | this mangle change isn't working yet, though. |
17:21:50 | FromDiscord | <Clyybber> why? |
17:22:05 | disruptek | we're mangling the proc too early. |
17:22:11 | disruptek | we're mangling the proc name too early. |
17:22:31 | FromDiscord | <Clyybber> so mangle the proc name twice? |
17:22:31 | disruptek | oh maybe i'm wrong. |
17:23:20 | leorize | @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:35 | leorize | other than that I'm not aware of any useful uses for it |
17:23:55 | FromDiscord | <lqdev> resisting hacks is not a good solution tho |
17:24:46 | disruptek | clyybber: mangling twice is hard because once you surrender the name, the counters are wrong. |
17:25:08 | disruptek | you really just want to reuse the symbol name once you've mangled it. |
17:26:51 | * | waleee-cl joined #nim |
17:27:54 | FromGitter | <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:55 | FromDiscord | <lqdev> you can `open` with the `maxItems` param, but there isn't a way of checking that after the channel is open. |
17:29:57 | FromDiscord | <lqdev> PRs welcome |
17:30:30 | FromDiscord | <Clyybber> disruptek: Ah, makes sense |
17:30:56 | FromDiscord | <whisperdev> @lqdev to protect against `strings` |
17:31:03 | disruptek | i tell you, i'm so tired of this code. |
17:31:45 | FromDiscord | <lqdev> @whisperdev i see. then you're in a bit of a pickle, as all the exception messages are shown there |
17:31:54 | FromDiscord | <lqdev> and afaik there's no easy way of getting rid of them |
17:32:18 | * | endragor joined #nim |
17:32:38 | FromDiscord | <whisperdev> Is there a switch that can remove exceptions? |
17:33:30 | FromDiscord | <whisperdev> I mean unhandled exceptions |
17:33:39 | disruptek | gah i'm dumb. |
17:33:50 | FromDiscord | <lqdev> well, nim already has dead code elimination |
17:33:58 | disruptek | so that's where all my code went. |
17:34:01 | FromDiscord | <lqdev> but a lot of procs can raise |
17:34:09 | FromDiscord | <lqdev> even opening a file |
17:34:09 | FromDiscord | <whisperdev> disruptek I thought you are the wonder boy of this channel |
17:34:17 | disruptek | the wut |
17:34:24 | FromDiscord | <whisperdev> the wonder boy |
17:34:27 | FromDiscord | <whisperdev> the wonder man? |
17:34:34 | FromDiscord | <whisperdev> Do you identify as a male? |
17:34:45 | disruptek | i think you're confusing me with someone else. |
17:35:06 | FromDiscord | <whisperdev> ZEVV? |
17:35:43 | FromDiscord | <kodkuce> omg noooooooooo |
17:35:44 | FromDiscord | <kodkuce> rror: unhandled exception: errno: 28 `No space left on device` [IOError] |
17:36:13 | FromDiscord | <whisperdev> How does Nim output work? If it compiles does it mean it will work? |
17:36:27 | FromDiscord | <lqdev> in most cases |
17:36:30 | Zevv | zupp |
17:36:37 | FromDiscord | <lqdev> it can raise at runtime |
17:36:42 | Zevv | ZUPP! |
17:36:42 | FromDiscord | <whisperdev> If I can compile on Sparc/Solaris will it work? |
17:36:53 | * | endragor quit (Ping timeout: 260 seconds) |
17:36:55 | disruptek | Zevv: you are the wunderkind. |
17:36:55 | FromDiscord | <lqdev> Zevv: ZUCC |
17:36:55 | * | gmaggior quit (Ping timeout: 246 seconds) |
17:37:18 | FromDiscord | <whisperdev> wunderjunge |
17:37:18 | FromDiscord | <lqdev> @whisperdev i wouldn't be so sure, you better check at least once |
17:37:27 | Zevv | verified |
17:37:32 | FromDiscord | <lqdev> after all, some C library you're wrapping might not have solaris support |
17:37:35 | Zevv | the latter half |
17:37:58 | FromDiscord | <whisperdev> But the STD could work? |
17:38:17 | disruptek | STDs usually work against me. |
17:38:22 | disruptek | ymmv |
17:39:29 | FromDiscord | <lqdev> @whisperdev if i were you i wouldn't really _trust_ the stdlib to support obscure backends like that |
17:39:35 | FromDiscord | <lqdev> :s/backends/OSs |
17:39:58 | FromDiscord | <whisperdev> So are you telling me the battle tested perl is still the king? |
17:40:07 | FromDiscord | <lqdev> maybe. |
17:40:15 | FromDiscord | <lqdev> no clue, haven't used perl. |
17:40:15 | Zevv | always will be |
17:40:40 | FromDiscord | <whisperdev> I thought Nim generates very dummy C code that "could work anywhere" |
17:40:46 | * | Jesin quit (Quit: Leaving) |
17:40:47 | FromDiscord | <lqdev> it's actually platform-specific |
17:40:55 | FromDiscord | <lqdev> due to conditional compilation and stuff |
17:41:04 | FromDiscord | <whisperdev> That's...bad. |
17:41:17 | FromDiscord | <Recruit_main707> there are cross compilation options |
17:41:21 | FromDiscord | <Recruit_main707> in the nim compiler |
17:41:21 | FromDiscord | <lqdev> so you can't just compile code generated for windows eg. to a linux ELF and expect it to work |
17:41:34 | FromDiscord | <lqdev> but keep in mind that C is just the IR |
17:41:52 | FromDiscord | <lqdev> so you can still cross-compile |
17:41:55 | FromDiscord | <whisperdev> I am thinking very basic stuff not something that is using "platform specific" code |
17:42:02 | FromDiscord | <lqdev> wdym basic stuff? |
17:42:03 | disruptek | whisperdev: it'll be fine. |
17:42:08 | disruptek | solaris/sparc is not obscure. |
17:42:12 | FromDiscord | <whisperdev> IO |
17:42:22 | FromDiscord | <lqdev> even something as basic as enumerating files in a directory is OS-specific |
17:42:34 | FromDiscord | <whisperdev> Is not that glibc specific? |
17:42:40 | FromDiscord | <lqdev> but IO is handled by libc, so _theoretically_, _just maybe_ it could work |
17:42:49 | FromDiscord | <lqdev> i haven't tried |
17:42:55 | disruptek | it'll be fine. |
17:43:15 | FromDiscord | <lqdev> because you don't expect the generated C to be portable. keep in mind you're compiling Nim, not C |
17:43:22 | FromDiscord | <whisperdev> Hmmm |
17:43:34 | FromDiscord | <lqdev> would you expect an arm binary to run on x86? no. |
17:43:37 | reversem3 | trying to upgrade to inim 6.0 http://pastebin.ws/1gop33 |
17:43:42 | FromDiscord | <whisperdev> @lqed |
17:44:01 | FromDiscord | <whisperdev> I would expect hello world C code to compile fine on x86 and arm just fine |
17:44:15 | reversem3 | I have tried with devel and stable both error out when trying to upgrade inim |
17:44:17 | * | Jesin joined #nim |
17:44:32 | Zevv | whisperdev: fair enough, I think you could expect that |
17:44:32 | FromDiscord | <lqdev> but you're not invoking the C compiler yourself |
17:44:36 | Zevv | doesnt it? |
17:44:43 | FromDiscord | <lqdev> nim invokes it for you |
17:44:50 | FromDiscord | <lqdev> so the C code shouldn't really worry you |
17:44:53 | * | femtotones quit (Ping timeout: 244 seconds) |
17:45:04 | FromDiscord | <lqdev> just use a compiler switch to change the architecture |
17:45:12 | FromDiscord | <lqdev> and the configs will handle everything |
17:45:35 | FromDiscord | <whisperdev> But yes you have a point. There are no guarantees. Especially when we are talking about io/network stuff |
17:45:53 | FromDiscord | <lqdev> a hello world would likely work though |
17:46:35 | FromDiscord | <lqdev> but i'm not really sure why you'd want to compile and link all the generated C yourself |
17:46:58 | FromDiscord | <Recruit_main707> there was also os:any |
17:47:08 | FromDiscord | <Recruit_main707> but im not sure whats its state |
17:47:13 | FromDiscord | <whisperdev> But I would expect whatever is supported by eg glibc would work |
17:47:51 | FromDiscord | <lqdev> you can always try yourself and see |
17:49:44 | FromDiscord | <whisperdev> What's the story with static binaries? |
17:49:49 | FromDiscord | <whisperdev> Do we still have to resort to musl? |
17:49:50 | disruptek | they are delicious. |
17:50:02 | FromDiscord | <whisperdev> And is not that slow? |
17:50:22 | FromDiscord | <lqdev> nim depends on having libc, so yes you have to use musl for the time being |
17:50:39 | FromDiscord | <lqdev> or some other lightweight, statically-linkable libc |
17:50:41 | * | gmaggior joined #nim |
17:50:50 | Zevv | ~os:any is just fine |
17:50:51 | disbot | os:any: 11just fine |
17:50:56 | disruptek | lol |
17:51:25 | FromDiscord | <whisperdev> Why does not disruptek write performant musl in Nim? |
17:51:41 | Zevv | yeah disruptek |
17:51:50 | disruptek | no, he said !disruptek. |
17:51:55 | disruptek | that means all of you. |
17:52:37 | FromDiscord | <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:11 | FromDiscord | <whisperdev> But glibc is unix/linux specific 😦 |
17:53:22 | disruptek | boo hoo |
17:53:34 | FromDiscord | <lqdev> so what? |
17:53:39 | FromDiscord | <lqdev> most distros use glibc. |
17:53:52 | FromDiscord | <lqdev> so all libraries there are compiled with glibc. |
17:54:33 | FromDiscord | <lqdev> ah, windows. |
17:54:55 | FromDiscord | <lqdev> i don't use windows. all of my stuff works on windows flawlessly anyways. |
17:55:04 | FromDiscord | <lqdev> i guess that's a good sign. |
17:55:21 | FromDiscord | <whisperdev> It's a good sign. |
17:55:39 | FromDiscord | <lqdev> see, fully statically linked are just not that much of a priority. fixing critical compiler bugs is more important |
17:55:59 | FromDiscord | <JSGRANT> Just say it targets 'Windows' but in small letters (with WSL) lol |
17:56:25 | FromDiscord | <whisperdev> But fully statically linked binaries are possible it's just a performance issue because of musl |
17:56:44 | FromDiscord | <whisperdev> @JSGRANT That's not a solution if you dont have WSL available |
17:58:34 | FromDiscord | <JSGRANT> That was also a joke; lol |
18:00:21 | FromDiscord | <whisperdev> Oh sorry |
18:00:27 | FromDiscord | <whisperdev> "haha" |
18:00:31 | * | disruptek throbs. |
18:00:46 | * | idf braaps |
18:02:01 | FromDiscord | <whisperdev> Is Karax something worth investing into? |
18:02:12 | idf | Yes. |
18:02:43 | FromGitter | <mratsim> Nim works fine on windows or mac and they don't have glibc |
18:03:00 | disruptek | most of the bugs are written for windows. |
18:04:42 | FromDiscord | <Clyybber> disruptek: progresas? |
18:04:42 | FromGitter | <mratsim> Ive seen more compiler bugs as in semcheck or symbol resolution than windows bug |
18:04:53 | * | shad0w_ joined #nim |
18:05:05 | FromDiscord | <JSGRANT> Reminded me of this https://twitter.com/deech/status/1302792901274087424 ; Is this even true -- is Araq 'prefered platform' Windows? |
18:05:06 | FromDiscord | <whisperdev> @disruptek Bradley Spengler says Windows is a bit more secure than Linux anyway |
18:05:26 | FromDiscord | <JSGRANT> Another question, is anyone's "prefered platform" Windows? lol |
18:05:49 | FromDiscord | <JSGRANT> Maybe the C# / F# folks |
18:05:52 | idf | @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:29 | FromDiscord | <Rika> @JSGRANT AFAIK yes he uses windows |
18:06:51 | FromDiscord | <JSGRANT> via WSL? (again joking) lol |
18:07:38 | FromDiscord | <whisperdev> I could only make myself use Elementary OS or Ubuntu but even they themselves suck |
18:08:26 | FromDiscord | <lqdev> @JSGRANT yeah 4raq prefers windows |
18:08:38 | disruptek | clyybber: trying to track down this early mangle of the proc |
18:09:03 | FromDiscord | <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:24 | shad0w_ | @whisperdiv pop_os is nice-ish? |
18:09:42 | FromDiscord | <JSGRANT> I get using it for convience reasons; But "preferd platform" seems like a bit much |
18:10:12 | FromDiscord | <Rika> Prolly easier for those who already have their work flows work on windows |
18:10:20 | FromDiscord | <Clyybber> theres no preferred nim platform |
18:10:27 | disruptek | of course there is. |
18:10:32 | FromDiscord | <JSGRANT> RodOS |
18:10:40 | FromDiscord | <lqdev> wut |
18:10:45 | FromDiscord | <Clyybber> disruptek: no. I prefer linux and araq prefers windows |
18:10:50 | FromDiscord | <Avatarfighter> What’s good everyone |
18:11:00 | FromDiscord | <Clyybber> and leorize prefers haiku |
18:11:07 | disruptek | araq is simply wrong. |
18:11:08 | FromDiscord | <Avatarfighter> Of course nim has a perfect platform |
18:11:13 | FromDiscord | <JSGRANT> Does Nim actually work on Haiku? |
18:11:14 | idf | I prefer templeos |
18:11:21 | FromDiscord | <Avatarfighter> its what ever it works on 👍 |
18:11:24 | FromDiscord | <Clyybber> there si not preferring; its not ike theres a tradeoff to be made |
18:11:34 | FromDiscord | <Clyybber> (edit) 'si not' => 'is no' |
18:11:38 | FromDiscord | <whisperdev> I just dont want to care about the OS at all 😦 |
18:11:44 | FromDiscord | <Clyybber> and you don't have to |
18:11:46 | FromDiscord | <Avatarfighter> ive heard that using arch makes you good at coding so YMMV |
18:11:48 | voidpi | let's pray for Araq's OS choice |
18:11:49 | FromDiscord | <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:56 | FromDiscord | <Rika> As long as it's thoroughly tested it should be good |
18:12:12 | FromDiscord | <Rika> Lq is just really pessimistic I assume |
18:12:14 | FromDiscord | <whisperdev> @Clyybber I do because things usually dont work out of the box on Linux |
18:12:27 | FromDiscord | <Clyybber> maybe its time for you to actually try nim :) |
18:13:13 | FromDiscord | <treeform> @disruptek I am here every day, what do you mean? No one pings me so I don't respond. |
18:13:16 | disruptek | i use linux because i can easily code whatever i want. |
18:13:20 | FromDiscord | <Avatarfighter> What was the original discussion |
18:13:20 | FromDiscord | <lqdev> @Rika i'm pessimistic by default because i haven't tested it first hand |
18:13:27 | disruptek | treeform: we like to hear your input. |
18:13:41 | FromDiscord | <Avatarfighter> @treeform i can ping you into all the petty arguments if you’d like its pretty comical |
18:13:45 | FromDiscord | <whisperdev> @treeform I wanted support on your asyncss 😄 |
18:13:51 | FromDiscord | <whisperdev> asyncssh* |
18:13:51 | FromDiscord | <JSGRANT> Oooookay, I have to sadly get ready for my 10-12 hour shift; Peace peoople |
18:14:04 | FromDiscord | <Avatarfighter> enjoy @JSGRANT hope to see you back here soon |
18:14:08 | FromDiscord | <treeform> @disruptek you did not ping me correctly 🙂 |
18:14:09 | FromDiscord | <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:21 | disruptek | treeform: eh, get a real client. |
18:14:21 | FromDiscord | <Avatarfighter> i was kidding lol |
18:14:31 | FromDiscord | <Avatarfighter> imagine not using Solaris smh |
18:14:44 | FromDiscord | <treeform> real clients don't work in guest mode on my locked down work computer |
18:14:52 | disruptek | not my problem. |
18:14:59 | FromDiscord | <lqdev> @Avatarfighter you know how hard it is to convey jokes through text amirite |
18:15:03 | FromDiscord | <whisperdev> Not my chair. Not my problem amr? |
18:15:11 | disruptek | look, you had your chance to hire me at reddit. |
18:15:11 | FromDiscord | <treeform> I made my own chair 🙂 |
18:15:23 | FromDiscord | <Avatarfighter> @lqdev ik ill add emojis to convey my humor lmao |
18:15:23 | FromDiscord | <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:24 | FromDiscord | <whisperdev> treeform is cto at reddit? 😮 |
18:15:31 | FromDiscord | <lqdev> or `/s` |
18:15:37 | FromDiscord | <Avatarfighter> 😳 |
18:15:42 | disruptek | treeform is hot shit. |
18:15:44 | FromDiscord | <treeform> @whisperdev no I am all of the board directors |
18:16:17 | FromDiscord | <whisperdev> @treeform does asyncssh work on windows? 😊 |
18:16:29 | FromDiscord | <treeform> @whisperdev I don't think so |
18:16:34 | FromDiscord | <whisperdev> 😢 |
18:16:45 | FromDiscord | <treeform> it requires libssh2 so you got to get that some how |
18:16:46 | disruptek | there's no libssh2 on windows iirc. |
18:16:54 | disruptek | JBB supplies it, now. |
18:17:29 | FromDiscord | <whisperdev> They have includes for windows. I just checked |
18:17:59 | FromDiscord | <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:00 | disruptek | clyybber: it's mangling procs before it even generates the header. it's maddening. |
18:18:25 | * | endragor quit (Ping timeout: 240 seconds) |
18:18:33 | FromDiscord | <whisperdev> @treeform That's unfortunate. Ill just use Go then 😦 |
18:18:44 | FromDiscord | <Avatarfighter> 😳 |
18:19:47 | idf | traitor |
18:19:59 | disruptek | .kick whisperdev |
18:20:02 | disruptek | oops |
18:21:21 | FromDiscord | <whisperdev> Hey I am not the wonder boy here I cant figure it out myself |
18:21:47 | disruptek | Zevv: he wants your help, wonder boy. |
18:21:54 | FromDiscord | <treeform> I just used the libssh2 api. I really did not add much to it. |
18:22:18 | FromDiscord | <whisperdev> I have to compile libssh2 as DLL? |
18:22:26 | FromDiscord | <treeform> you do? |
18:22:41 | FromDiscord | <Avatarfighter> That was a question |
18:23:06 | FromDiscord | <Avatarfighter> Can i get a link to asyncssh |
18:23:14 | FromDiscord | <Avatarfighter> !repo asyncssh |
18:23:15 | disbot | https://github.com/treeform/asyncssh -- 9asyncssh: 11SSH and run commands on other servers asynchronously for Nim. 15 18⭐ 0🍴 7& 1 more... |
18:24:31 | FromDiscord | <Avatarfighter> also sorry about that random message i just switched to my phone and it sent |
18:24:46 | FromDiscord | <Avatarfighter> Disruptek: how goes the mangling |
18:34:25 | disruptek | clyybber has been helpful. |
18:35:31 | disruptek | but i pulled a muscle in my back moving an iron and marble stove. gotta stretch it out in a minute. |
18:40:10 | disruptek | iron and marble is a pretty heavy combination. |
18:41:54 | FromDiscord | <juan_carlos> It runs with Rust |
18:42:51 | disruptek | painful indeed. |
18:52:52 | * | narimiran joined #nim |
18:54:18 | FromDiscord | <ThothLoki> ok.....easiest way to upgrad nim? i am rocking 1.2 right now. do i just need to download and reinstall? |
18:54:53 | FromDiscord | <haxscramper> `choosenim update stable` |
18:55:49 | FromDiscord | <ThothLoki> wonder if it isnt in my path on my work computer......... |
18:55:53 | FromDiscord | <ThothLoki> that didnt work |
18:56:07 | FromDiscord | <ThothLoki> i probably fucked it up when i set it up last time |
18:56:16 | disruptek | ~gitnim |
18:56:17 | disbot | gitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek |
18:58:20 | FromDiscord | <juan_carlos> How do I update by git short hash on gitnim?. |
18:58:41 | FromDiscord | <Clyybber> disruptek: I think you missed it last time I asked you this |
18:58:54 | disruptek | git nim 2dd06cb1 |
18:59:03 | FromDiscord | <Clyybber> lol? |
18:59:06 | FromDiscord | <Clyybber> we have some problems when we turn proc params into syms |
18:59:19 | disruptek | that's a short hash git nim update to 1.2.7 from 9/13. |
18:59:35 | disruptek | clyybber: yeah, i didn't understand your question. |
18:59:51 | FromDiscord | <Clyybber> because if some macro author would copy a typed proc and change its name |
18:59:57 | FromDiscord | <Clyybber> and return both declarations |
19:00:04 | FromDiscord | <Clyybber> they would share their param syms |
19:00:18 | disruptek | yeah. |
19:00:24 | FromDiscord | <Clyybber> which is wrong |
19:00:28 | disruptek | right. |
19:00:46 | disruptek | i have a desym filter in cps for this. |
19:00:58 | disruptek | but, it doesn't help... enough. |
19:01:06 | FromDiscord | <Clyybber> ah, yeah I was thinking about adding a refreshTree to macros.nim |
19:01:18 | FromDiscord | <Clyybber> which would act like copyTree, but would also give us refreshedSyms |
19:01:36 | disruptek | we wouldn't need to re-sem them? |
19:01:44 | FromDiscord | <Clyybber> nope |
19:01:51 | disruptek | that would be a win, certainly. |
19:02:05 | * | Jesin quit (Quit: Leaving) |
19:02:17 | FromDiscord | <Clyybber> it should be relatively simple, just a recursive copyTree with a few genSym mixed in |
19:02:30 | disruptek | i have some code that just does substitution of individual symbols. i could just use that for the params, yes? |
19:02:34 | disruptek | same effect? |
19:02:59 | FromDiscord | <Clyybber> yeah, I think so |
19:03:46 | disruptek | okay, 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:52 | disruptek | maybe macroutils is better. |
19:03:59 | FromDiscord | <Clyybber> but this is fundamental |
19:04:15 | disruptek | you say that, but it hasn't been fixed until now. |
19:04:23 | disruptek | so i dunno how many people could be struggling with this. |
19:04:27 | FromDiscord | <Clyybber> well, it didn't turn up until my PR |
19:04:35 | disruptek | that's fair. |
19:04:41 | disruptek | well, up to you. |
19:04:53 | disruptek | jc: doesn't that work for you? |
19:04:56 | FromDiscord | <Clyybber> I would like to get Araqs opinion on the whole thing |
19:05:03 | disruptek | yeah. |
19:05:30 | FromDiscord | <Clyybber> because it could be possible to just refresh a sym automagically if we detect it would be illegally reused |
19:05:54 | FromDiscord | <ThothLoki> nvm. totally forgot about scoop |
19:06:54 | FromDiscord | <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:27 | disruptek | it would be useful to have access to that feature from macros. |
19:07:34 | FromDiscord | <Clyybber> but theres an issue |
19:07:41 | disruptek | maybe only giving us a way to seal the sym. |
19:08:15 | FromDiscord | <Clyybber> because if a macro generates: var sym111: int; var sym111: uint; echo sym111 |
19:08:29 | FromDiscord | <Clyybber> the compiler would detect the illegal symbol reuse in the second declaration |
19:08:38 | stisa[m] | is there an easy way to see what the ast looks like after compiler transformations are applied? |
19:08:41 | stisa[m] | Possibly without writing my own own compiler pass and calling renderTree |
19:08:42 | FromDiscord | <Clyybber> and would do this: var sym111: int; var sym112 |
19:08:53 | FromDiscord | <Clyybber> but now what does `echo sym111` refer to? |
19:08:53 | disruptek | eh the seal should last for the sem pass and that's it. that macro code is obvs broken. |
19:09:13 | FromDiscord | <Clyybber> stisa: Yeah, getImplTransformed |
19:09:35 | disruptek | bbiab |
19:09:51 | FromDiscord | <Clyybber> disruptek: Yeah, probably best to just use it for error messages |
19:13:26 | stisa[m] | @Clyybber oh nice, thanks |
19:13:43 | * | shad0w_ quit (Ping timeout: 260 seconds) |
19:14:03 | stisa[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:16 | disruptek | tell me something good. |
20:15:20 | Prestige | work will be over soon disruptek. That's about it |
20:15:52 | disruptek | is it time for the weekend already? |
20:18:56 | Prestige | no but 5pm. haha |
20:26:54 | * | Cthalupa joined #nim |
20:33:49 | * | solitudesf quit (Ping timeout: 264 seconds) |
20:43:08 | disruptek | clyybber: zero_functional |
20:43:53 | alehander92 | what |
20:44:01 | alehander92 | i hope with views |
20:44:07 | * | lritter quit (Ping timeout: 265 seconds) |
20:44:15 | alehander92 | we can get a simpler functional thin |
20:46:51 | disruptek | remember, it's not about length. girth is what counts. |
20:46:55 | alehander92 | dude |
20:49:16 | FromDiscord | <Clyybber> disruptek: zero_functional what? |
20:49:21 | alehander92 | thing* |
20:49:28 | FromDiscord | <Clyybber> is your mangling zero functional :PP |
20:49:30 | alehander92 | one_imperative |
20:49:30 | disruptek | it crashes on your pr. |
20:49:40 | alehander92 | beta_declarative |
20:49:42 | FromDiscord | <Clyybber> damn, looks like my PR is zero-functional |
20:50:05 | * | lritter joined #nim |
20:50:08 | FromDiscord | <Clyybber> disruptek: What does it crash with |
20:50:15 | FromDiscord | <Clyybber> is it a nice error msg? |
20:50:19 | disruptek | cannot instantiate T1. |
20:50:27 | FromDiscord | <Clyybber> nice |
20:50:45 | disruptek | super helpful. |
20:52:00 | alehander92 | forgive me |
20:52:07 | disruptek | there's a cligen thing too, but that might be corrected by a programmer. |
20:52:08 | alehander92 | i can take a look later |
20:52:59 | FromDiscord | <Clyybber> disruptek: Oh, yeah I know about the cligen thing |
20:53:18 | FromDiscord | <Clyybber> issue is I can't repro it |
21:13:07 | disruptek | aiieieeee it burns |
21:13:35 | disruptek | man i hate this tainted string thing. |
21:16:46 | disruptek | it'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:51 | disruptek | i wonder if i can safely cache ptype.loc.r. |
21:21:48 | alehander92 | hmm |
21:22:14 | alehander92 | can you move it around |
21:22:21 | * | mipri left #nim (#nim) |
21:22:26 | alehander92 | and isn't it just a distinct string? |
21:22:30 | disruptek | i can use my pc muscles to make it dance. |
21:22:38 | disruptek | wait what |
21:23:13 | FromDiscord | <Clyybber> alehander92: Without taintedmode its not a distinct string |
21:23:18 | FromDiscord | <Clyybber> but with taintedmode it is |
21:23:53 | FromDiscord | <Clyybber> disruptek: system.nim should be processed before the contents of your main module |
21:24:15 | disruptek | type name caching doesn't quite work. yet. |
21:24:27 | alehander92 | is the zero thing bad |
21:24:32 | FromDiscord | <Clyybber> just disable the caching for now |
21:24:39 | FromDiscord | <Clyybber> alehander92: Nah, probably a bug in my code |
21:24:47 | FromDiscord | <Clyybber> unless you are using macros that have typed params |
21:24:59 | disruptek | the caching could solve the problem, ultimately. |
21:25:03 | FromDiscord | <Clyybber> then its not really a bug, I think |
21:25:14 | FromDiscord | <Clyybber> disruptek: caching should never solve a problem except for performance |
21:25:32 | FromDiscord | <Clyybber> but maybe you are thinking of a better kind of caching |
21:25:54 | disruptek | i'm just stashing the rope and using it if i've already generated a type name for the type. |
21:25:56 | FromDiscord | <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:13 | disruptek | maybe it is. |
21:26:14 | FromDiscord | <Clyybber> disruptek: Aha! |
21:26:23 | FromDiscord | <Clyybber> disruptek: Well, it probably makes sense |
21:26:32 | FromDiscord | <Clyybber> system.add is not defined for taintedstring |
21:26:38 | FromDiscord | <Clyybber> but for string |
21:27:12 | disruptek | it turns into tainted due to a newSeq call, i think, not an add. |
21:27:46 | disruptek | it's like we instantiate the generics as strings and then later we decide, oh, this is actually tainted. |
21:28:05 | FromDiscord | <Clyybber> yeah |
21:29:00 | FromDiscord | <Clyybber> instead of overwriting the original signature, maybe we should generate an alias |
21:29:06 | FromDiscord | <Clyybber> so that if TaintedString == string |
21:29:20 | FromDiscord | <Clyybber> in the end we end up with add_seqString and add_seqTaintedString |
21:30:25 | disruptek | i wish i had the pcontext seal in this branch. |
21:32:13 | disruptek | actually, the newSeq that notices the tainted string comes along before the add gets generated. |
21:32:58 | FromDiscord | <Clyybber> see it shouldn't matter what comes first. We should generate aliases |
21:33:07 | FromDiscord | <Clyybber> Or maybe not |
21:33:32 | FromDiscord | <Clyybber> maybe we should generate add_seqString_seqTaintedString |
21:34:12 | FromDiscord | <Clyybber> but then adding a MyType = YourType would change all proc signatures that use YourType |
21:34:14 | FromDiscord | <Clyybber> which sucks |
21:34:23 | alehander92 | Clyybber maybe they expect idents! |
21:34:28 | disruptek | well, 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:17 | FromDiscord | <Clyybber> alehander92: Yeah, could be it |
21:35:52 | FromDiscord | <Clyybber> disruptek: Ah, so thats the source of the issues |
21:35:53 | disruptek | oh this is probably the problem. we think distincts are "irrelevantForBackend" but in fact they aren't whatfer sig reasons. |
21:36:14 | FromDiscord | <Clyybber> But you encounter the bug without taintMode |
21:36:32 | disruptek | i know, even aliases aren't irrelevant i guess. |
21:36:39 | FromDiscord | <Clyybber> They should be |
21:36:47 | alehander92 | huh semytiped <3 |
21:36:56 | FromDiscord | <Clyybber> :D |
21:37:01 | disruptek | maybe we should just get rid of this proc_1starg naming scheme. |
21:37:19 | FromDiscord | <Clyybber> the typo is typed too |
21:37:20 | disruptek | ugh, it won't solve the cpp problem, though. |
21:37:58 | disruptek | and currently the codebase needs tyDistinct for getTypeInfo. |
21:38:12 | FromDiscord | <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:14 | disruptek | my back hurts and this is a pain in my ass. |
21:38:36 | disruptek | it's first argument, too. |
21:38:42 | disruptek | (only under c++) |
21:39:08 | FromDiscord | <Clyybber> Hmm, can you try resolving aliases as far as possible always? |
21:39:30 | disruptek | the problem is that the mangle becomes useless. |
21:39:39 | disruptek | it's like add_string_45 and stuff. |
21:40:01 | disruptek | we already skip aliases. |
21:40:01 | FromDiscord | <Clyybber> You mean because when we have MyType = YourType |
21:40:12 | FromDiscord | <Clyybber> we define your add(MyType) |
21:40:22 | FromDiscord | <Clyybber> and the C code ends up as add_YourType? |
21:40:58 | disruptek | i'll separate out our naming rule from our codegen rule. |
21:41:29 | FromDiscord | <Clyybber> Is what I've written above what you mean with "mangle becomes useless"? |
21:41:48 | disruptek | let's say that aliases and distincts are meaningless for codegen but meaningful for naming. |
21:42:09 | disruptek | yeah, i don't want a lot of YourType. |
21:42:23 | FromDiscord | <Clyybber> so you want MyType there |
21:42:24 | disruptek | because what happens is we devolve to tons of base types everywhere. |
21:42:28 | disruptek | ideally, yes. |
21:42:30 | FromDiscord | <Clyybber> yeah |
21:43:13 | FromDiscord | <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:55 | FromDiscord | <Clyybber> because it doesn't know that add will end up as add_MyType |
21:44:05 | FromDiscord | <Clyybber> disruptek: do you think thats a problem? |
21:44:15 | FromDiscord | <Clyybber> Or do you already have a solution in mind for that? |
21:44:32 | disruptek | hmm, Lock_str_locks is an unknown type name. so i guess that answers the question. |
21:45:24 | FromDiscord | <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:48 | disruptek | prologue does more work? |
21:46:06 | FromDiscord | <UNIcodeX> Prologue seems to have more support for middleware and templating, etc... |
21:46:30 | disruptek | do you need more than 27,000 replies per second? |
21:46:50 | FromDiscord | <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:06 | FromDiscord | <UNIcodeX> I'm evaluating it against Jester for usage in production for an app back end |
21:47:08 | disruptek | i stand by my claim. |
21:47:13 | FromDiscord | <UNIcodeX> so... the more the better |
21:47:32 | disruptek | well, no point if you aren't delivering 27,000/s, right? |
21:47:44 | FromDiscord | <Clyybber> there is a point |
21:47:46 | * | tane quit (Quit: Leaving) |
21:47:48 | FromDiscord | <Clyybber> conserving energy |
21:48:02 | disruptek | aside from global warming, then. |
21:48:02 | FromDiscord | <Clyybber> and having the potential to handle spikes |
21:48:06 | FromDiscord | <UNIcodeX> don't want to have to re-implement if go above that. and sure; energy |
21:48:28 | FromDiscord | <Clyybber> disruptek: What is Lock_str_locks ? |
21:49:32 | disruptek | i think it's just there to break my balls. |
21:49:52 | FromDiscord | <Clyybber> or rather, why is it Lock_str_locks and not just Lock? |
21:52:07 | FromDiscord | <UNIcodeX> Bueller? Bueller? 😅 |
21:52:56 | disruptek | who knows. |
21:53:47 | disruptek | unicodex: the numbers are useless because real work takes real time, context switches, etc. |
21:53:55 | disruptek | make a real test. |
21:54:22 | * | Trustable quit (Remote host closed the connection) |
21:54:32 | disruptek | clyybber: anything exported will get a module name appended. |
21:57:28 | disruptek | anyway, why wouldn't it work? stupid code. |
22:00:08 | alehander92 | maan |
22:00:26 | disruptek | because our locks are now `typedef long arrClong[5];` |
22:01:00 | disruptek | and you ask me why i drink. |
22:03:58 | FromDiscord | <UNIcodeX> fair enough |
22:04:50 | disruptek | ask yourself whether the time prologue saves you is worth buying a second server. |
22:05:08 | disruptek | servers are cheap. |
22:09:47 | * | krux02 quit (Remote host closed the connection) |
22:14:34 | FromDiscord | <Rika> Also are you really paying by energy use of your server |
22:19:26 | FromDiscord | <Clyybber> saving energy/processing is a good idea regardless |
22:24:18 | disruptek | i'd rather save programmer time. |
22:24:48 | disruptek | i have this crazy idea that computers serve /me/ and not the other way around. |
22:25:47 | FromDiscord | <Rika> Only a good idea if whatever you're switching to has a big absolute difference for power usage |
22:26:49 | disruptek | it varies with the gear, of course, but most programmers... well, /other/ programmers, are more valuable than hardware. |
22:28:29 | disruptek | i 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:36 | FromDiscord | <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:50 | shashlick | How often do you folks need to develop both your main project and it's deps |
23:07:32 | leorize | I just keep it bundled then split up later |
23:16:40 | FromDiscord | <Rika> Wtf disruptek insulting someone else and not me? Legit did the real disruptek die or what |
23:17:43 | FromDiscord | <kodkuce> peopel change ower time :) |
23:17:49 | FromDiscord | <kodkuce> at least moste do |
23:17:53 | FromDiscord | <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:06 | FromDiscord | <kodkuce> it just finished |
23:53:31 | FromDiscord | <kodkuce> it took me aprox 6hours |
23:56:00 | FromDiscord | <kodkuce> i all build is in bin right |
23:56:05 | FromDiscord | <kodkuce> those are outputs |
23:56:14 | FromDiscord | <kodkuce> i can delete rest |
23:56:27 | disruptek | rika: i wouldn't dream of trying to trade you for a calculator. |
23:56:54 | FromDiscord | <Rika> Lol nice |
23:57:07 | disruptek | well i think i mentioned that i'm broke as shit. |
23:57:14 | disruptek | i can't afford to sweeten the pot. |
23:57:44 | FromDiscord | <kodkuce> dudes confirm before i delete and need to w8 6 more hours |
23:58:00 | FromDiscord | <kodkuce> i can just save stuff that went to /bin after build |
23:58:06 | disruptek | not really, no. |
23:58:07 | FromDiscord | <kodkuce> right, dont need anything else |
23:58:08 | FromDiscord | <Clyybber> there have been times where I would have traded myself for a calculator as well |
23:58:23 | disruptek | you will need the lib and compiler directories at least. |
23:58:29 | FromDiscord | <kodkuce> what you trolling me? |
23:58:30 | disruptek | you probably want config, too. |
23:58:54 | disruptek | shashlick: i usually dev deps at the same time. |
23:59:03 | FromDiscord | <Clyybber> question. WTF builds for 6 hours? |
23:59:12 | disruptek | nim on arm. |
23:59:15 | FromDiscord | <Clyybber> disruptek: progress, progress progress? |
23:59:27 | FromDiscord | <Clyybber> nim on arm, but why so slow |
23:59:34 | FromDiscord | <kodkuce> nim on qemu emulating arm |
23:59:41 | FromDiscord | <Clyybber> y tho |
23:59:57 | disruptek | no reason. |