00:02:44 | * | hyiltiz quit (Ping timeout: 244 seconds) |
00:03:04 | * | hyiltiz joined #nim |
00:03:04 | * | hyiltiz quit (Changing host) |
00:03:04 | * | hyiltiz joined #nim |
00:06:51 | shashlick | What's not working |
00:18:22 | * | laqq3 joined #nim |
00:27:10 | * | oddp quit (Ping timeout: 256 seconds) |
00:30:13 | * | lritter quit (Ping timeout: 264 seconds) |
00:30:40 | * | endragor joined #nim |
00:50:30 | * | laqq3 quit (Ping timeout: 258 seconds) |
00:52:46 | * | Tlongir joined #nim |
01:06:29 | FromDiscord | <Zachary Carter> @shashlick - well when compiling the rizz bindings with the cpp backend, the C enum definitions don't wory |
01:06:32 | FromDiscord | <Zachary Carter> (edit) 'wory' => 'work' |
01:06:37 | FromDiscord | <Zachary Carter> apprently the cpp backend wants actual enums |
01:11:24 | * | endragor quit (Ping timeout: 272 seconds) |
01:22:36 | shashlick | can you share some sample code |
01:23:03 | FromDiscord | <Zachary Carter> I'll have to put a sample together |
01:23:22 | FromDiscord | <Zachary Carter> but is there a way with nimterop to generate enums instead of using the defineEnum macro? |
01:26:59 | shashlick | not anymore |
01:27:30 | FromDiscord | <Zachary Carter> poop |
01:27:44 | FromDiscord | <Zachary Carter> well - it's okay I can just use cOverride |
01:27:49 | shashlick | there's an open issue to do it where possible - https://github.com/nimterop/nimterop/issues/99 |
01:27:50 | disbot | ➥ a better proposal for mapping C enums ; snippet at 12https://play.nim-lang.org/#ix=2eq4 |
01:28:06 | shashlick | what's the code look like - will help to see what's the problem with it |
01:28:29 | * | muffindrake quit (Quit: muffindrake) |
01:28:59 | shashlick | okay saw you need to put a sample together |
01:29:12 | * | muffindrake joined #nim |
01:38:17 | * | chemist69 quit (Ping timeout: 272 seconds) |
01:39:45 | * | chemist69 joined #nim |
01:58:22 | * | hyiltiz quit (Ping timeout: 244 seconds) |
01:59:43 | * | hyiltiz joined #nim |
02:03:04 | * | dadada quit (Ping timeout: 246 seconds) |
02:21:48 | * | hyiltiz quit (Ping timeout: 244 seconds) |
02:26:21 | FromDiscord | <treeform> I would like to add profile tracing to every nim function, some that that would record enter and exist time for every function. How would I go about it? A macro? A patch to the compiler? Any other ideas? |
02:26:55 | shashlick | maybe a pragma? |
02:27:17 | shashlick | but you'll have to add it to every proc |
02:27:41 | * | muffindrake quit (Ping timeout: 272 seconds) |
02:28:54 | FromDiscord | <treeform> Ideally I would like to control which proc has an does not have it. Could I push and pop a custom proc? |
02:29:13 | FromDiscord | <treeform> custom pragma* ? |
02:29:47 | * | muffindrake joined #nim |
02:31:14 | shashlick | i've not had luck with that recently |
02:41:29 | * | endragor joined #nim |
02:43:24 | * | endragor quit (Remote host closed the connection) |
02:43:31 | * | endragor joined #nim |
02:45:18 | FromDiscord | <impbox> @treeform isn't that included? |
02:45:28 | FromDiscord | <impbox> https://nim-lang.org/docs/estp.html |
02:47:14 | FromDiscord | <flywind> Also https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#profiling-with-valgrind |
02:48:26 | FromDiscord | <Zachary Carter> valgrind doesn't work on all operating systems |
02:48:57 | FromDiscord | <Zachary Carter> but nimprof exists |
02:49:11 | FromDiscord | <impbox> nimprof sounds exactly like what treeform is asking about |
02:49:12 | FromDiscord | <Zachary Carter> or you could probably use a C profiling library |
02:49:22 | FromDiscord | <impbox> though i'm not sure if you can selectively disable it for procs |
02:49:41 | * | smitop quit (Quit: Connection closed for inactivity) |
02:49:58 | FromDiscord | <treeform> @impbox [ftsf] I did not know that was there thanks! |
02:54:28 | * | laqq3 joined #nim |
03:03:55 | * | Tongir joined #nim |
03:06:24 | * | Tlongir quit (Ping timeout: 256 seconds) |
03:12:09 | shashlick | ll |
03:20:45 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> In the ws lib by treeform, how do i loop through all of the connected clients? |
03:23:59 | FromDiscord | <Elegant Beef> Any ideas why the float doesnt work?↵https://play.nim-lang.org/#ix=2rjs |
03:25:10 | * | NimBot joined #nim |
03:27:14 | * | endragor quit (Remote host closed the connection) |
03:27:30 | * | endragor joined #nim |
03:28:41 | FromDiscord | <Elegant Beef> Since that doesnt work on objects either, i'm going to assume this is a naive solution 😄 |
03:34:41 | * | krux02_ quit (Remote host closed the connection) |
03:39:31 | * | endragor quit (Remote host closed the connection) |
03:40:00 | * | endragor joined #nim |
03:40:52 | * | laqq3 quit (Ping timeout: 272 seconds) |
03:44:31 | * | endragor quit (Ping timeout: 265 seconds) |
03:46:32 | * | endragor joined #nim |
04:08:38 | * | skrylar[m] quit (*.net *.split) |
04:08:39 | * | GitterIntegratio quit (*.net *.split) |
04:08:39 | * | matlock quit (*.net *.split) |
04:08:40 | * | Cadey quit (*.net *.split) |
04:08:40 | * | qwertfisch quit (*.net *.split) |
04:08:40 | * | ldlework quit (*.net *.split) |
04:08:40 | * | Tongir quit (*.net *.split) |
04:08:40 | * | chemist69 quit (*.net *.split) |
04:08:40 | * | revere quit (*.net *.split) |
04:08:44 | * | sagax quit (*.net *.split) |
04:08:44 | * | idxu quit (*.net *.split) |
04:08:44 | * | zielmicha__ quit (*.net *.split) |
04:08:44 | * | arecaceae quit (*.net *.split) |
04:08:44 | * | cyraxjoe quit (*.net *.split) |
04:08:44 | * | lbart quit (*.net *.split) |
04:08:44 | * | gsingh93 quit (*.net *.split) |
04:08:44 | * | synthmeat quit (*.net *.split) |
04:08:44 | * | andinus quit (*.net *.split) |
04:08:44 | * | shodan45 quit (*.net *.split) |
04:08:44 | * | nickster quit (*.net *.split) |
04:08:44 | * | acidx quit (*.net *.split) |
04:08:44 | * | neceve quit (*.net *.split) |
04:08:44 | * | tyler569 quit (*.net *.split) |
04:08:44 | * | bozaloshtsh_ quit (*.net *.split) |
04:08:44 | * | ChanServ quit (*.net *.split) |
04:08:44 | * | endragor quit (*.net *.split) |
04:08:44 | * | supakeen quit (*.net *.split) |
04:08:44 | * | opDispatch quit (*.net *.split) |
04:08:44 | * | xet7 quit (*.net *.split) |
04:08:44 | * | FromDiscord quit (*.net *.split) |
04:08:44 | * | FromGitter quit (*.net *.split) |
04:08:44 | * | def- quit (*.net *.split) |
04:08:45 | * | ormiret quit (*.net *.split) |
04:08:45 | * | hoek quit (*.net *.split) |
04:08:45 | * | fowl quit (*.net *.split) |
04:08:46 | * | jholland__ quit (*.net *.split) |
04:08:46 | * | stever quit (*.net *.split) |
04:08:46 | * | euantor quit (*.net *.split) |
04:08:46 | * | gangstacat quit (*.net *.split) |
04:08:46 | * | njoseph quit (*.net *.split) |
04:08:46 | * | blackbeard420 quit (*.net *.split) |
04:08:46 | * | pbb quit (*.net *.split) |
04:08:46 | * | nerthus quit (*.net *.split) |
04:08:46 | * | Yardanico quit (*.net *.split) |
04:08:46 | * | ehmry quit (*.net *.split) |
04:08:46 | * | sepplesWoona quit (*.net *.split) |
04:08:47 | * | JStoker quit (*.net *.split) |
04:08:47 | * | go|dfish quit (*.net *.split) |
04:08:47 | * | rayman22201 quit (*.net *.split) |
04:08:48 | * | yumaikas quit (*.net *.split) |
04:08:48 | * | deepend quit (*.net *.split) |
04:08:48 | * | mutantturkey quit (*.net *.split) |
04:08:50 | * | tribly quit (*.net *.split) |
04:08:50 | * | beatmox- quit (*.net *.split) |
04:08:50 | * | leorize[m] quit (*.net *.split) |
04:08:50 | * | suchasurge quit (*.net *.split) |
04:08:51 | * | oculux quit (*.net *.split) |
04:08:51 | * | Oddmonger quit (*.net *.split) |
04:08:51 | * | literal quit (*.net *.split) |
04:08:52 | * | iwq quit (*.net *.split) |
04:08:52 | * | cornfeedhobo quit (*.net *.split) |
04:08:52 | * | Araq quit (*.net *.split) |
04:08:52 | * | Lord_Nightmare quit (*.net *.split) |
04:08:52 | * | l1x quit (*.net *.split) |
04:08:52 | * | ForumUpdaterBot quit (*.net *.split) |
04:08:53 | * | bacterio quit (*.net *.split) |
04:08:53 | * | letto quit (*.net *.split) |
04:08:53 | * | so quit (*.net *.split) |
04:08:54 | * | sknebel quit (*.net *.split) |
04:08:54 | * | screens__ quit (*.net *.split) |
04:08:54 | * | vqrs quit (*.net *.split) |
04:08:54 | * | lain quit (*.net *.split) |
04:08:55 | * | onionhammer quit (*.net *.split) |
04:08:55 | * | GaveUp quit (*.net *.split) |
04:08:56 | * | disbot quit (*.net *.split) |
04:08:56 | * | federico3 quit (*.net *.split) |
04:08:56 | * | vegai quit (*.net *.split) |
04:08:56 | * | shashlick quit (*.net *.split) |
04:08:56 | * | slackytude[m] quit (*.net *.split) |
04:08:57 | * | Zambyte[m] quit (*.net *.split) |
04:08:57 | * | unclechu quit (*.net *.split) |
04:08:57 | * | lnxw37d4 quit (*.net *.split) |
04:08:57 | * | k0mpjut0r quit (*.net *.split) |
04:08:57 | * | skrzyp1 quit (*.net *.split) |
04:08:57 | * | vesper11 quit (*.net *.split) |
04:08:58 | * | Northstrider[m] quit (*.net *.split) |
04:08:58 | * | oz quit (*.net *.split) |
04:08:58 | * | EastByte quit (*.net *.split) |
04:08:58 | * | ee7[m] quit (*.net *.split) |
04:08:58 | * | xicheng[m] quit (*.net *.split) |
04:08:59 | * | BitPuffin quit (*.net *.split) |
04:08:59 | * | matti quit (*.net *.split) |
04:08:59 | * | dom96 quit (*.net *.split) |
04:08:59 | * | wowi42 quit (*.net *.split) |
04:09:00 | * | dgb quit (*.net *.split) |
04:09:00 | * | Prestige quit (*.net *.split) |
04:09:00 | * | muffindrake quit (*.net *.split) |
04:09:00 | * | tinga_ quit (*.net *.split) |
04:09:00 | * | LyndsySimon quit (*.net *.split) |
04:09:00 | * | npgm quit (*.net *.split) |
04:09:00 | * | msmorgan quit (*.net *.split) |
04:09:01 | * | surma quit (*.net *.split) |
04:09:01 | * | D_ quit (*.net *.split) |
04:09:01 | * | xace quit (*.net *.split) |
04:09:02 | * | Avatarfighter quit (*.net *.split) |
04:09:02 | * | golechwi1 quit (*.net *.split) |
04:09:03 | * | alehander92_ quit (*.net *.split) |
04:09:03 | * | Cthalupa quit (*.net *.split) |
04:09:03 | * | dddddd quit (*.net *.split) |
04:09:03 | * | sentreen quit (*.net *.split) |
04:09:03 | * | nisstyre quit (*.net *.split) |
04:09:03 | * | junland quit (*.net *.split) |
04:09:03 | * | Mister_Magister quit (*.net *.split) |
04:09:03 | * | zedeus quit (*.net *.split) |
04:09:03 | * | Zevv quit (*.net *.split) |
04:09:03 | * | kungtotte quit (*.net *.split) |
04:09:03 | * | clemens3 quit (*.net *.split) |
04:09:04 | * | zama quit (*.net *.split) |
04:09:04 | * | Jesin quit (*.net *.split) |
04:09:04 | * | bung quit (*.net *.split) |
04:09:04 | * | Kaivo quit (*.net *.split) |
04:09:04 | * | CcxWrk quit (*.net *.split) |
04:09:05 | * | wontruefree[m] quit (*.net *.split) |
04:09:05 | * | Zoom[m] quit (*.net *.split) |
04:09:06 | * | reversem3 quit (*.net *.split) |
04:09:06 | * | codic quit (*.net *.split) |
04:09:06 | * | watzon quit (*.net *.split) |
04:09:06 | * | sirn quit (*.net *.split) |
04:09:06 | * | enthus1ast quit (*.net *.split) |
04:09:06 | * | casaca quit (*.net *.split) |
04:09:06 | * | lmariscal0 quit (*.net *.split) |
04:09:06 | * | Amun_Ra quit (*.net *.split) |
04:09:07 | * | skelett quit (*.net *.split) |
04:09:07 | * | dzamo[m] quit (*.net *.split) |
04:09:07 | * | nerdrat[m] quit (*.net *.split) |
04:09:07 | * | planetis[m] quit (*.net *.split) |
04:09:07 | * | Hotbees quit (*.net *.split) |
04:09:07 | * | waleee-cl quit (*.net *.split) |
04:09:07 | * | r4vi quit (*.net *.split) |
04:09:07 | * | hpyc9 quit (*.net *.split) |
04:09:07 | * | crem quit (*.net *.split) |
04:09:07 | * | Ekho quit (*.net *.split) |
04:09:08 | * | stefantalpalaru quit (*.net *.split) |
04:09:08 | * | mwbrown quit (*.net *.split) |
04:09:08 | * | Jjp137 quit (*.net *.split) |
04:09:08 | * | WilhelmVonWeiner quit (*.net *.split) |
04:09:08 | * | opal quit (*.net *.split) |
04:09:08 | * | stisa[m] quit (*.net *.split) |
04:09:08 | * | MTRNord[m] quit (*.net *.split) |
04:09:08 | * | oneark quit (*.net *.split) |
04:09:08 | * | sendell quit (*.net *.split) |
04:09:08 | * | d10n-work quit (*.net *.split) |
04:09:09 | * | drewr quit (*.net *.split) |
04:09:09 | * | koltrast_ quit (*.net *.split) |
04:13:09 | * | Vladar joined #nim |
04:14:40 | * | so joined #nim |
04:14:40 | * | letto joined #nim |
04:14:40 | * | ForumUpdaterBot joined #nim |
04:14:40 | * | Lord_Nightmare joined #nim |
04:14:40 | * | supakeen_ joined #nim |
04:14:40 | * | vqrs joined #nim |
04:14:40 | * | screens__ joined #nim |
04:14:40 | * | sknebel joined #nim |
04:14:40 | * | def- joined #nim |
04:14:40 | * | FromGitter joined #nim |
04:14:40 | * | FromDiscord joined #nim |
04:14:40 | * | xet7 joined #nim |
04:14:40 | * | opDispatch joined #nim |
04:14:40 | * | endragor joined #nim |
04:14:40 | * | JStoker joined #nim |
04:14:40 | * | sepplesWoona joined #nim |
04:14:40 | * | ehmry joined #nim |
04:14:40 | * | Yardanico joined #nim |
04:14:40 | * | nerthus joined #nim |
04:14:40 | * | pbb joined #nim |
04:14:40 | * | blackbeard420 joined #nim |
04:14:40 | * | njoseph joined #nim |
04:14:40 | * | gangstacat joined #nim |
04:14:40 | * | euantor joined #nim |
04:14:40 | * | stever joined #nim |
04:14:40 | * | jholland__ joined #nim |
04:14:40 | * | fowl joined #nim |
04:14:40 | * | hoek joined #nim |
04:14:40 | * | ormiret joined #nim |
04:14:40 | * | acidx joined #nim |
04:14:40 | * | nickster joined #nim |
04:14:40 | * | shodan45 joined #nim |
04:14:40 | * | andinus joined #nim |
04:14:40 | * | synthmeat joined #nim |
04:14:40 | * | gsingh93 joined #nim |
04:14:40 | * | lbart joined #nim |
04:14:40 | * | cyraxjoe joined #nim |
04:14:40 | * | arecaceae joined #nim |
04:14:40 | * | zielmicha__ joined #nim |
04:14:40 | * | idxu joined #nim |
04:14:40 | * | sagax joined #nim |
04:14:40 | * | revere joined #nim |
04:14:40 | * | chemist69 joined #nim |
04:14:40 | * | ldlework joined #nim |
04:14:40 | * | qwertfisch joined #nim |
04:14:40 | * | Cadey joined #nim |
04:14:40 | * | matlock joined #nim |
04:14:40 | * | GitterIntegratio joined #nim |
04:14:40 | * | skrylar[m] joined #nim |
04:14:40 | * | shashlick joined #nim |
04:14:40 | * | federico3 joined #nim |
04:14:40 | * | vegai joined #nim |
04:14:40 | * | disbot joined #nim |
04:14:40 | * | GaveUp joined #nim |
04:14:40 | * | onionhammer joined #nim |
04:14:40 | * | l1x joined #nim |
04:14:40 | * | golechwi1 joined #nim |
04:14:40 | * | Avatarfighter joined #nim |
04:14:40 | * | xace joined #nim |
04:14:40 | * | D_ joined #nim |
04:14:40 | * | surma joined #nim |
04:14:40 | * | msmorgan joined #nim |
04:14:40 | * | tinga_ joined #nim |
04:14:40 | * | muffindrake joined #nim |
04:14:40 | * | EastByte joined #nim |
04:14:40 | * | oz joined #nim |
04:14:40 | * | Northstrider[m] joined #nim |
04:14:40 | * | vesper11 joined #nim |
04:14:40 | * | skrzyp1 joined #nim |
04:14:40 | * | Zambyte[m] joined #nim |
04:14:40 | * | slackytude[m] joined #nim |
04:14:40 | * | mutantturkey joined #nim |
04:14:40 | * | deepend joined #nim |
04:14:40 | * | yumaikas joined #nim |
04:14:40 | * | rayman22201 joined #nim |
04:14:40 | * | go|dfish joined #nim |
04:14:40 | * | LyndsySimon joined #nim |
04:14:40 | * | leorize[m] joined #nim |
04:14:40 | * | beatmox- joined #nim |
04:14:40 | * | tribly joined #nim |
04:14:40 | * | Araq joined #nim |
04:14:40 | * | cornfeedhobo joined #nim |
04:14:40 | * | literal joined #nim |
04:14:40 | * | iwq joined #nim |
04:14:40 | * | Oddmonger joined #nim |
04:14:40 | * | oculux joined #nim |
04:14:40 | * | suchasurge joined #nim |
04:14:40 | * | bacterio joined #nim |
04:14:40 | * | Tlongir joined #nim |
04:14:40 | * | lain joined #nim |
04:14:40 | * | zama joined #nim |
04:14:40 | * | clemens3 joined #nim |
04:14:40 | * | kungtotte joined #nim |
04:14:40 | * | Zevv joined #nim |
04:14:40 | * | zedeus joined #nim |
04:14:40 | * | Mister_Magister joined #nim |
04:14:40 | * | junland joined #nim |
04:14:40 | * | nisstyre joined #nim |
04:14:40 | * | sentreen joined #nim |
04:14:40 | * | dddddd joined #nim |
04:14:40 | * | Cthalupa joined #nim |
04:14:40 | * | alehander92_ joined #nim |
04:14:40 | * | hyiltiz joined #nim |
04:14:40 | * | Jesin joined #nim |
04:14:40 | * | skelett joined #nim |
04:14:40 | * | wontruefree[m] joined #nim |
04:14:40 | * | Hotbees joined #nim |
04:14:40 | * | waleee-cl joined #nim |
04:14:40 | * | bung joined #nim |
04:14:40 | * | r4vi joined #nim |
04:14:40 | * | sirn joined #nim |
04:14:40 | * | opal joined #nim |
04:14:40 | * | enthus1ast joined #nim |
04:14:40 | * | hpyc9 joined #nim |
04:14:40 | * | drewr joined #nim |
04:14:40 | * | Kaivo joined #nim |
04:14:40 | * | crem joined #nim |
04:14:40 | * | bozaloshtsh_ joined #nim |
04:14:40 | * | tyler569 joined #nim |
04:14:40 | * | CcxWrk joined #nim |
04:14:40 | * | Ekho joined #nim |
04:14:40 | * | dom96 joined #nim |
04:14:40 | * | Prestige joined #nim |
04:14:40 | * | dgb joined #nim |
04:14:40 | * | wowi42 joined #nim |
04:14:40 | * | casaca joined #nim |
04:14:40 | * | lmariscal0 joined #nim |
04:14:40 | * | stefantalpalaru joined #nim |
04:14:40 | * | Amun_Ra joined #nim |
04:14:40 | * | mwbrown joined #nim |
04:14:40 | * | Jjp137 joined #nim |
04:14:40 | * | WilhelmVonWeiner joined #nim |
04:14:40 | * | koltrast_ joined #nim |
04:15:12 | * | wontruefree[m] quit (Ping timeout: 257 seconds) |
04:15:13 | * | hoek quit (Ping timeout: 299 seconds) |
04:15:14 | * | skrylar[m] quit (Ping timeout: 246 seconds) |
04:15:15 | * | vicfred quit (Max SendQ exceeded) |
04:15:18 | * | GitterIntegratio quit (Ping timeout: 246 seconds) |
04:15:24 | * | oprypin quit (Max SendQ exceeded) |
04:15:44 | * | vicfred joined #nim |
04:15:44 | * | matti joined #nim |
04:15:59 | * | matlock quit (Ping timeout: 246 seconds) |
04:16:09 | * | npgm joined #nim |
04:16:12 | * | LyndsySimon quit (Ping timeout: 256 seconds) |
04:17:01 | * | slackytude[m] quit (Remote host closed the connection) |
04:17:01 | * | Zambyte[m] quit (Remote host closed the connection) |
04:18:10 | * | so quit (Ping timeout: 246 seconds) |
04:19:07 | * | matlock joined #nim |
04:19:34 | * | oprypin joined #nim |
04:19:45 | * | LyndsySimon joined #nim |
04:21:37 | * | d10n-work joined #nim |
04:23:46 | * | xicheng[m] joined #nim |
04:23:52 | * | so joined #nim |
04:24:08 | * | hoek joined #nim |
04:26:57 | FromDiscord | <impbox> sent a code paste, see https://play.nim-lang.org/#ix=2rjy |
04:27:54 | FromDiscord | <impbox> deleting the dlls.zip doesn't help because it keeps trying to download it and extract it again |
04:30:00 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
04:30:06 | * | njoseph joined #nim |
04:51:43 | * | unclechu joined #nim |
04:51:44 | * | k0mpjut0r joined #nim |
04:51:44 | * | MTRNord[m] joined #nim |
04:51:44 | * | BitPuffin joined #nim |
04:51:44 | * | lnxw37d4 joined #nim |
04:51:44 | * | planetis[m] joined #nim |
04:51:44 | * | sendell joined #nim |
04:51:44 | * | GitterIntegratio joined #nim |
04:51:44 | * | codic joined #nim |
04:51:44 | * | watzon joined #nim |
04:51:44 | * | reversem3 joined #nim |
04:51:44 | * | dzamo[m] joined #nim |
04:51:44 | * | Zambyte[m] joined #nim |
04:51:44 | * | oneark joined #nim |
04:51:44 | * | nerdrat[m] joined #nim |
04:51:44 | * | neceve joined #nim |
04:51:50 | * | Zoom[m] joined #nim |
04:51:50 | * | ee7[m] joined #nim |
04:51:50 | * | skrylar[m] joined #nim |
04:51:51 | * | stisa[m] joined #nim |
04:51:51 | * | slackytude[m] joined #nim |
04:51:51 | * | wontruefree[m] joined #nim |
05:00:41 | * | vicfred quit (Quit: Leaving) |
05:19:36 | * | audiophile joined #nim |
05:41:34 | * | hoijui joined #nim |
05:47:36 | * | arecaceae quit (Remote host closed the connection) |
05:47:59 | * | arecaceae joined #nim |
05:48:37 | * | narimiran joined #nim |
05:52:09 | * | solitudesf joined #nim |
05:52:30 | audiophile | hullo, I am back for someone to explain to me what llvm is? I already asked this before but I didn't quite understand it. Is it basically a way to avoid writing machine specific code if you're writing an interpreter/compiler |
05:52:45 | audiophile | I'm probably not doing it full justice with that short explanation but is that somewhat correct |
05:56:04 | FromDiscord | <impbox> https://llvm.org/ the LLVM project? |
05:57:08 | FromDiscord | <impbox> I'm not aware of anything in nim called llvm |
05:58:27 | FromDiscord | <impbox> although I see there's this project https://github.com/arnetheduck/nlvm which target LLVM-IR |
05:58:30 | FromDiscord | <impbox> (edit) 'target' => 'targets' |
06:06:55 | * | maier joined #nim |
06:19:18 | audiophile | the llvm project impbox |
06:42:53 | FromGitter | <awr1> @audiophile LLVM is a framework for writing optimizing compilers that target native code |
06:44:03 | * | letto quit (Quit: Konversation terminated!) |
06:44:56 | FromGitter | <awr1> the idea is that a given compiler generates LLVM IR (intermediate representation) code, which is sent through to the LLVM framework to produce a native binary (either statically, or just-in-time) |
06:45:08 | * | letto joined #nim |
06:47:21 | audiophile | so... the advantage is you dont have to target those architectures manually? |
06:51:49 | FromGitter | <awr1> in spite of its name it is not a virtual machine in the traditional sense. it is not quite like the JVM, which aims to be generally platform neutral by designed. its advantages include that LLVM enables a certain degree of architectural independence (not totally however - LLVM is not WASM, for instance) and that you get the advantage of leveraging LLVM's rather intense optimization suite |
06:54:36 | FromGitter | <awr1> the idea of writing a compiler with LLVM is that you don't have to write an optimizer (ideally) and do native codegen. |
06:55:12 | FromDiscord | <impbox> hmm is it possible to create a proc that is both compileTime and runTime? so if you call it with compile time static data it'll use the compileTime version and give you errors at compileTime, but still allow you to use it at runtime? |
06:55:19 | FromGitter | <awr1> (in practice however there are notably LLVM-based compilers that perform language-specific optimizations. the rust reference compiler does this, for instance) |
06:56:09 | audiophile | oh this is very interesting to me. So if llvm in the future makes any further optimizations, any compiler that leverages llvm will also reap the benefits? |
06:56:14 | FromGitter | <awr1> yes |
06:56:45 | FromGitter | <awr1> @impbox an arbitrary proc in general is both compiletime and runtime usable (save for stuff that requires FFI) |
06:57:11 | FromGitter | <awr1> if you want seperate branches for compiletime vs runtime look up `when nimvm` |
06:57:29 | FromGitter | <awr1> https://nim-lang.org/docs/manual.html#statements-and-expressions-when-nimvm-statement |
06:58:00 | FromDiscord | <impbox> my use case is for string parsing into an object, it works fine at either runtime or compile time, but i want to throw errors at compile time if there's a problem with the input string |
06:58:05 | FromDiscord | <impbox> thanks! |
06:59:08 | * | supakeen_ is now known as supakeen |
06:59:25 | * | supakeen quit (Changing host) |
06:59:25 | * | supakeen joined #nim |
07:04:01 | FromDiscord | <impbox> nice it works =) |
07:04:17 | * | vicfred joined #nim |
07:04:42 | FromDiscord | <impbox> if i do it as a `const foo = toBar("myString")` |
07:05:57 | FromDiscord | <impbox> I guess i'd also want it to check "myString" if doing `var foo = toBar("myString")` |
07:06:02 | FromDiscord | <impbox> maybe I need a macro for that |
07:10:27 | * | ftsf quit (Quit: Leaving) |
07:13:06 | FromDiscord | <demotomohiro> Why this library list doesn't contain std/compilesettings and std/with module? They are not ready to use?↵https://github.com/nim-lang/Nim/blob/devel/doc/lib.rst |
07:18:17 | * | opDispatch quit (Quit: Konversation terminated!) |
07:24:15 | FromGitter | <awr1> may have forgotten to be updated |
07:24:47 | FromGitter | <awr1> IMO that should be fixed |
07:57:14 | FromDiscord | <impbox> during nimble build is it possible to build a binary that requires the current library? |
07:57:51 | FromDiscord | <impbox> eg I want to include a nicoEditor binary that comes with the nico package, but nicoEditor uses the nico module |
07:58:33 | FromDiscord | <impbox> aha, figured it out i think, added a nim.cfg with `path = "."` |
08:05:57 | * | dadada joined #nim |
08:06:03 | * | Trustable joined #nim |
08:06:17 | Oddmonger | ok i saw there a .noinit. pragma for arrays, to prevent init at 0. But is there a .init. counterpat, for initialize at a given value ? |
08:06:22 | * | dadada is now known as Guest84250 |
08:06:45 | Oddmonger | like the C : char space[128]={32}; |
08:07:20 | Oddmonger | may be a good use for a macro ? |
08:12:03 | FromDiscord | <Clyybber> just do `let a = [1,2,3,4]` |
08:13:29 | * | Tongir joined #nim |
08:15:43 | * | Tlongir quit (Ping timeout: 244 seconds) |
08:16:00 | Oddmonger | yes i know a can do this, but for longer array, it's a pain |
08:16:28 | FromDiscord | <impbox> `for i in 0..<space.len: space[i] = 32` |
08:17:33 | Oddmonger | yes, so no other way than «live» init ? |
08:18:12 | FromDiscord | <impbox> you could make a template to do the above I guess |
08:18:27 | FromDiscord | <Elegant Beef> or if you dont care just use a sequence |
08:18:28 | FromDiscord | <impbox> but no, i don't think there's a builtin to do it |
08:18:44 | Oddmonger | ah i had understood template like functions types overrinding |
08:19:10 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2rjX |
08:19:20 | FromDiscord | <Elegant Beef> Sequtil method, although i think there is a built in one |
08:20:12 | Oddmonger | ah interesting, and must be generated at compile time |
08:20:25 | Oddmonger | thanks for all the answers |
08:20:46 | FromDiscord | <impbox> sent a code paste, see https://play.nim-lang.org/#ix=2rjY |
08:20:58 | FromDiscord | <impbox> could be prettier |
08:21:24 | FromDiscord | <Elegant Beef> yes like usinng `for i in a:` 😛 |
08:21:28 | FromDiscord | <Elegant Beef> (edit) 'usinng' => 'using' |
08:21:44 | FromDiscord | <impbox> @Elegant Beef but is that the index or value? |
08:21:50 | FromDiscord | <impbox> depends on the container |
08:21:50 | FromDiscord | <Elegant Beef> that'd be value |
08:21:59 | Oddmonger | aren't templates just code substitution, and then executed at runtime ? |
08:22:11 | FromDiscord | <Elegant Beef> it's always callse the `.items` iterator impbox afaik |
08:22:21 | FromDiscord | <Elegant Beef> (edit) 'callse' => 'calls' |
08:22:40 | FromDiscord | <impbox> yeah, not great for setting the value |
08:23:14 | FromDiscord | <Elegant Beef> i meant instead of the `for i in 0..<32:` |
08:23:23 | FromDiscord | <impbox> oh right |
08:25:40 | FromDiscord | <Elegant Beef> 😄 |
08:25:41 | FromDiscord | <Elegant Beef> sent a code paste, see https://play.nim-lang.org/#ix=2rk0 |
08:26:36 | FromDiscord | <Elegant Beef> Yard you need to select only between the backticks for the "send a code paste" |
08:27:03 | FromDiscord | <Elegant Beef> Was curious how it looked on IRC and yea you remove any text in the message |
08:27:26 | FromDiscord | <lqdev> cc Yardanico |
08:30:01 | Oddmonger | that's funny, even with {.noinit.}, the array is still zeroed |
08:30:21 | FromDiscord | <Elegant Beef> Memory it was created in might have been 0'd? |
08:30:23 | FromDiscord | <impbox> certain it wasn't already zero? |
08:31:24 | * | nikita` joined #nim |
08:32:00 | FromDiscord | <Elegant Beef> I know how computers work... totally not a facade |
08:32:28 | Oddmonger | maybe memory taken from the stack, for array ? |
08:32:44 | Oddmonger | i try with a very big array, for forcing heap alloc |
08:33:05 | FromDiscord | <lqdev> arrays are always allocated on the stack though |
08:33:06 | FromDiscord | <impbox> are you on a dangerous release build? |
08:33:31 | FromDiscord | <lqdev> and i know that all too well after my endeavours with real-time audio |
08:33:38 | FromDiscord | <impbox> =) |
08:34:12 | FromDiscord | <lqdev> >big brain me trying to allocate an array of 65536 float64s to debug a weird audio corruption glitch |
08:35:13 | Oddmonger | impbox: i'm trying all this in inim |
08:37:00 | Oddmonger | even with 100Mb allocated (array[100_000_000,int] ), all is zeroed |
08:37:46 | * | Trustable quit (Remote host closed the connection) |
08:38:17 | Oddmonger | hum even more than 100mb indeed (size(int) : 4 ?) |
08:38:50 | FromDiscord | <impbox> try with a dangerous release build? |
08:39:04 | FromDiscord | <lqdev> that's not 100Mb, that's 6400Mb |
08:39:24 | FromDiscord | <lqdev> or 800MB |
08:39:31 | FromDiscord | <impbox> does the C compiler initialise it for you? |
08:39:39 | FromDiscord | <impbox> even if nim doesn't do it explicitly |
08:40:36 | FromDiscord | <impbox> https://media.discordapp.net/attachments/371759389889003532/731067332306403338/unknown.png |
08:41:14 | FromDiscord | <impbox> I guess you can't see that on IRC... https://stackoverflow.com/questions/2589749/how-to-initialize-array-to-0-in-c |
08:41:46 | FromDiscord | <impbox> according to this in C static and global vars are initialized to zero, so even though nim isn't initializing them they'd still be 0 |
08:41:52 | FromDiscord | <impbox> unless these are locals |
08:42:41 | FromDiscord | <Elegant Beef> No he can see that on IRC |
08:42:46 | FromDiscord | <Elegant Beef> it sends the discord link |
08:42:59 | FromDiscord | <impbox> ehh I wouldn't click on that ;) |
08:44:09 | Oddmonger | hmm as a true nim newb, i cannot find the unequality in tests |
08:44:26 | Oddmonger | in manual i see == for equality, but for testing not ? |
08:44:32 | FromDiscord | <impbox> != |
08:44:34 | Oddmonger | tried != , of course |
08:45:11 | FromDiscord | <impbox> ```template `!=` (a, b: untyped): untyped =↵ # this definition exists in the System module↵ not (a == b)``` |
08:45:18 | Oddmonger | http://ix.io/2rk5 |
08:45:49 | FromDiscord | <impbox> yep, so that's a global |
08:45:52 | FromDiscord | <impbox> so it's gonna be 0 |
08:45:56 | Oddmonger | ah , need import System then (wasn't it implicit ?) |
08:46:07 | FromDiscord | <impbox> system is implicit |
08:46:24 | FromDiscord | <impbox> do you get an error? |
08:46:51 | FromDiscord | <Elegant Beef> Can confirm impbox is right↵https://play.nim-lang.org/#ix=2rk8 |
08:47:02 | FromDiscord | <Elegant Beef> Ah shit thta doesnt compile on here |
08:47:11 | FromDiscord | <Elegant Beef> (edit) 'Ah shit thta doesnt ... compile' => 'Ah shit thta doesntquickly' |
08:47:22 | FromDiscord | <impbox> `var a{.noInit.}: array[100_000_000, int]` |
08:47:42 | FromDiscord | <Elegant Beef> https://media.discordapp.net/attachments/371759389889003532/731069123311698020/unknown.png |
08:47:57 | FromDiscord | <Elegant Beef> some values are non-zero, even though most are |
08:48:16 | Oddmonger | ok this was an error in my array declaration |
08:48:45 | Oddmonger | strutils import seems implicit too |
08:49:01 | FromDiscord | <impbox> it's not, but you're not using anything from strutils |
08:49:28 | Oddmonger | i'm using string concat and tostring conversion, in the echo |
08:49:35 | FromDiscord | <impbox> yep, they're part of system |
08:49:39 | FromDiscord | <Elegant Beef> stringify is core |
08:49:45 | FromDiscord | <Elegant Beef> https://nim-lang.org/docs/lib.html#pure-libraries |
08:49:46 | Oddmonger | was reading that: https://nim-lang.org/docs/strutils.html |
08:50:04 | Oddmonger | ah ok, it's in system |
08:50:07 | FromDiscord | <impbox> read the first line carefully =) |
08:50:10 | FromDiscord | <impbox> it's a bit confusing |
08:50:12 | Oddmonger | yes /o\ |
08:50:40 | FromDiscord | <Elegant Beef> less confusing and more misleading if you dont read 😄 |
08:50:50 | FromDiscord | <impbox> but yeah, noInit does give you random data if you use it on a local array |
08:51:06 | FromDiscord | <Elegant Beef> We cant magically make C not C sadly |
08:51:29 | FromDiscord | <impbox> you can compile to js though |
08:51:38 | FromDiscord | <impbox> which i'm sure you'll get all zeroed regardless |
08:52:01 | FromDiscord | <Varriount> What's the problem? |
08:52:10 | FromDiscord | <Elegant Beef> Noinit doesnt work when it's a global variable |
08:52:54 | FromDiscord | <impbox> well it doesn't init anything |
08:52:57 | FromDiscord | <impbox> so it does work =) |
08:53:00 | FromDiscord | <Elegant Beef> lol |
08:53:25 | FromDiscord | <Varriount> Wait, so is the variable zero'd out, or not? |
08:54:32 | FromDiscord | <impbox> it's just 0, not zeroed out |
08:56:27 | FromDiscord | <Varriount> I think I recall this issue coming up before. There might be a reason for that behavior. |
08:56:46 | FromDiscord | <Varriount> Why is the variable supposed to be uninitialized? |
08:57:07 | FromDiscord | <Elegant Beef> Well the reason is C as i undestand it |
08:57:12 | FromDiscord | <Elegant Beef> (edit) 'undestand' => 'understand' |
08:57:22 | FromDiscord | <Elegant Beef> It's a large array of Ints |
08:57:36 | FromDiscord | <Varriount> So? |
08:58:15 | FromDiscord | <impbox> either C or the OS or the executable format |
08:58:20 | FromDiscord | <impbox> doesn't seem like a problem |
08:58:26 | FromDiscord | <Elegant Beef> It's really not 😄 |
08:58:34 | FromDiscord | <Elegant Beef> I dont know what they were so concerned |
08:58:58 | FromDiscord | <Varriount> memset is very, very fast |
09:04:05 | Oddmonger | well even with -d:useMalloc i have same result on globals |
09:04:27 | FromDiscord | <impbox> is it a problem? |
09:05:07 | Oddmonger | no, just curiosity as i'm learning the language |
09:05:34 | FromDiscord | <Elegant Beef> Curiosity in the weirdest shit 😄 |
09:05:42 | FromDiscord | <Yardanico> What exactly are you people talking about? |
09:05:45 | FromDiscord | <Yardanico> Big arrays? |
09:05:54 | FromDiscord | <Elegant Beef> non initiallizing big global arrays |
09:06:35 | FromDiscord | <Yardanico> Well they're still big |
09:06:52 | Oddmonger | but initialized :) |
09:07:03 | FromDiscord | <Yardanico> Well arrays are on stack |
09:10:40 | FromDiscord | <Elegant Beef> Well im outta here, no more big arrays! |
09:10:45 | FromDiscord | <impbox> o/ |
09:11:09 | FromDiscord | <impbox> ~10 hours until the GMTK game jam starts, any other nim gamedevs gonna join? =) |
09:11:09 | disbot | no footnotes for `10`. 🙁 |
09:11:52 | Oddmonger | sorry, too newb for that |
09:11:57 | Oddmonger | i'm still counting my arrays |
09:13:09 | FromDiscord | <impbox> next up seqs! |
09:19:48 | * | audiophile quit (Quit: Default Quit Message) |
09:22:19 | * | oddp joined #nim |
09:23:13 | * | fredrikhr joined #nim |
09:32:38 | FromDiscord | <ayetwoo> Question: is Nim a scripting lang? |
09:33:16 | Zevv | it can be |
09:33:20 | Zevv | but typically, now |
09:33:22 | Zevv | now |
09:33:23 | Zevv | no |
09:33:25 | Zevv | dang |
09:33:31 | FromGitter | <awr1> RE big arrays: be wary of large non-zero arrays that are initialized as such and not filled in some programmatic way after declaration |
09:35:21 | FromDiscord | <ayetwoo> Can it be concurrent like clojure? |
09:35:26 | FromGitter | <awr1> arrays initialized to a list of nonzero values will not be on the BSS segment and will thus increase binary size |
09:35:50 | FromGitter | <awr1> which is fine if the array is not very large, but can be concerning if the array is very large |
09:36:26 | FromGitter | <awr1> @ayetwoo Nim has multithreading capabilities |
09:39:04 | FromGitter | <awr1> really Nim should be understood as a multidomain language trending toward an intent of trying to disprove the common assertion that "you need X language for high-performance native programming, you need Y language for scripting, you need Z language for web development etc. etc." |
09:44:05 | * | opal quit (Remote host closed the connection) |
09:46:06 | FromGitter | <awr1> nim is quite usable for scripting |
09:46:13 | * | opal joined #nim |
09:46:25 | FromGitter | <awr1> (maybe some work needs to be done on making *embedded* scripting easier than it currently is) |
09:48:10 | FromGitter | <awr1> if you want to do very bash/awk/etc-ish things nim can do the job pretty well IMO |
09:55:04 | Oddmonger | if nim implements system (for calling system commands) and popen, that's ok for scripting… i think |
09:56:32 | FromDiscord | <lqdev> we have execShellCmd |
09:56:43 | FromDiscord | <lqdev> and the osproc module |
09:59:25 | Oddmonger | and a very nice curses like for text interfaces |
09:59:56 | Oddmonger | i wonder if a can do true color with it (examples are for 16 colors term) |
10:00:09 | FromDiscord | <lqdev> there's the terminal module |
10:00:21 | FromDiscord | <lqdev> and the illwill nimble package |
10:01:46 | Oddmonger | i guess i can pass whatever value for foreground / background, not only the enums provided |
10:03:43 | FromDiscord | <lqdev> yup |
10:03:54 | FromDiscord | <lqdev> you just need to `enableTrueColors()` |
10:04:19 | FromDiscord | <lqdev> and you can use `set{Fore,Back}groundColor()` with a `Color` |
10:04:28 | FromDiscord | <lqdev> which is a 24-bit RGB color (from the colors module) |
10:09:32 | Oddmonger | nice, thank you |
10:13:34 | * | D_ quit (Quit: No Ping reply in 180 seconds.) |
10:14:31 | * | D_ joined #nim |
10:34:36 | * | krux02 joined #nim |
11:01:12 | * | hoijui quit (Ping timeout: 260 seconds) |
11:08:26 | * | maier quit (Ping timeout: 258 seconds) |
11:13:15 | * | maier joined #nim |
11:23:02 | * | abm joined #nim |
11:23:52 | * | letto quit (*.net *.split) |
11:23:52 | * | endragor quit (*.net *.split) |
11:23:53 | * | xet7 quit (*.net *.split) |
11:23:53 | * | FromDiscord quit (*.net *.split) |
11:24:04 | * | FromGitter quit (*.net *.split) |
11:24:04 | * | def- quit (*.net *.split) |
11:27:32 | * | letto joined #nim |
11:27:32 | * | endragor joined #nim |
11:27:32 | * | xet7 joined #nim |
11:27:32 | * | FromDiscord joined #nim |
11:27:32 | * | FromGitter joined #nim |
11:27:32 | * | def- joined #nim |
11:49:17 | Yardanico | still can't figure out why after a while my forum updater bot just *dies* |
11:49:27 | Yardanico | I mean it is "checking" but doesn't print anything |
11:49:28 | * | ForumUpdaterBot quit (Remote host closed the connection) |
11:49:30 | Yardanico | need restarting |
11:49:35 | * | ForumUpdaterBot joined #nim |
11:49:43 | * | xet7 quit (Quit: Leaving) |
11:50:31 | * | xet7 joined #nim |
12:05:07 | * | Guest84250 quit (Remote host closed the connection) |
12:05:32 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:39 | * | supakeen joined #nim |
12:11:46 | * | hoijui joined #nim |
12:13:45 | Oddmonger | *sigh* … saying i was happy of my pangram on exercism… |
12:21:44 | FromDiscord | <demotomohiro> This pull request I sent to nimgl/imgui is not merged to nimgl/nimgl.↵https://github.com/nimgl/imgui/pull/2 |
12:21:45 | disbot | ➥ Fix compile error from nim cpp tests/test.nim |
12:27:59 | Yardanico | Araq: found a regression after last arc/orc PR (again from non-idiomatic havlak, but it should still *work* I guess :P), for me it SIGSEGVs with "address boundary error" with both arc/orc, probably something simple - https://gist.github.com/Yardanico/d654e8be96ade03ce2fcc18c56ea0108 |
12:28:47 | Yardanico | ah apparently if you remove the line under "# cycle" it will show a nim stacktrace with SIGSEGV in dealloc |
12:29:09 | Yardanico | but in that case it will only sigsegv with arc, not orc |
12:36:00 | FromDiscord | <Clyybber> Yardanico: The latest PR you mean the =destroy hook change? |
12:36:06 | Yardanico | yeah |
12:36:15 | Yardanico | 4raq took over your PR and merged it with some changes |
12:44:22 | FromDiscord | <KingDarBoja> @Clyybber thanks for fixing the tests of the colour theme switch, didnt know it had tests too |
12:45:22 | Yardanico | well, a lot of stuff has tests :) |
12:45:25 | Yardanico | even nimsuggest does |
12:52:35 | FromDiscord | <Zed> umm why is the `New Packages` section on the nimble directory trying to open up apple news for me?? |
12:52:45 | Yardanico | because RSS |
12:53:06 | Yardanico | "new packages" link is an RSS one |
12:53:10 | Yardanico | not sure if apple news can handle RSS news or not |
12:53:59 | FromDiscord | <Zed> ah, probably not, why doesn't it open up a page with recently submitted packages? |
12:54:03 | FromDiscord | <Zed> why RSS? |
12:54:24 | FromDiscord | <Clyybber> @KingDarBoja np, thx for fixing the issue :D |
13:00:39 | FromDiscord | <dom96> > deleting the dlls.zip doesn't help because it keeps trying to download it and extract it again↵@impbox this is fixed in choosenim HEAD IIRC. The problem is that you've got some of the DLLs in ~/.nimble/bin already. Workaround is to get rid of them. Please report these issues on GitHub btw, it's very easy to miss messages here. |
13:19:11 | * | hoijui quit (Ping timeout: 246 seconds) |
13:24:42 | * | hoijui joined #nim |
13:26:03 | * | matlock_ joined #nim |
13:27:24 | * | matlock quit (Ping timeout: 256 seconds) |
13:27:25 | FromDiscord | <lqdev> is there a way of debugging compile times? |
13:27:25 | * | matlock_ is now known as matlock |
13:27:39 | FromDiscord | <lqdev> there are some modules that take way longer than I expect them to |
13:27:40 | * | sirn quit (Ping timeout: 256 seconds) |
13:28:57 | * | sirn joined #nim |
13:29:18 | * | npgm quit (Ping timeout: 256 seconds) |
13:29:38 | * | npgm_ joined #nim |
13:30:28 | * | casaca quit (Ping timeout: 256 seconds) |
13:31:56 | FromGitter | <gogolxdong> Any excel proccessing library? |
13:33:44 | FromDiscord | <Vindaar> @gogolxdong: https://github.com/xflywind/xlsx like this? |
13:34:12 | FromDiscord | <Clyybber> @lqdev Theres a VM profiler |
13:34:22 | Yardanico | which got merged in devel :P |
13:36:01 | Yardanico | 1.4 will for sure be a big release :P |
13:40:06 | * | drewr quit (Ping timeout: 244 seconds) |
13:54:33 | bung | what cause nimble install old version package? I check jester repo, installed code older than git repo |
13:55:21 | solitudesf | nimble installs latest tag by default |
13:55:59 | bung | there's `@narimiran` |
13:56:00 | bung | narimiran fix deprecated stuff |
13:56:00 | bung | Latest commit 405be2e on 9 Apr |
13:56:23 | narimiran | bung: run `nimble install jester@#head` to get the latest version |
13:58:21 | bung | narimiran thanks ! solved. |
13:59:01 | bung | it install by repo's release ? |
13:59:54 | FromDiscord | <Zachary Carter> I have an object that has a bunch of function pointers as its fields - one of these function pointers eventually ends up calling a template function in C++ - which I've wrapped using generics |
14:00:23 | FromDiscord | <Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2rld |
14:00:28 | FromDiscord | <Zachary Carter> `destroyVector` is the function pointer in question |
14:01:04 | FromDiscord | <Rika> huh, is that possible? |
14:01:06 | FromDiscord | <Zachary Carter> and then in `destroyVector` I would just cast the `vector` parameter using something like - `cast[OzzVector[T]](vector)` |
14:01:07 | FromDiscord | <Zachary Carter> no |
14:01:15 | FromDiscord | <Zachary Carter> I get an error that typedesc is not a concrete type |
14:01:23 | FromDiscord | <Rika> well since its compile time |
14:01:24 | FromDiscord | <Zachary Carter> but I need to figure out a way to do this... |
14:01:33 | FromDiscord | <Zachary Carter> yeah :/ |
14:03:26 | FromDiscord | <Zachary Carter> I guess for now I just won't write this as a plugin - I don't intend for the end user to have to work with some of these functions anyway - they'll be abstracted away by the API |
14:04:20 | FromDiscord | <Zachary Carter> but I was trying to figure out how to design the API by writing it as a plugin, since I started writing a plugin to begin with |
14:04:36 | FromDiscord | <Zachary Carter> kind of approaching the problem backwards I guess but oh well - just need to move some code around and it should be fine |
14:05:08 | FromDiscord | <Rika> why does destroy vector need a typedesc in the first place? maybe you can work around that with a non-proc-pointer |
14:05:10 | FromDiscord | <Vindaar> if you only end up calling that function and won't return `T` in any way, why not use some `enum` as an arg to that proc, which you use to decide what to cast to? since you use `cast` that should work I guess? only works of course if it's a few known types |
14:05:26 | FromDiscord | <Rika> ^ thats a good point |
14:05:32 | FromDiscord | <Zachary Carter> that's a good idea @Vindaar |
14:05:48 | FromDiscord | <Zachary Carter> damn you good |
14:06:07 | FromDiscord | <Vindaar> 🙂 hope it actually works |
14:06:11 | FromDiscord | <Zachary Carter> I think it will! |
14:09:11 | * | NimBot joined #nim |
14:18:35 | FromDiscord | <Shucks> > @Shucks ohhh nice you got your asm stuff working? :D↵@exelotl Yea finally |
14:25:17 | * | mikebela_ joined #nim |
14:25:39 | * | lritter joined #nim |
14:33:27 | FromDiscord | <Shucks> @mratsim thanks for your post on the board btw |
14:34:53 | * | vsantana joined #nim |
14:37:58 | FromDiscord | <Recruit_main707> nim specifies an std version, how can i avoid it: `...-mno-ms-bitfields -std=c++17 -std=gnu++14 ...` |
14:38:16 | FromDiscord | <Recruit_main707> ^ mine ^ compiler's |
14:41:29 | FromDiscord | <Shucks> is there a pass Nim Compiler pragma? Instead of having that in nim.cfg |
14:44:38 | * | bung quit (Ping timeout: 258 seconds) |
14:51:13 | * | maier_ joined #nim |
14:52:30 | FromDiscord | <XxDiCaprioxX> sent a code paste, see https://play.nim-lang.org/#ix=2rlm |
14:54:13 | * | maier quit (Ping timeout: 264 seconds) |
14:55:06 | FromDiscord | <Vindaar> you're confused by python. You need a `=` instead of `:` at the end of the signature |
14:55:18 | FromDiscord | <XxDiCaprioxX> I did never do python, only Java |
14:55:24 | FromDiscord | <Vindaar> haha, ok |
14:55:38 | FromDiscord | <XxDiCaprioxX> But I thought : was also for procs |
14:55:46 | FromDiscord | <XxDiCaprioxX> Thank you, it works now |
14:56:02 | * | bung joined #nim |
14:56:27 | FromDiscord | <Vindaar> nah, it's `:` if it returns something (`proc foo(): float =`) |
14:56:52 | FromDiscord | <XxDiCaprioxX> Oh okay, got it now |
14:57:06 | FromDiscord | <Vindaar> the actual body is always after a `=` |
14:57:27 | FromDiscord | <XxDiCaprioxX> I overread that at the tutorial page haha thanks |
14:57:35 | FromDiscord | <Vindaar> no worries! |
15:02:33 | * | vikfret joined #nim |
15:02:39 | * | maier_ quit (Ping timeout: 256 seconds) |
15:03:58 | * | maier joined #nim |
15:05:28 | * | tane joined #nim |
15:08:30 | * | maier quit (Ping timeout: 260 seconds) |
15:13:22 | * | vsantana quit (Ping timeout: 246 seconds) |
15:23:06 | * | hyiltiz_ joined #nim |
15:24:24 | * | hyiltiz_ quit (Client Quit) |
15:25:48 | * | evilkhaoskat joined #nim |
15:27:26 | * | hyiltiz_ joined #nim |
15:28:38 | * | hyiltiz quit (Quit: hyiltiz) |
15:29:59 | * | hyiltiz_ quit (Client Quit) |
15:30:15 | * | evilkhaoskat quit (Ping timeout: 258 seconds) |
15:31:17 | FromDiscord | <mratsim> @Shucks you're welcome |
15:32:23 | * | hyiltiz joined #nim |
15:32:24 | * | hyiltiz quit (Changing host) |
15:32:24 | * | hyiltiz joined #nim |
15:32:48 | * | hyiltiz quit (Client Quit) |
15:32:57 | FromDiscord | <XxDiCaprioxX> If I want to add something to a string how I do it because += only works for ints and doubles |
15:33:06 | FromDiscord | <mratsim> &= |
15:33:18 | FromDiscord | <mratsim> or .add |
15:33:21 | FromDiscord | <XxDiCaprioxX> Thanks |
15:34:14 | FromDiscord | <XxDiCaprioxX> And If I have 2 conditions in an If statement how do I write it? |
15:35:56 | FromDiscord | <juan_carlos> condition and condition |
15:36:34 | FromDiscord | <XxDiCaprioxX> Okay thanks |
15:37:43 | FromDiscord | <Shucks> Facing new asm issues again. My functions get truly naked with optimizations but once I use a constant variable in the asm instruction I got a `sub esp, 0C` on top of that function >.< |
15:38:32 | * | hyiltiz joined #nim |
15:39:45 | * | hyiltiz quit (Client Quit) |
15:41:37 | FromDiscord | <XxDiCaprioxX> One more question: I have a proc that returns a boolean. How can I say "If it returns false"? Because↵```↵if !procname↵```is incorrect |
15:42:49 | FromDiscord | <Shucks> if not |
15:43:07 | FromDiscord | <XxDiCaprioxX> Thanks |
15:49:29 | FromDiscord | <mratsim> @Shucks that's allocating 12 bytes on the stack |
15:50:22 | FromDiscord | <Shucks> Yea, but why. So is there any reason why we can't use nim identifiers with the intel syntax? |
15:51:04 | FromDiscord | <mratsim> no idea, I don't use the Intel syntax in the low-level |
15:51:46 | FromDiscord | <mratsim> and for the allocation, are you using "let" or "var" temporaries somewhere? |
15:52:05 | FromDiscord | <Shucks> Played with your example but gcc complains with `operand type mismatch for jno`: https://play.nim-lang.org/#ix=2rlw |
15:53:24 | * | hyiltiz joined #nim |
15:53:25 | * | hyiltiz quit (Changing host) |
15:53:25 | * | hyiltiz joined #nim |
15:54:03 | FromDiscord | <mratsim> you are echoing, this requires allocating space for a string on the stack |
15:54:05 | * | hyiltiz quit (Client Quit) |
15:55:07 | FromDiscord | <mratsim> jno is only valid for 8, 16 or 32-bit displacement |
15:55:24 | FromDiscord | <mratsim> force uint32 not int |
15:55:34 | FromDiscord | <mratsim> int32* |
15:56:05 | FromDiscord | <mratsim> all there: https://www.felixcloutier.com/x86/jcc |
16:00:33 | FromDiscord | <Shucks> Yea. Im injecting code into a function. All I care about is that the original code (`add eax, 1`) gets executed before anything else happens and jmp back. Since I'm pushing/popping registers it shouldn't (?) really matter what I do between. |
16:00:46 | FromDiscord | <Shucks> uint32 seems not to be valid aswell |
16:01:33 | * | hyiltiz joined #nim |
16:01:33 | * | hyiltiz quit (Client Quit) |
16:02:01 | * | hyiltiz joined #nim |
16:02:01 | * | hyiltiz quit (Changing host) |
16:02:01 | * | hyiltiz joined #nim |
16:02:40 | * | hyiltiz quit (Client Quit) |
16:02:54 | * | hyiltiz joined #nim |
16:02:54 | * | hyiltiz quit (Changing host) |
16:02:54 | * | hyiltiz joined #nim |
16:05:52 | FromDiscord | <Shucks> at&t is horrible. |
16:05:55 | FromDiscord | <Recruit_main707> are there any examples of inheriting from a c++ class in nim? (if thats even possible) |
16:06:24 | FromDiscord | <mratsim> @Recruit_main707 maybe if you hack: https://github.com/nim-lang/Nim/wiki/Playing-with-CPP--VTABLE-from-Nim |
16:06:40 | * | audiophile joined #nim |
16:06:50 | * | Trustable joined #nim |
16:07:23 | FromDiscord | <mratsim> @Shucks you can't allocate in that case, every local variable will reserve some memory by substracting from the stack pointer on function entry |
16:08:45 | FromDiscord | <Shucks> huh, JmpBack should be global right |
16:09:46 | FromDiscord | <Shucks> I mean what actually works is: `const JmpBack = $0x12345; asm """jmp JmpBack"""` |
16:09:51 | * | vsantana joined #nim |
16:12:46 | FromDiscord | <Shucks> but once I use `const JmpBack = $ (0x12345 + 5)` its allocating bytes on the stack on top in my function. Even when JmpBack is global |
16:22:20 | FromDiscord | <Recruit_main707> > maybe if you hack: https://github.com/nim-lang/Nim/wiki/Playing-with-CPP--VTABLE-from-Nim↵@mratsim does that mean there is no actual way to do it? |
16:22:58 | FromDiscord | <mratsim> you can emit C++ that you importcpp |
16:23:49 | FromDiscord | <Recruit_main707> i guess i could use some templates to make it look not like shit... |
16:26:15 | * | Zevv quit (Quit: Lost terminal) |
16:26:41 | * | Zevv joined #nim |
16:27:48 | bung | is there any open api of video site, I want build a video site frontend |
16:29:31 | * | waleee-cl joined #nim |
16:29:57 | * | alehander92_ is now known as alehander92 |
16:30:17 | * | alehander92 is now known as alexander92 |
16:30:27 | * | alexander92 is now known as alehander92_ |
16:30:40 | * | mikebela_ quit (Remote host closed the connection) |
16:31:30 | FromGitter | <awr1> @Shucks you can use nim idents with asm |
16:31:36 | FromGitter | <awr1> just tag them as `exportc` |
16:32:54 | * | abm quit (Ping timeout: 240 seconds) |
16:38:38 | * | Trustable quit (Remote host closed the connection) |
16:44:54 | FromGitter | <awr1> @bung maybe vidlii? |
16:45:58 | * | hyiltiz quit (Quit: hyiltiz) |
16:45:58 | FromDiscord | <Zachary Carter> If I have a global variable of a type that has fields for objects which I've importcpp'd - I have to explicitly call the destructors on those fields, correct? |
16:46:27 | FromDiscord | <Zachary Carter> in other words Nim won't implicitly call destructors for importcpp'd objects that are in global scope |
16:46:39 | FromDiscord | <Zachary Carter> (edit) 'scope' => 'scope?' |
16:46:45 | bung | vidlii.com ? havn't seen before, let me check |
16:48:55 | FromGitter | <awr1> @Zachary Carter i believe so. dtors on global vars should only get autocalled on program exit |
16:49:06 | FromDiscord | <Zachary Carter> well they're not |
16:49:11 | FromDiscord | <Zachary Carter> at least the C++ destructor is not getting called |
16:49:58 | FromDiscord | <Zachary Carter> which is annoying - because the C++ library I'm using is doing some leak detection - and I *think* I'm calling all the destructors explicitly for objects I've allocated on the heap - but apparently I'm not because the leak detection assert is failing |
16:50:08 | FromDiscord | <Zachary Carter> so I'm missing something - but what I'm not sure |
16:50:48 | FromDiscord | <Zachary Carter> it has something to do with the vector that's been allocated though |
16:51:10 | * | hyiltiz joined #nim |
16:51:10 | * | hyiltiz quit (Changing host) |
16:51:10 | * | hyiltiz joined #nim |
16:51:22 | * | lbart_ joined #nim |
16:51:23 | FromGitter | <awr1> why are you calling it on the fields though? why not on the whole object? |
16:51:51 | FromDiscord | <Zachary Carter> well the object is a Nim object |
16:52:01 | * | lbart quit (Ping timeout: 256 seconds) |
16:52:06 | FromDiscord | <Zachary Carter> I think maybe I just need to wrap this Delete method in the allocator class for ozz-animation |
16:52:12 | FromDiscord | <Zachary Carter> and call that on the vector - that will probably free it up |
16:52:28 | FromGitter | <awr1> oh i thought you mean the object itself was a `importcpp`'d class or w/e |
16:53:06 | FromDiscord | <Zachary Carter> ah no - sorry for the confusion |
16:53:57 | * | hyiltiz quit (Client Quit) |
16:54:04 | FromGitter | <awr1> do things get dtor'd if, say, this wasn't a global var? |
16:54:43 | FromDiscord | <Zachary Carter> yes apparently |
16:54:52 | FromDiscord | <Zachary Carter> because then the leak detector doesn't whine |
16:55:17 | FromGitter | <awr1> is the variable tagged as `{.global.}` |
16:55:55 | FromDiscord | <Zachary Carter> nope |
16:56:10 | FromDiscord | <Zachary Carter> but I think that only has an effect if it's inside a proc and it basically makes it a static |
16:57:44 | FromGitter | <awr1> well |
16:58:26 | FromGitter | <awr1> `global` IIRC makes sure that it is statically allocated |
16:59:00 | FromGitter | <awr1> i believe there are cases where a nim module global can technically be a implicit local (don't quote me on this) |
16:59:54 | FromDiscord | <Zachary Carter> hmm |
17:00:03 | * | Vladar quit (Remote host closed the connection) |
17:00:17 | bung | found one https://www.themoviedb.org/documentation/api seems good to me |
17:01:07 | * | Vladar joined #nim |
17:02:26 | FromDiscord | <Recruit_main707> i was wondering... if an object inherits from a c++ wrapped class, wouldnt it be better that the generated code was also an actual c++ class?↵this is all hypothetical, but lets say someone made a pr that added this feature, would it be welcomed? |
17:05:45 | FromGitter | <awr1> i dont understand what you mean. if an object has c++ inheritance it should be a c++ class |
17:06:47 | FromGitter | <awr1> unless you mean nim inheritance (i.e. `object of Ancestor`) of an object that was `importcpp`'d |
17:07:13 | FromDiscord | <Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=2rlJ |
17:07:27 | FromDiscord | <Recruit_main707> thats what i mean ye |
17:08:03 | FromGitter | <awr1> in that case i worry that this will not be a good idea |
17:08:40 | FromDiscord | <Recruit_main707> why do you think so? |
17:08:52 | FromGitter | <awr1> it will get weird if you involve dynamic dispatch |
17:09:12 | * | audiophile_ joined #nim |
17:09:13 | FromDiscord | <Recruit_main707> isnt that the main point of inheritance? |
17:09:21 | FromGitter | <awr1> because |
17:09:23 | FromGitter | <awr1> > Nim does not produce a virtual method table, but generates dispatch trees. This avoids the expensive indirect branch for method calls and enables inlining. However, other optimizations like compile time evaluation or dead code elimination do not work with methods. |
17:09:40 | * | audiophile_ quit (Client Quit) |
17:10:07 | FromDiscord | <Recruit_main707> nim does not produce virtual method tables bc it does not produce *real* c++ classes |
17:11:24 | * | hyiltiz joined #nim |
17:11:24 | * | hyiltiz quit (Changing host) |
17:11:24 | * | hyiltiz joined #nim |
17:11:31 | FromGitter | <awr1> well yes and no. nim could have implemented vtables if it wanted to without C++ classes. my problem is you are approaching a problem of incompatibility with respect to the generated code |
17:12:48 | * | audiophile quit (Ping timeout: 272 seconds) |
17:12:54 | FromDiscord | <Recruit_main707> in what way would it be incompatible? |
17:14:36 | FromGitter | <awr1> if you create a `method` on an inherited C++ class you have to produce a C++ method instead of a free function which is what nim normally does |
17:17:57 | FromGitter | <awr1> i worry that you will run into something that will not mesh correctly |
17:22:21 | FromDiscord | <Recruit_main707> maybe but i guess it wouldnt be too hard to make distinctions between methods in each situation |
17:43:03 | bung | am wondering can js backend can have `multisync` pragma ? |
17:52:59 | * | hoijui quit (Ping timeout: 272 seconds) |
17:58:08 | * | vsantana quit (Quit: leaving) |
18:01:22 | * | lritter quit (Ping timeout: 246 seconds) |
18:05:33 | Yardanico | bung: well yes |
18:05:45 | Yardanico | but it's not needed for JS |
18:05:50 | Yardanico | since asyncdispatch doesn't work on JS backend anyway |
18:05:55 | Yardanico | you'd need to use something like https://nim-lang.org/docs/asyncjs.html |
18:06:13 | * | lritter joined #nim |
18:06:46 | * | nikita` quit (Quit: leaving) |
18:16:33 | bung | Yardanico it provider promise , so I need wrap two version of same api |
18:19:53 | Yardanico | yes |
18:20:57 | bung | it would be better just mapping to one proc, avoiding js has sync,async,callback patterns. |
18:24:17 | * | maier joined #nim |
18:28:52 | * | casaca joined #nim |
18:38:16 | * | solitudesf quit (Remote host closed the connection) |
18:43:20 | * | solitudesf joined #nim |
18:44:01 | * | evilkhaoskat joined #nim |
18:46:20 | * | hoijui joined #nim |
18:48:45 | planetis[m] | this error happens when compiling nico with arc: https://pastebin.com/K29Gfe4t |
18:49:23 | planetis[m] | should i use {.nosink.} in loadSurfaceIndexed or is it because sdl2.Surface has no destructors? |
18:53:01 | FromDiscord | <Clyybber> yeah, just {.nosink.{ |
18:53:32 | FromDiscord | <Clyybber> you can also compile with --sinkInference:off to get rid of these errors |
18:53:36 | * | charmander joined #nim |
18:57:27 | charmander | Hi! I’m trying to open a file and handle the file-not-found error separately from others. Is there a better way to do that than checking if os.osLastError() == OSErrorCode(posix.ENOENT)? |
18:59:40 | planetis[m] | thanks clybber! |
19:05:42 | * | msmorgan quit () |
19:07:59 | planetis[m] | so do all closures need .nosink? |
19:22:31 | * | msmorgan joined #nim |
19:23:23 | FromDiscord | <Clyybber> pretty much yeah |
19:23:41 | FromDiscord | <Clyybber> not when sinkInference would not infer a sink param anyways |
19:29:26 | planetis[m] | it doesnt work actually at proc definition ``proc loadSurfaceIndexed*(filename: sink string, callback: proc(surface: common.Surface)) {.nosinks.} =...`` but only .sinkinference: off at call site |
19:29:52 | planetis[m] | ...and test fail so needs needs more investigation |
19:32:05 | charmander | (also, if that is the best way to do it, is defined(posix) the best way to check whether it’ll work?) |
19:33:25 | FromDiscord | <Clyybber> planetis: Yeah, you need to put the {.nosinks.} at the definition of whatever you are passing to callback |
19:33:51 | FromDiscord | <Clyybber> But not at loadSurfaceIndexed |
19:34:16 | FromDiscord | <Clyybber> You could also try this: `proc loadSurfaceIndexed*(filename: sink string, callback: proc(surface: sink common.Surface)) = ...` |
19:34:57 | * | PMunch joined #nim |
19:35:18 | FromDiscord | <Clyybber> nosinks disables the sinkInference. The sink inference looks at the procs body and figures out if its params would benefit from being sink params |
19:35:50 | PMunch | Hi everyone! Anyone participating in the GMTK game jam with Nim this year? |
19:36:09 | FromDiscord | <Clyybber> PMunch: WB, I think @impbox will be participating |
19:36:33 | PMunch | Would assume as much :) |
19:36:50 | PMunch | Not really back by the way, I've just got an hour to kill on a ferry.. |
19:39:18 | * | PMunch quit (Read error: Connection reset by peer) |
19:40:24 | * | PMunch joined #nim |
19:40:41 | FromDiscord | <Clyybber> ah nice |
19:41:39 | PMunch | Apparently the internet out here is a bit flaky though.. |
19:42:00 | PMunch | Should've probably connected through Discord or something |
19:44:09 | FromDiscord | <lqdev> is irc that heavy tho |
19:44:09 | * | PMunch quit (Read error: Connection reset by peer) |
19:44:16 | FromDiscord | <lqdev> discord is a goddamn website |
19:44:21 | FromDiscord | <lqdev> unless you use a custom client |
19:45:38 | charmander | but IRC loses messages while disconnected. which just happened to them |
19:46:12 | FromDiscord | <lqdev> well yeah there's that |
19:46:32 | Prestige | noooo I missed him |
19:53:25 | planetis[m] | clyybber: using ``sink Surface`` didn't fix it, also this project uses the do notation and doesn't work with pragmas... |
19:53:46 | * | synshroud joined #nim |
20:02:41 | planetis[m] | it would be nice if someone documented the reason for disabling sink inference a bit better, but thank you for your help! |
20:07:49 | FromDiscord | <Clyybber> np |
20:08:03 | FromDiscord | <Clyybber> but yeah, documentation is still lacking as arc is still WIP :) |
20:09:29 | * | evilkhaoskat quit (Remote host closed the connection) |
20:13:04 | * | madprops joined #nim |
20:13:21 | madprops | trying to think of something to make with nim |
20:13:35 | madprops | haven't used it in a while |
20:13:52 | * | evilkhaoskat joined #nim |
20:14:28 | FromDiscord | <Rika> long time no see i think |
20:14:36 | madprops | yep |
20:16:43 | FromDiscord | <lqdev> @planetis you can use do notation with pragmas tho |
20:17:02 | FromDiscord | <lqdev> `someProc(123) do (aa: int) {.cdecl.}: echo "a"` works just fine |
20:17:27 | planetis[m] | you're right thanks |
20:17:38 | FromDiscord | <Clyybber> oh right! |
20:18:31 | * | evilkhaoskat quit (Ping timeout: 258 seconds) |
20:20:33 | FromDiscord | <brainproxy> Anyone using WiX Toolset to create Windows installer for their app/tool built with Nim?↵↵I'm completely new to building an installer for Windows. Google search turns up a ton of stuff re: wix, but a lot of it's old or assumes you're using Visual Studio, etc. I was wondering if anyone knows of a good example or tutorial that's fairly up-to-date and that's from the perspective of using the wix cli tools (e.g. heat) to build and maint |
20:26:17 | * | vsantana joined #nim |
20:30:52 | * | hoijui quit (Ping timeout: 256 seconds) |
20:32:16 | * | tinga_ is now known as tinga |
20:34:26 | FromDiscord | <--HA--> Is there a proc (or something) to get an element at an index from a sequence or a default (instead of exception) if that index is out of range? |
20:35:49 | FromDiscord | <Rika> not for arrays |
20:35:51 | FromDiscord | <Rika> or seq |
20:36:02 | FromDiscord | <Rika> which is weird since tables have them |
20:36:09 | FromDiscord | <Rika> (getOrDefault) |
20:37:11 | FromDiscord | <--HA--> Ah yes, tables, that must have been where I saw it then. Thanks. |
20:39:59 | * | narimiran quit (Ping timeout: 258 seconds) |
20:42:09 | * | lbart_ is now known as lbart |
20:42:14 | * | lbart quit (Changing host) |
20:42:14 | * | lbart joined #nim |
20:44:04 | madprops | oh nice the docs have a dark mode now heh |
20:44:18 | madprops | looks pretty slick |
20:46:26 | * | audiophile_ joined #nim |
20:58:48 | madprops | what am I doing obviously wrong here? https://play.nim-lang.org/#ix=2rml |
21:00:13 | FromDiscord | <Rika> bg/fgColor isnt a `Color` |
21:00:19 | FromDiscord | <Rika> its a Background/ForegroundColor |
21:00:25 | FromDiscord | <Varriount> @brainproxy I recall experimenting with WiX a bit. If I recall correctly, it doesn't come bundled with a front-end |
21:00:39 | FromDiscord | <Varriount> (edit) 'recall' => 'remember' |
21:00:48 | FromDiscord | <Rika> wait huh |
21:00:51 | FromDiscord | <Varriount> That is, the generated installers don't have a GUI |
21:00:52 | FromDiscord | <Rika> one moment checking docs |
21:01:22 | FromDiscord | <brainproxy> @Varriount it's able to generate an `.msi`, I assume that has a gui, but... maybe not |
21:01:26 | FromDiscord | <Rika> ok madprops, i see the issue |
21:01:50 | FromDiscord | <Rika> theres no ansiBackgroundColorCode that takes in a BackgroundColor |
21:01:52 | FromDiscord | <Varriount> @brainproxy Bundling a Nim-generated executable should be fairly straightforward, as its just the executable and anything DLLs needed. |
21:02:51 | FromDiscord | <brainproxy> this one has a lot of Qt stuff, and needs Visual C++ runtime installed (depending on version of Windows) |
21:03:27 | FromDiscord | <Varriount> I would bundle the Qt DLLs with the executable, and place them in Program Files |
21:03:57 | * | laqq3 joined #nim |
21:04:25 | FromDiscord | <brainproxy> so I like the idea of an installer to handle that automagically, but I'm thinking an install-less bundle may be the easiest way to start, and `windeployqt` puts the Visual C++ redistributable installer `.exe` in the folder so could just explain in instructions you may need to install it if you see an error message re: msvcrt |
21:05:08 | FromDiscord | <brainproxy> Cmder mini, for example, doesn't have an installer; you just unzip the download and put it wherever you want |
21:05:45 | FromDiscord | <brainproxy> (edit) 'it' => 'the folder' |
21:07:06 | madprops | Rika got it. I just use 'colGreen' etc by importing 'colors' |
21:07:09 | madprops | thanks |
21:08:05 | FromDiscord | <Varriount> @brainproxy My impression of WiX (and this might be flawed) was that it was the kind of tool that you write generators for. |
21:08:28 | FromDiscord | <Varriount> I believe that there was some helper tool that would generate an initial XML file for you though. |
21:08:58 | * | laqq3 quit (Ping timeout: 246 seconds) |
21:09:11 | FromDiscord | <brainproxy> yes, `heat.exe` |
21:09:48 | FromDiscord | <brainproxy> but... there's so much stuff that can go in the `.wxs` xml file, which is used to build the `.msi` |
21:09:53 | FromDiscord | <brainproxy> it's quite overwhelming |
21:10:36 | FromDiscord | <brainproxy> I can probably cobble something together, but this isn't for a hobby project, so makes me nervous to think I'll screw it up |
21:11:56 | FromDiscord | <Varriount> brainproxy: Hm. Well if you don't need a super-professional installer, a self-extracting archive (or just an archive) is perfectly serviceable. |
21:12:46 | FromDiscord | <Varriount> Some other installer programs I recall are ClickTeam, NSIS, and Inno |
21:14:21 | FromDiscord | <Varriount> NSIS is probably the easiest, although I wouldn't call the scripting language "intuitive" |
21:15:54 | FromDiscord | <Varriount> brainproxy: What is your audience (that is, who do you expect to be using your program?) |
21:17:59 | FromDiscord | <Varriount> @brainproxy ^ |
21:19:10 | FromDiscord | <brainproxy> the world |
21:19:25 | FromDiscord | <Varriount> Hm. Is this a commercial program? |
21:19:27 | FromDiscord | <brainproxy> https://github.com/status-im/nim-status-client |
21:19:35 | FromDiscord | <Varriount> Ah, ok. |
21:20:09 | FromDiscord | <brainproxy> yeah, I think I'm going to go the Cmder mini route for now |
21:20:10 | FromDiscord | <Varriount> Hm. I'd probably recommend NSIS then. Although, I wonder what Python uses. |
21:20:49 | FromDiscord | <brainproxy> (edit) 'yeah,' => '> a self-extracting archive (or just an archive) is perfectly serviceable↵yeah,' |
21:22:01 | * | Vladar quit (Quit: Leaving) |
21:24:35 | FromDiscord | <Varriount> @brainproxy As nice as it would be to have a drag&drop client for creating installers... I'm guessing software that does that is commercial. |
21:25:45 | FromDiscord | <brainproxy> the company behind WiX has a commercial offering and paid consulting for installer code review, so definitely |
21:26:07 | FromDiscord | <Varriount> "paid consulting" == "$$$$" |
21:26:15 | FromDiscord | <brainproxy> indeed |
21:26:29 | FromDiscord | <Varriount> At least, that's my experience with consulting that goes along with already commercial projects. |
21:27:00 | FromDiscord | <Varriount> It generally seems targeted at companies/projects that have more money than sense. |
21:27:28 | FromDiscord | <Varriount> Or, at least, enough money that they don't have to be too careful about spending it. |
21:31:28 | charmander | > trying to open a file and handle the file-not-found error separately from others. Is there a better way to do that than checking if os.osLastError() == OSErrorCode(posix.ENOENT)? |
21:31:33 | FromGitter | <awr1> You can probably code a self-extracting archive system in Nim itself using `slurp()` |
21:31:56 | charmander | this was handling IOError, but maybe it’d be better to open the file using a function that would raise an OSError directly instead? |
21:32:52 | FromDiscord | <Varriount> @awr1 @brainproxy Yeah, and even program a text-based installer. 🤔 |
21:33:16 | FromDiscord | <Varriount> (that's actually not a bad idea for a package) |
21:33:48 | FromDiscord | <Varriount> Although, coordinating with Windows that you need admin access is a bit of a dance, if you intend to install to Program Files |
21:34:17 | FromDiscord | <Varriount> (and I don't approve of the practice of installing to AppData. It's not secure) |
21:34:22 | * | maier quit (Ping timeout: 272 seconds) |
21:34:27 | FromDiscord | <Varriount> *only installing to |
21:38:19 | FromGitter | <awr1> Would be a neat project, yeah |
21:40:00 | * | maier joined #nim |
21:42:54 | FromDiscord | <Zachary Carter> okay so I needed to resize the C++ wrapped vector to 0 to avoid the memory leak |
21:43:04 | FromDiscord | <Zachary Carter> but yay - progress |
21:45:08 | * | maier quit (Ping timeout: 272 seconds) |
21:45:20 | * | solitudesf quit (Ping timeout: 256 seconds) |
21:51:03 | FromDiscord | <Varriount> @Zachary Carter How are things going? |
21:52:10 | FromDiscord | <Rika> doesnt niminst exist already |
21:52:28 | FromDiscord | <Rika> https://github.com/nim-lang/niminst |
21:52:38 | FromDiscord | <Rika> ah, unix only |
21:53:10 | FromDiscord | <Zachary Carter> @Varriount - good thanks! Working on ozz-animation bindings and porting a sample to my project |
21:53:14 | FromDiscord | <Zachary Carter> how are things going with you? |
21:55:03 | * | vsantana quit (Quit: leaving) |
22:00:10 | FromDiscord | <Varriount> Working on expanding Winim |
22:03:35 | * | NimBot joined #nim |
22:03:55 | FromDiscord | <Varriount> @Zachary Carter I'm also attempting to parse C# assemblies |
22:12:59 | ForumUpdaterBot | New thread by Tim_H: Karax not redrawing when adding elements to seq?, see https://forum.nim-lang.org/t/6531 |
22:17:50 | FromDiscord | <--HA--> I have an object type declared in a file I import and when I want to access a field on a variable of that type I get an undeclared field error.↵The field is there though, it is spelled correctly and when I echo the variable I see the field. What am I doing wrong? |
22:18:31 | FromDiscord | <Recruit_main707> Not sure, but maybe your field is “private” |
22:20:52 | FromDiscord | <--HA--> the type has the `*` |
22:21:08 | FromDiscord | <Recruit_main707> And the field? |
22:27:07 | FromDiscord | <--HA--> The field didn't. When I put a * there it works. Thanks I missed that that can (and has to) be done for fields as well. With fieldPairs I could access them anyway, just not directly. |
22:27:40 | FromDiscord | <Recruit_main707> No problem |
22:30:18 | FromDiscord | <--HA--> Do you know the reason why it is done like this? I'm wondering why would I want to export a type but none of its fields? And why does fieldPairs work on non exported fields? |
22:30:46 | FromDiscord | <Rika> sometimes you want to export only *some* of its fields |
22:30:58 | FromDiscord | <Rika> what if you wanted a field that was getter only? |
22:31:11 | FromDiscord | <Rika> if so, hide the field and make a getter proc |
22:31:48 | leorize[m] | usually it's to hide the implementation from being tampered by accident |
22:32:02 | FromDiscord | <Zachary Carter> @Varriount interesting... |
22:32:28 | leorize[m] | a hash table for example, requires it's field to be modified with a precise procedure or else the table corrupts |
22:32:32 | FromDiscord | <--HA--> So I can mark all my fields with the asterisk since I want them to be available I guess. Is there a shortcut for that? |
22:32:55 | disruptek | not yet. |
22:33:05 | leorize[m] | nope, unfortunately |
22:35:00 | FromDiscord | <Elegant Beef> A macro could do it, but you'd have to write the macro 😄 |
22:35:36 | FromDiscord | <--HA--> Ok. And sorry to repeat my question, just trying to understand how it works. Why does fieldPairs list all the fields anyway, exported or not? |
22:35:45 | FromDiscord | <Recruit_main707> That’s a nice little project to start getting to know macros actually |
22:35:57 | FromDiscord | <Elegant Beef> Which reminds me pragma macros, can they change the body of the proc? |
22:36:06 | FromDiscord | <Recruit_main707> Yes |
22:36:35 | FromDiscord | <Recruit_main707> fielsPairs maybe acts at at level and can see the fields |
22:36:40 | FromDiscord | <Zachary Carter> Ugh so confused - it seems like sometimes the destructor for my wrapped C++ object is getting called, and other times it isn't :/ |
22:36:42 | FromDiscord | <Zachary Carter> this is annoying |
22:36:47 | FromDiscord | <Recruit_main707> at AST* |
22:36:58 | FromDiscord | <Elegant Beef> sent a code paste, see https://play.nim-lang.org/#ix=2rmE |
22:37:42 | FromDiscord | <Recruit_main707> Zachary I read something about finalizers and they sound like they might be what you need, not sure at all though |
22:37:45 | FromDiscord | <Elegant Beef> Now back to this issue :D↵https://play.nim-lang.org/#ix=2rjs |
22:38:04 | FromDiscord | <Rika> beef what issue |
22:38:10 | FromDiscord | <Elegant Beef> Float doesnt work |
22:38:14 | FromDiscord | <Elegant Beef> but ints do |
22:38:20 | FromDiscord | <Elegant Beef> and objects dont work |
22:38:25 | FromDiscord | <Elegant Beef> atleast after the first param |
22:38:45 | FromDiscord | <Elegant Beef> Converting to a byteStream and back doesnt work i should say |
22:38:51 | FromDiscord | <Rika> give me a moment to try understanding this... |
22:39:19 | FromDiscord | <Elegant Beef> In theory it just converts to a byte stream, the it casts back |
22:39:28 | FromDiscord | <Elegant Beef> But iirc the float endianess is wrong |
22:40:49 | FromDiscord | <Elegant Beef> Nah not endianess, just the converter i used uses a different default endianess |
22:41:12 | FromDiscord | <Elegant Beef> the hex of the string is write, but the casting isnt |
22:41:17 | FromDiscord | <Elegant Beef> (edit) 'write,' => 'right,' |
22:41:41 | FromDiscord | <Recruit_main707> If you get this to work with complex objects ping me pls |
22:41:47 | FromDiscord | <Elegant Beef> lol, will do |
22:41:58 | FromDiscord | <Elegant Beef> If we solve the float issue i imagine the objects will work too |
22:42:42 | FromDiscord | <Elegant Beef> Im currently trying to use netty to make a RPC system, but.. we'll see how this goes 😄 |
22:43:10 | FromDiscord | <Elegant Beef> Objects work for the first variable, and then the next run into a wall |
22:43:21 | FromDiscord | <Rika> the funky thing is that the float changes every run |
22:43:45 | FromDiscord | <Elegant Beef> Not here |
22:43:50 | FromDiscord | <Elegant Beef> 1.26e-43 |
22:44:16 | FromDiscord | <Elegant Beef> the output string is right though |
22:44:19 | FromDiscord | <Elegant Beef> so idk |
22:44:30 | FromDiscord | <Elegant Beef> `5AA4C842` |
22:44:38 | FromDiscord | <Elegant Beef> that's 101.321 |
22:44:58 | FromDiscord | <Elegant Beef> but... it doesnt cast properly, which is weird |
22:45:16 | FromDiscord | <Elegant Beef> cant tell if this is a bug or me missing something |
22:48:09 | * | hyiltiz_ joined #nim |
22:48:28 | * | hyiltiz quit (Quit: hyiltiz) |
22:48:29 | FromDiscord | <Elegant Beef> Rearranging it i now get 3.06e-41 |
22:50:25 | FromDiscord | <Rika> truly interesting |
22:52:31 | FromDiscord | <Rika> ah this will not work with strings at all ever lol |
22:52:37 | FromDiscord | <Rika> at least w/o some large changes |
22:52:44 | FromDiscord | <Rika> i mean strings in objects |
22:53:22 | * | sagax quit (Remote host closed the connection) |
22:53:37 | FromDiscord | <Elegant Beef> Why not? |
22:54:11 | FromDiscord | <Elegant Beef> If you get a byteStream that matches 1:1 of a non ref object casting from string should work fine, no? |
22:54:15 | FromDiscord | <Rika> strings are refs tho |
22:54:43 | FromDiscord | <Elegant Beef> yea but you're casting just the data in the string not the 4 bits left of it |
22:54:55 | FromDiscord | <Rika> so the current code would cast the pointer stored in the object no? |
22:55:13 | FromDiscord | <Elegant Beef> I mean like i said the first field was copied fine |
22:55:42 | FromDiscord | <Elegant Beef> I dont know if it'd impossible, and am dubious to make any claims considering i cant get a float |
22:55:48 | FromDiscord | <Elegant Beef> (edit) 'it'd' => 'it's' |
22:58:22 | FromDiscord | <Recruit_main707> Id rather return the ptr UncheckedArray and cast to a ptr T instead |
22:58:53 | FromDiscord | <Elegant Beef> I mean netty uses a string for messages, so i sorta need the byte signature |
22:59:04 | FromDiscord | <Rika> ok i have a feeling we're casting the wrong things |
22:59:15 | FromDiscord | <Elegant Beef> But it works for ints |
23:01:25 | FromDiscord | <impbox> PMunch sure am! Trying to solidify my idea for the theme |
23:01:30 | FromDiscord | <Rika> ill stop working on it btw, i have other things to do |
23:02:10 | FromDiscord | <impbox> (GMTK game jam) |
23:02:31 | FromDiscord | <--HA--> How can I assign an empty seq to an Option[seq]? How would I make this work for example `let foo: Option[seq[int]] = some @[]`? |
23:03:06 | FromDiscord | <Elegant Beef> `option(@[dataHere])` |
23:03:29 | FromDiscord | <Elegant Beef> https://nim-lang.org/docs/options.html#option%2CT |
23:04:08 | FromDiscord | <--HA--> yes, but without the dataHere. I want an empty seq in there. |
23:04:39 | FromDiscord | <Elegant Beef> But that's a let |
23:04:40 | FromDiscord | <Rika> some(newSeq[type]())? |
23:04:43 | FromDiscord | <Elegant Beef> so that's literally useless |
23:04:49 | FromDiscord | <Rika> that too |
23:05:02 | FromDiscord | <Elegant Beef> Let is immutable |
23:05:06 | FromDiscord | <Elegant Beef> you couldnt append data to it |
23:05:16 | * | tane quit (Quit: Leaving) |
23:05:25 | FromDiscord | <Rika> seqs may be refs under the hood but they act like regular primitives externally |
23:05:39 | FromDiscord | <Rika> aka a let'd seq cant change, etc |
23:05:44 | FromDiscord | <Recruit_main707> If we are gonna talk about useless things watch out, don’t mess with the professional |
23:05:55 | FromDiscord | <Rika> good point, ill let them talk 😛 |
23:06:35 | FromDiscord | <Elegant Beef> Also rika i tested a single string input and both of the int types still work |
23:06:50 | FromDiscord | <--HA--> Nice, some(newSeq[type]()) was what I was looking for. @Rika |
23:06:50 | FromDiscord | <Rika> i mean within an object |
23:06:54 | FromDiscord | <Elegant Beef> Yea i know |
23:07:27 | FromDiscord | <Elegant Beef> Where are all the super smart people at |
23:07:35 | FromDiscord | <Elegant Beef> the ones that push glasses sincerely |
23:07:39 | * | msmorgan left #nim ("User left") |
23:07:46 | FromDiscord | <Rika> i have glasses but i dont wear them because me dumb |
23:07:58 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> ~~Am i smart if i code on mobile?~~ |
23:08:01 | FromDiscord | <Rika> (in reality, i dont need to, i just get a headache if i dont) |
23:08:09 | FromDiscord | <Rika> no you're a masochist |
23:08:18 | FromDiscord | <Recruit_main707> ^ |
23:08:19 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> :owoMiunaCry: |
23:08:30 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> :owoMochaCry: |
23:08:36 | FromDiscord | <Rika> :MikoXD: |
23:09:05 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> :02Calc: |
23:09:10 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> ZeroTwo is smart |
23:09:15 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> See she has glasses |
23:09:26 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> So she is very smart |
23:09:32 | FromDiscord | <Rika> now that youve mentioned glasses, i dont actually know where mine are |
23:09:38 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Oof |
23:09:42 | FromDiscord | <Rika> (its been months since i last wore them) |
23:11:19 | FromDiscord | <Rika> @Elegant Beef more info: if i additionally do the bit thing and cast w/ an object, the float changes value |
23:11:36 | FromDiscord | <Rika> which is why i'm thinking you're casting the wrong thing |
23:12:13 | FromDiscord | <Elegant Beef> Hmmmmmm |
23:12:35 | FromDiscord | <Elegant Beef> I just dont see whatelse i cant cast |
23:13:26 | FromDiscord | <XxDiCaprioxX> How the fuck did the topuc go to Zero freaking Two |
23:13:33 | FromDiscord | <XxDiCaprioxX> (edit) 'topuc' => 'topic' |
23:13:42 | FromDiscord | <Elegant Beef> huh? |
23:13:47 | FromDiscord | <Rika> does it matter? no one was asking anything anyway |
23:13:57 | FromDiscord | <Rika> it's also already ended anyway so |
23:14:14 | FromDiscord | <Elegant Beef> See rika you say that but bits 5..8 give me the bit signature i expect |
23:14:25 | FromDiscord | <Elegant Beef> So if i cast 5..8 it should give the result |
23:14:43 | FromDiscord | <Elegant Beef> bytes 5..8* |
23:15:13 | FromDiscord | <Elegant Beef> Like if i use a hex to float conveter i get https://media.discordapp.net/attachments/371759389889003532/731287436977504306/unknown.png |
23:15:18 | FromDiscord | <Elegant Beef> Which is the input float |
23:15:18 | FromDiscord | <Rika> same site nice |
23:15:20 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> > How the fuck did the topic go to Zero freaking Two↵Magic and :02Wave: |
23:15:25 | FromDiscord | <XxDiCaprioxX> @Rika I dont mind just wondering xD |
23:15:28 | FromDiscord | <Rika> also yeah i know |
23:15:44 | FromDiscord | <Rika> im just saying i suspect that the cast is casting the wrong thing |
23:16:04 | FromDiscord | <Rika> i dont know why or how the code is doing this |
23:25:19 | * | krux02_ joined #nim |
23:27:01 | FromGitter | <gogolxdong> @Vindaar thanks. It's out of maintenance. Someone said libxlsxwirter works and I will try. |
23:27:14 | FromDiscord | <Recruit_main707> Does this work? cast[ptr float32](addr [i don’t remember the function name][0]) |
23:27:44 | * | hyiltiz_ quit (Ping timeout: 272 seconds) |
23:27:52 | * | krux02 quit (Ping timeout: 260 seconds) |
23:28:33 | FromDiscord | <Rika> lmao `i don’t remember the function name` |
23:29:45 | * | hyiltiz joined #nim |
23:29:46 | * | hyiltiz quit (Changing host) |
23:29:46 | * | hyiltiz joined #nim |
23:41:10 | * | maier joined #nim |
23:45:34 | * | maier quit (Ping timeout: 240 seconds) |
23:55:38 | * | maier joined #nim |
23:58:13 | FromDiscord | <Elegant Beef> @Recruit_main707 expression has no address |