00:00:26 | leorize[m] | disruptek: araq just dropped a brand new concepts implementation |
00:00:43 | disruptek | yeah, i felt a disturbance in the force. |
00:02:24 | FromDiscord | <Hearthstone> There's multiple types of forces, please specify- |
00:06:40 | disruptek | maybe, but only one makes my nuts tingle. |
00:15:51 | * | kwilczynski quit () |
00:16:15 | * | kwilczynski joined #nim |
00:31:34 | FromDiscord | <Hearthstone> Lmao |
00:32:17 | FromDiscord | <Hearthstone> If someone rewrites https://gitlab.com/litecord/litecord ***COMPLETELY*** in Nim, I'll be impressed- |
00:32:27 | FromDiscord | <Hearthstone> I might eventually do it but doubt it |
00:48:29 | FromDiscord | <exelotl> anyone know if there's an nicer way to pass a code block to a template as a named parameter? https://play.nim-lang.org/#ix=2vK2 |
00:49:22 | disruptek | use do: |
00:49:52 | FromDiscord | <exelotl> does `do` let me name the parameters? |
00:52:42 | disruptek | i dunno. |
00:54:51 | FromDiscord | <exelotl> ideally I could e.g. specify blocks `a` and `c` and omit `b` and it would default to nothing |
00:56:12 | disruptek | hmm, i dunno how to achieve that. |
00:57:58 | FromDiscord | <exelotl> ah, guess it's the sort of thing I'd have to use a dsl macro for |
00:58:31 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2vK7 |
01:01:09 | FromDiscord | <exelotl> the thing is I'm already wrapping such a macro... don't want to wrap a dsl with a dsl 🤦 |
01:12:26 | FromDiscord | <exelotl> welp looks like I'm writing the macro lol |
01:13:48 | * | Tanger joined #nim |
01:24:43 | * | a_chou joined #nim |
01:24:49 | * | a_chou quit (Client Quit) |
01:26:37 | * | gmaggior quit (Quit: Leaving) |
01:28:03 | * | a_chou joined #nim |
01:32:00 | * | endragor joined #nim |
01:35:48 | * | apahl quit (Ping timeout: 244 seconds) |
01:37:43 | * | apahl joined #nim |
01:41:41 | * | endragor quit (Ping timeout: 265 seconds) |
01:43:12 | FromDiscord | <Varriount> sent a code paste, see https://play.nim-lang.org/#ix=2vKe |
01:43:58 | FromDiscord | <Varriount> The bash way of having to escape newlines using a backslash irks me. |
01:45:42 | Prestige | can't load the paste? |
01:48:22 | FromDiscord | <Varriount> Hm |
01:48:23 | * | a_chou quit (Remote host closed the connection) |
01:48:45 | * | a_chou joined #nim |
01:48:52 | FromDiscord | <Varriount> @Avahe Works for me |
01:49:00 | Prestige | ah weird |
01:50:03 | FromDiscord | <Varriount> Yardanico: Could the discord-irc bot split the code blocks from discord messages into their own link, but leave the non-code text alone? |
01:50:35 | * | a_chou quit (Client Quit) |
01:50:55 | FromDiscord | <Varriount> Prestige: The message I wrote before the code paste was, "Hm. For a shell language that's meant to be run via files, would the following syntax make sense for multi-line commands?" |
01:51:00 | * | a_chou joined #nim |
01:51:48 | FromDiscord | <Varriount> Are you still not able to access it? I know that there have been some internet disruptions lately |
01:54:53 | Prestige | I can now, earlier it wasn't letting me |
01:56:02 | * | a_chou quit (Quit: a_chou) |
01:56:27 | * | a_chou joined #nim |
02:01:36 | FromDiscord | <Varriount> Prestige: What do you think? |
02:03:53 | Prestige | I missed the first part of the convo: are you proposing a format or asking about bash? |
02:06:10 | FromDiscord | <Varriount> I'm proposing a format |
02:06:24 | FromDiscord | <Varriount> For a theoretical shell language |
02:06:25 | Prestige | looks fine w/o the colons |
02:08:35 | FromDiscord | <Varriount> Yes, but for a multi-line command, you need some sort of marker to distinguish between a multi-line command and a number of single-line commands. |
02:08:55 | Prestige | cant use a tab? |
02:10:14 | FromDiscord | <Varriount> Oh, hm. I hadn't thought of that |
02:10:44 | FromDiscord | <Varriount> Yeah, a tab/multiple leading spaces would be a better indicator |
02:11:47 | Prestige | if it's practical, I'd prefer it |
02:19:17 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:21:19 | * | muffindrake joined #nim |
02:44:12 | * | bung joined #nim |
02:45:57 | * | endragor joined #nim |
02:48:25 | * | bung quit (Ping timeout: 240 seconds) |
03:01:55 | * | endragor quit (Remote host closed the connection) |
03:02:03 | * | endragor joined #nim |
03:15:56 | * | kenran quit (Ping timeout: 265 seconds) |
03:21:12 | * | vicfred quit (Quit: Leaving) |
03:22:42 | * | NimBot joined #nim |
03:36:00 | * | vicfred joined #nim |
03:53:05 | * | Tanger quit (Ping timeout: 240 seconds) |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:38 | * | supakeen joined #nim |
04:13:00 | * | a_chou quit (Remote host closed the connection) |
04:16:59 | * | vicfred quit (Quit: Leaving) |
04:32:23 | * | bung joined #nim |
04:37:08 | * | bung quit (Ping timeout: 265 seconds) |
04:49:33 | FromDiscord | <iWonderAboutTuatara> agreed |
04:49:40 | FromDiscord | <iWonderAboutTuatara> never understood the arguement for {} |
04:49:46 | FromDiscord | <iWonderAboutTuatara> because you do that + a tab |
04:50:00 | FromDiscord | <iWonderAboutTuatara> save yourself some debugging time hunting for which bracket you didn |
04:50:05 | FromDiscord | <iWonderAboutTuatara> (edit) 'didn' => 'didn't close' |
04:50:24 | FromDiscord | <iWonderAboutTuatara> and for simple commands you can oneline them anyway |
04:50:37 | FromDiscord | <iWonderAboutTuatara> eg while 1 + 1 == 2: echo "Hello World!" |
04:50:49 | FromDiscord | <iWonderAboutTuatara> works as a oneliner |
04:50:53 | FromDiscord | <Elegant Beef> `{}` are way less error prone than indent |
04:51:02 | FromDiscord | <iWonderAboutTuatara> in which way> |
04:51:18 | FromDiscord | <iWonderAboutTuatara> I've always found it harder to hunt errors with `{}` |
04:51:40 | FromDiscord | <Elegant Beef> Indent level can change the logic, where as `{}` causes a compilation error and is impossible to move logic outside the enclosing |
04:52:04 | FromDiscord | <iWonderAboutTuatara> on the flipside, it's much easier to identify incorrect indents |
04:52:28 | FromDiscord | <iWonderAboutTuatara> much harder to skim over something and find a bracket you forgot to close somewhere |
04:52:29 | FromDiscord | <Elegant Beef> Yea they both have benefits, i personally dont care which |
04:52:45 | FromDiscord | <iWonderAboutTuatara> Neither is a deal breaker for me, but tab is def preferred |
04:52:56 | FromDiscord | <Elegant Beef> Well yes, but it's really hard to not close `{}` |
04:53:01 | FromDiscord | <iWonderAboutTuatara> It's not |
04:53:04 | FromDiscord | <Elegant Beef> Ah i also prefer tabs |
04:53:11 | FromDiscord | <Elegant Beef> I mean most IDEs auto close them |
04:53:16 | FromDiscord | <iWonderAboutTuatara> they do |
04:53:26 | FromDiscord | <Elegant Beef> So unless you're using a shitty editor it's really hard to fuck it up |
04:53:28 | FromDiscord | <iWonderAboutTuatara> issue mostly comes when you edit something, remove opener but forget to remove closer |
04:53:47 | FromDiscord | <iWonderAboutTuatara> I wrote a simple platformer game from scratch in java using notepad |
04:54:13 | FromDiscord | <iWonderAboutTuatara> I've since moved to VScode |
04:54:17 | FromDiscord | <iWonderAboutTuatara> thankfully |
04:54:21 | * | Tanger joined #nim |
04:54:27 | FromDiscord | <iWonderAboutTuatara> but not closing {} would cause huge problems |
04:55:07 | FromDiscord | <iWonderAboutTuatara> eventually you do what the ide does but worse where when you open { you instinctually close it then go back a char and start writing |
04:56:35 | * | Tlangir joined #nim |
04:59:37 | * | Tanger quit (Ping timeout: 264 seconds) |
05:02:41 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
05:08:25 | FromDiscord | <impbox> the only advantage i see for {} blocks is the tools generally have nice support for jumping over blocks, i'm sure it's doable with indentation too but seems less editor support |
05:09:52 | FromDiscord | <impbox> https://stackoverflow.com/questions/896145/more-efficient-movements-editing-python-files-in-vim looks like vim has some support for it with python, though need to test if it works in nim |
05:10:22 | FromDiscord | <impbox> nope |
05:22:13 | Zevv | I used to have a first gen internet radio more then 10 years ago called the Imp Box |
05:22:16 | Zevv | it still runs |
05:22:39 | FromDiscord | <impbox> oh music radio? |
05:23:18 | Zevv | https://www.cnet.com/news/magicbox-imp-radio-goodness-internet-style/ |
05:23:29 | Zevv | wow almst 15 years, thats like forever in internet time |
05:23:41 | Zevv | its in the kitchen playing bbc every day |
05:24:18 | Zevv | well, not this model, but same family |
05:33:45 | * | bung joined #nim |
05:46:22 | * | vicfred joined #nim |
05:47:29 | * | vicfred quit (Max SendQ exceeded) |
05:47:57 | * | vicfred joined #nim |
05:53:31 | * | kenran joined #nim |
05:56:45 | * | arecacea1 quit (Remote host closed the connection) |
05:57:07 | voltist | Does anybody else feel that humans have kinda just done everything that could be done with moderate computing power? Like I can't think of any truly new paradigms, not just optimizations or applications, since deep learning |
05:57:45 | * | arecacea1 joined #nim |
05:59:15 | Zevv | I guess one reason is that innovations in software cost next to nothing - you do not need to invest 3 billion dollars to research a new field or to make a proof of concept. High chance to make profit, low barriers for entry. |
05:59:44 | Zevv | Nearly no regulations at all |
06:00:29 | Zevv | You don't first neet to setup a lab with tons of equipment like you would when trying to make hip new stiff in medicine or genetics, for example |
06:01:20 | Zevv | otoh, your argument is kind of silly. There still *is* tons of innivation going on in software, it's just that *you* can not come up with anything right now. |
06:01:30 | Zevv | You could have come up with any of the big software booms of the last decade |
06:01:32 | Zevv | but you didn't |
06:01:34 | Zevv | I didn't |
06:01:40 | Zevv | something must be wrong with us! |
06:03:05 | voltist | This isnt about me coming up with things. My point is that if there is innovation, I haven't heard about it, so it feels like everything has come to a stand still |
06:03:38 | voltist | Media just goes on about new products/services, but none of it is actually *new*, just a better way to profit from existing technology |
06:03:49 | voltist | Or to apply it to new fields |
06:04:00 | voltist | But the methods are pretty much the same |
06:04:35 | Zevv | so, when did that happen, in your opinion? |
06:04:41 | Zevv | Was it different, like, 10 years ago? |
06:05:14 | * | narimiran joined #nim |
06:05:40 | Zevv | What might have changed is that computing is now about about *everywhere. If you apply it to everything in the world, then yes, in the end there is a stagnation because there is nothing more left to apply it to. |
06:07:23 | Zevv | and 99.9% of new stuff is not new. It's always just building on what was already there. True innovations are rarer than you think. |
06:07:47 | voltist | Honestly I can't think of any specific 'last' innovation, but that's probably just because I'm not good at remembering when things happened (especially seeing as I've only watched the space for the last few years) |
06:08:13 | voltist | Maybe I'm just feeling pessimistic today, so my brain refuses to believe that things were ever going on :) |
06:08:27 | Zevv | my neighbour talks to her kitchen radio to order cheese |
06:10:40 | Zevv | the university in my little town has gear to do arbriratry cut & pasting on DNA |
06:11:03 | * | solitudesf joined #nim |
06:11:59 | Zevv | but yeah, looking at a 2007 or a 2021 iphone, you could wonder what the hell went wrong |
06:14:10 | voltist | I think a lot of things that look like innovations at first are just scaled up. Like GPT-3 is amazing, but its just a really big version of smaller language models in the end; the actual tech is the same, just with more compute. Makes you wonder when (if?) another innovation is going to come round and do everything better that deep learning for |
06:14:10 | voltist | less compute, or if that's the end of the road... |
06:14:43 | voltist | Same for other very general methods of solving problems |
06:19:05 | * | Jesin quit (Ping timeout: 240 seconds) |
06:28:52 | leorize[m] | @impbox nim.nvim does implement section movements if you're interested |
06:29:52 | FromDiscord | <impbox> I'll have to try neovim |
06:35:27 | * | PMunch joined #nim |
06:37:09 | * | Tlanger joined #nim |
06:39:54 | * | Tlangir quit (Ping timeout: 265 seconds) |
07:00:10 | * | pietroppeter joined #nim |
07:01:50 | * | krux02 joined #nim |
07:08:26 | * | Tlanger quit (Remote host closed the connection) |
07:10:51 | Araq | yay now I'm concerned about GPT-3 |
07:12:34 | * | narimiran quit (Ping timeout: 256 seconds) |
07:30:12 | * | apahl quit (Ping timeout: 260 seconds) |
07:31:01 | * | apahl joined #nim |
07:46:02 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
07:49:38 | FromDiscord | <impbox> "OK GPT-3, create me a programming language better than Nim" |
07:49:56 | FromDiscord | <Rika> inb4 it says it cant |
07:50:40 | FromDiscord | <impbox> OK GPT-3, resolve all Nim github issues so that all parties are happy |
07:52:46 | Zevv | but again voltist: what *are* the last of the "great innovations" then in your opinon? |
07:53:44 | Zevv | oh you answered that already, sorry :) |
07:53:57 | Zevv | maybe you're just feeling pessimistic today |
07:58:26 | * | Vladar joined #nim |
08:00:14 | * | PMunch quit (*.net *.split) |
08:00:14 | * | bung quit (*.net *.split) |
08:00:18 | * | ofelas quit (*.net *.split) |
08:00:20 | * | Araq quit (*.net *.split) |
08:00:22 | * | snowolf quit (*.net *.split) |
08:00:23 | * | dv-^_^ quit (*.net *.split) |
08:00:25 | * | dsrw quit (*.net *.split) |
08:00:26 | * | dv^_^ quit (*.net *.split) |
08:00:30 | * | zama quit (*.net *.split) |
08:00:30 | * | hecanjog quit (*.net *.split) |
08:00:30 | * | voltist quit (*.net *.split) |
08:00:31 | * | nisstyre quit (*.net *.split) |
08:05:27 | * | snowolf joined #nim |
08:05:27 | * | PMunch joined #nim |
08:05:27 | * | bung joined #nim |
08:05:27 | * | dv-^_^ joined #nim |
08:05:27 | * | ofelas joined #nim |
08:05:27 | * | Araq joined #nim |
08:05:27 | * | dsrw joined #nim |
08:05:27 | * | dv^_^ joined #nim |
08:05:27 | * | zama joined #nim |
08:05:27 | * | hecanjog joined #nim |
08:05:27 | * | voltist joined #nim |
08:05:27 | * | nisstyre joined #nim |
08:07:19 | * | snowolf is now known as Guest19486 |
08:16:41 | * | Jesin joined #nim |
08:19:28 | * | arecacea1 quit (Remote host closed the connection) |
08:19:48 | * | arecacea1 joined #nim |
08:20:41 | FromDiscord | <Varriount> Araq: Regarding the serialization RFC, I think the annotations would be better if they were placed in a construct that indicated what format they are a part of (similar to go's annotations). |
08:21:54 | FromDiscord | <Varriount> For example, `fieldName {.json(name: "", ...).}: FieldType` |
08:46:58 | * | Guest19486 quit (Remote host closed the connection) |
08:46:58 | * | snowolf_ joined #nim |
08:53:22 | FromDiscord | <Ricky Spanish> im a bit confused with interop, i can finally get it to build my wrapper but what am i supposed to output to make it usable as a regular library in nim? like ```nim c -d:release -d:headerDL thelib.nim``` using this command it produces a .exe, i can also get a .dll but really all i want is to have the wrapper available via nimble so do i just upload my wrapper to git and then somehow include it and it will automatically produce the w |
09:07:54 | Araq | Varriount: so reply to my RFC |
09:09:56 | * | pietroppeter quit (Quit: Connection closed for inactivity) |
09:19:34 | Araq | so ... my most basic Iterable concept works now. |
09:20:43 | Araq | took me a day of work |
09:49:52 | * | arecacea1 quit (Remote host closed the connection) |
09:50:16 | * | arecacea1 joined #nim |
09:50:56 | FromDiscord | <mratsim> Are there cases where dynamicBindSym is buggy? SHouldn't that be taken off of experimental? |
09:51:26 | Araq | is it used? |
09:51:37 | Araq | dynamicBindSym makes me nervous |
09:53:02 | FromDiscord | <lqdev> i feel like dynamicBindSym could've been a 1000x more useful if it could be used to resolve syms from the callsite |
09:54:15 | Araq | I don't fully understand the consequences of dynamicBindSym |
09:54:20 | Araq | can't make it non-experimental |
09:54:27 | * | lritter joined #nim |
09:55:14 | FromDiscord | <lqdev> speaking of experimental features, why is the `do` notation experimental? |
09:55:58 | Araq | cause it sucks |
09:56:24 | Araq | the only reason it remains is that we don't have anything better :-) |
09:57:57 | FromDiscord | <lqdev> so what _wouldn't_ suck in your opinion? |
09:58:17 | Araq | I don't know :-) |
09:58:29 | Araq | at least |
09:58:40 | Araq | 'do' for anon procs should be removed |
09:58:55 | Araq | 'do' for blocks with special cased precedence parsing rules seems unavoidable |
09:59:15 | FromDiscord | <lqdev> y'know, `do` for anon procs can actually be fully replaced with macros |
09:59:19 | FromDiscord | <lqdev> so there's that |
10:00:08 | Araq | write an RFC already ;-) |
10:05:08 | * | kenran quit (Ping timeout: 258 seconds) |
10:10:49 | * | kenran joined #nim |
10:10:52 | * | waleee-cl joined #nim |
10:18:31 | * | pbb quit (Ping timeout: 272 seconds) |
10:19:25 | * | Vladar quit (Quit: Leaving) |
10:22:46 | FromGitter | <alehander92> hmm |
10:22:53 | FromGitter | <alehander92> new concepts? |
10:23:16 | FromGitter | <alehander92> is this only impl or also syntax change |
10:23:25 | * | ofelas quit (Ping timeout: 240 seconds) |
10:24:01 | * | pbb joined #nim |
10:25:16 | * | xet7 quit (Read error: Connection reset by peer) |
10:26:58 | * | xet7 joined #nim |
10:45:00 | * | the-oaks joined #nim |
10:45:18 | the-oaks | hello |
10:46:21 | FromDiscord | <Rika> hello there |
10:48:32 | the-oaks | it is my first time using IRC, just testing thing out lol |
10:49:10 | FromDiscord | <Rika> what do you normally use? |
10:49:58 | the-oaks | gitter is probably easier to use |
10:50:42 | FromDiscord | <Rika> there's a gitter bridge here |
10:51:14 | the-oaks | yeah - I realised that, look like you are talking from Discord as well |
10:59:38 | Araq | <alehander92> see https://github.com/nim-lang/RFCs/issues/168 |
10:59:39 | disbot | ➥ Concepts and type-checking generics ; snippet at 12https://play.nim-lang.org/#ix=23U8 |
11:02:17 | alehander92 | welcome the-oaks |
11:02:20 | alehander92 | Araq thanks |
11:02:37 | FromGitter | <the-oaks> @alehander92 thanks :) |
11:02:43 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
11:02:59 | FromGitter | <the-oaks> I am still pretty new, so just observe and learn :) |
11:03:17 | alehander92 | ok |
11:03:20 | alehander92 | ask if you need to! |
11:03:21 | the-oaks | and trying different way to chat lol |
11:03:36 | * | pbb joined #nim |
11:04:29 | alehander92 | Araq what happened to proc/iterator/func etc |
11:04:45 | alehander92 | would a type need to have exactly the same thing |
11:04:49 | alehander92 | as in the concept |
11:05:27 | * | vqrs quit (Ping timeout: 260 seconds) |
11:07:14 | * | vqrs joined #nim |
11:10:09 | Araq | just read it |
11:10:38 | leorize[m] | are you gonna incorporate any aspects of https://github.com/nim-lang/RFCs/issues/168#issuecomment-593410686 in? |
11:10:39 | disbot | ➥ Concepts and type-checking generics ; snippet at 12https://play.nim-lang.org/#ix=23U8 |
11:11:45 | FromDiscord | <Clyybber> this is alno |
11:12:02 | FromDiscord | <Clyybber> almost how concepts already work |
11:12:26 | FromDiscord | <Clyybber> imo the new syntax should be implemented as a macro |
11:12:58 | FromDiscord | <exelotl> Whatever replacement we end up with for `do`, would be nice if it could make multi-line arrow functions feel cleaner↵(See: https://forum.nim-lang.org/t/6399 ) |
11:13:37 | Araq | I'm implementing what I outlined is necessary for marshalling |
11:14:02 | leorize[m] | @Clyybber isn't the big problem with the current system is that it's based on `compiles()`? |
11:14:53 | * | revere quit (Quit: quit) |
11:15:42 | * | revere joined #nim |
11:16:11 | FromDiscord | <Clyybber> not really a problem IMO |
11:18:23 | leorize[m] | compiles is slow |
11:19:33 | krux02 | leorize[m], compiles hides reasones why something does or doesn't compile |
11:19:49 | * | Vladar joined #nim |
11:19:50 | leorize[m] | that too |
11:20:04 | FromDiscord | <Clyybber> well thats why we have explain |
11:24:21 | * | kenran_ joined #nim |
11:27:34 | * | kenran quit (Ping timeout: 256 seconds) |
11:33:15 | PMunch | @the-oak, yeah Nim has a lot of ways to chat :P |
11:35:06 | FromDiscord | <Rika> you pinged some poor lad |
11:35:08 | FromDiscord | <Rika> in discord |
11:35:20 | alehander92 | <3 |
11:35:24 | alehander92 | Araq sorry |
11:35:39 | alehander92 | i read some of it but i couldnt it |
11:37:59 | PMunch | @Rika, woops misspelled his name.. |
11:50:45 | FromDiscord | <Clyybber> Araq: Wdyt about https://github.com/nim-lang/Nim/pull/15236#issuecomment-682956350 |
11:50:46 | disbot | ➥ fix #15035 |
11:53:37 | * | kenran_ quit (Ping timeout: 264 seconds) |
11:55:17 | * | kenran joined #nim |
12:02:37 | * | dddddd quit (Ping timeout: 264 seconds) |
12:03:07 | shashlick | @Ricky Spanish see nimarchive or nimgit2 |
12:04:06 | shashlick | Gittyup uses nimgit2, nimph uses gittyup |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:43 | * | supakeen joined #nim |
12:12:20 | PMunch | Can I force an integer to be non-static for a test? |
12:16:54 | * | krux02 quit (Read error: Connection reset by peer) |
12:18:06 | * | krux02 joined #nim |
12:23:57 | FromDiscord | <Clyybber> read it from a file :) |
12:24:08 | FromDiscord | <Clyybber> other than that I don't think so |
12:24:20 | FromDiscord | <exelotl> let a = 5 then use a? |
12:26:23 | FromDiscord | <exelotl> var five {.importc: "5", nodecl.}: int |
12:27:12 | * | dddddd joined #nim |
12:27:59 | PMunch | Ooh, that importc trick might work |
12:28:47 | FromDiscord | <Clyybber> even then the C compiler will have it be static |
12:31:47 | PMunch | That doesn't matter too much for me |
12:32:18 | PMunch | I just want to ensure that the Nim compiler uses the procedure overload without `static` |
12:38:54 | PMunch | Hmm, importc throws a weird IndexDefect in the compiler.. |
12:40:18 | Zevv | how do you mean "non static" |
12:41:10 | PMunch | I wanted to add a `to id`(val: SomeInteger) and `to id`(val: static[SomeFloat]) to fixedpoint, to match with the two versions of `set` |
12:41:40 | PMunch | I guess SomeFloat wouldn't match 5 anyways though.. |
12:42:05 | Zevv | nope |
12:43:05 | Araq | Clyybber: maybe we shouldn't have merged it but it looked like a good idea and still does |
12:43:21 | * | kenran quit (Quit: leaving) |
12:44:11 | FromDiscord | <Clyybber> but openarray is always a view right? |
12:44:20 | FromDiscord | <Clyybber> It doesn't make sense to take ownership of a view |
12:44:25 | FromDiscord | <Clyybber> it should be forbidden IMO |
12:48:24 | PMunch | Zevv, did some cleaning up and added some constants to fixedpoint: https://github.com/zevv/fixedpoint |
12:49:48 | PMunch | Amongst other a step and amount of steps variables |
12:49:57 | * | narimiran joined #nim |
12:49:58 | * | maier joined #nim |
12:50:32 | Zevv | \o/ |
12:51:01 | PMunch | It has worked very well for me by the way :) |
12:51:22 | FromDiscord | <Clyybber> Araq: Just like we forbid `sink lent` (or at least should) |
12:51:49 | Araq | Clyybber: you can take ownership of the array/seq passed to it though |
12:52:04 | Araq | and if it's openarray to openarray we could produce a copy |
12:53:39 | FromDiscord | <Clyybber> Hmm, I guess? But I don't see the benefit |
12:54:12 | FromDiscord | <Clyybber> There won't be any copies anyways, so sink looses its benefit there IMO |
12:55:50 | Araq | the point is to allow |
12:56:11 | Araq | for i: dest[i] = move(src[i]) |
12:56:29 | Araq | if you have a better idea how to allow that I'm all ears |
12:57:33 | Araq | sink openArray[T] is technically more like openArray[sink T] |
12:58:33 | Araq | but type modifiers in not-head positions are a mess, see "let's add 'const' to Nim" |
13:00:38 | FromDiscord | <Clyybber> hmm, yeah that makes sense |
13:02:42 | Zevv | PMunch: good to hear |
13:05:21 | FromDiscord | <tomck> Does nim have 'output iterators' like c++, or an equivalent? |
13:05:42 | FromDiscord | <tomck> So, i have a function which will return a list of T, but that function is typically used in a context where you're concatenating many lists of T |
13:06:13 | FromDiscord | <tomck> so instead of having my function return a list of T, then concat later & have a billion allocations, can I have my function take an 'output iterator' which it puts Ts into, to provide a generic interface? |
13:06:21 | Araq | use a 'var T' parameter with append semantics and sugar.dup |
13:06:24 | FromDiscord | <tomck> Or i guess i just make my proc an iterator, and do the pushing in the parent func? |
13:06:36 | FromDiscord | <tomck> what're 'append semantics' |
13:06:38 | FromDiscord | <tomck> and sugar.dup |
13:06:44 | FromDiscord | <Rika> inplace semantics |
13:07:10 | FromDiscord | <tomck> is there an example / resource? |
13:07:22 | FromDiscord | <Rika> sugar.dup makes inplace functions outplace or whatever its called; aka instead of modifying input, it returns the modified as output |
13:07:35 | FromDiscord | <Rika> nim's sugar module contains the docs for `sugar.dup` |
13:08:21 | Araq | https://nim-lang.org/blog/2020/04/03/version-120-released.html scroll to the section "Dup" |
13:08:35 | Araq | (our blog should have more anchors... :-/ ) |
13:11:11 | FromDiscord | <tomck> i see, so i just take a var seq[T], append to that, then use sugar.dup to generate the 'other version' of the function if needed that just returned the seq[T]? |
13:11:33 | * | the-oaks quit (Remote host closed the connection) |
13:12:02 | FromDiscord | <tomck> hooooooooooly shit, x => x * 2 is valid syntax? that's neat that you can do that with the macro system |
13:12:30 | Prestige | dup is pretty neat |
13:16:16 | * | disruptek curses third-world internet. |
13:17:35 | PMunch | Hmm, I have a tricky problem |
13:18:42 | PMunch | I've integrated Nim into an application. It can run an "operate" procedure from any of the threads it has started. Now I want to add a cache to this setup, but it needs to run some updates on the cache in the background. |
13:19:03 | PMunch | So I want to spin up a new thread and have the "operate" procedure communicate with this thread |
13:19:37 | PMunch | But since I don't do the thread initialisation it's kinda hard to set up channels for communication for example.. |
13:20:24 | disruptek | operate should be able to do it, though. |
13:21:05 | disruptek | you can have as many channels as you have threads, for example. |
13:23:01 | PMunch | But I don't know how many threads I have |
13:23:11 | disruptek | is it important that you know? |
13:24:01 | PMunch | What do you mean? |
13:24:24 | PMunch | As it is now every call to operate is so stand-alone that I haven't really cared about the fact that it runs on a thread |
13:25:30 | PMunch | I guess I could have one "request" channel where I put a data structure with what I'm requesting from the cache, and a pointer with where to put the result |
13:25:45 | PMunch | Then just have the thread busy-loop on a nil-check for the pointer until it goes non-nil |
13:26:25 | PMunch | And just make sure that the cache thread keeps the memory there alive |
13:27:18 | disruptek | maybe i don't understand, but it seems like when you enter operate, you'll know which thread you are and you'll know whether you have a worker thread you can talk to. |
13:27:49 | disruptek | a spin loop sounds pretty lame. |
13:30:45 | PMunch | Well, the main program is the one that creates the threads. Operate is just called from one of these threads |
13:31:21 | PMunch | I can call the posix function to get the current thread id |
13:31:48 | PMunch | I also have a "setup" call |
13:32:00 | PMunch | That's where I plan on spinning up the cache thread |
13:32:28 | PMunch | And then I need to communicate somehow back and forth between arbitrary threads and that thread |
13:34:22 | disruptek | right, but the communication can happen on the channel you create in setup. |
13:34:38 | PMunch | Yeah, but I need a way to send the reply back |
13:35:28 | PMunch | I can push request objects onto a shared channel for the cache, but it needs a way to respond |
13:36:06 | disruptek | i guess you could have a buffer of responses with a lock on it. |
13:39:04 | disruptek | the cache thread writes to a response channel and a semaphore on the buffer blocks a response read. if it's not the right response for the thread, it keeps reading. if the response is in the buffer, it doesn't block. |
13:40:12 | zedeus | just checked nitter statistics, we're now getting ~7 million requests and 70k unique visitors per day, while still using less than 100 MB memory and ~50% CPU |
13:40:55 | PMunch | zedeus, damn, that's pretty impressive |
13:41:57 | disruptek | what's the average latency of a request? |
13:43:48 | zedeus | a few milliseconds or so |
13:44:29 | disruptek | so mostly cache reads. |
13:45:36 | zedeus | oh you mean how long requests take on average, dunno |
13:46:08 | zedeus | using a simple httpclient pool i was able to make everything a bit faster |
13:47:39 | disruptek | what happened with the google stuff? |
13:49:27 | zedeus | thats for the job im starting soon |
13:49:33 | Araq | zedeus, nice, can you write a guess blog post for us please? |
13:50:07 | narimiran | +1 |
13:53:14 | zedeus | hmm what should it cover? the numbers are cool but i'm not sure what story can be told, it's just jester with asynchttpserver |
13:53:56 | disruptek | problems you ran into and the solutions you employed. |
13:54:59 | * | maier quit (Ping timeout: 240 seconds) |
14:00:00 | disruptek | i'd like to get into writing but i dunno what people would want to read. |
14:00:33 | disruptek | well, i know what araq wants to read. |
14:00:38 | disruptek | i dunno about the rest of you. |
14:01:02 | FromDiscord | <Ricky Spanish> not sure what im doing wrong here with nimterop : ``` Error: undeclared identifier: 'headerPath'``` i dont see where its meant to get header path from, it states that you can pass flags for it to evaluate the headerpath but none of them have worked for me, the header path i want is included from the extract zip file in ``` -d:headerDL``` also thanks @shashlick ill look into libgit and archive |
14:01:29 | FromDiscord | <Ricky Spanish> for this line ```cImport(headerPath, recurse = true)``` |
14:01:35 | disruptek | have you tried the simplified ui to nimterop? |
14:01:50 | FromDiscord | <Ricky Spanish> nope didnt know there was a ui id prefer that |
14:02:12 | disruptek | yeah, it usually produces a wrapper in just a few minutes. |
14:02:35 | disruptek | just say, "shashlick shashlick va-va-va-voom." |
14:02:37 | FromDiscord | <Ricky Spanish> ok will give it a go, it jjust a flag i need to pass or another project? |
14:02:53 | disruptek | then produce whatever material he asks for when he appears. |
14:03:19 | disruptek | a few minutes later, a gist will be pasted to irc with your wrapper in it. |
14:04:20 | FromDiscord | <Ricky Spanish> 😆 does sound preferable than trying to figure this out |
14:04:52 | Araq | and then somewhat later that Araq complains about how to write wrappers instead |
14:07:02 | * | PMunch quit (Quit: Leaving) |
14:09:02 | disruptek | i've used it numerous times. the araq part is kinda a bummer, but the shashlick part works really well. |
14:09:25 | disruptek | see, #nim is all about bikeshedding software that doesn't exist. |
14:11:00 | FromDiscord | <Ricky Spanish> nvm it was my bad my brain is not functioning today my header obviously isnt called header.h so looking for headerPath wasnt going to work |
14:13:17 | FromDiscord | <flywind> https://play.nim-lang.org/#ix=2vMn |
14:13:46 | FromDiscord | <flywind> Is this a known issue? |
14:14:54 | Araq | it works as it should, you cannot cast an object to a pointer |
14:15:13 | disruptek | well, it's requires init that's the problem. |
14:15:40 | Araq | how so? |
14:16:05 | disruptek | because no one would bother to include times and use Time if they weren't pointing to requires init. |
14:16:45 | disruptek | i mean, there's a proc which exists only to not-init an object. |
14:16:56 | disruptek | what does it all mean? |
14:17:15 | disruptek | we're drowning in a sea of syntax. |
14:17:22 | disruptek | i can't feel my legs! |
14:19:09 | Araq | so init your Time objects, big deal |
14:19:46 | Araq | why is it that out of all mental activities *programming* must be accomplishable without a brain |
14:21:59 | disruptek | because the alternative is that i freeze to death when the snow flies. |
14:22:25 | disruptek | this country is headed for a disasterous winter. |
14:26:34 | Zevv | all you need is winter. The disasters are already there |
14:28:32 | Araq | Winter is coming and along with it some dragons |
14:29:07 | disruptek | church. |
14:36:33 | * | def- quit (Quit: -) |
14:37:05 | FromDiscord | <flywind> @Araq Thanks. |
14:37:17 | FromDiscord | <flywind> sent a code paste, see https://play.nim-lang.org/#ix=2vMu |
14:37:26 | FromDiscord | <flywind> I think I should use this. |
14:37:31 | * | iwq quit (*.net *.split) |
14:37:43 | * | iwq joined #nim |
14:37:56 | FromDiscord | <flywind> (edit) 'https://play.nim-lang.org/#ix=2vMu' => 'https://play.nim-lang.org/#ix=2vMv' |
14:39:23 | disruptek | i stand corrected. |
14:40:42 | * | superbia joined #nim |
14:44:08 | Araq | so. my concepts work |
14:44:23 | disruptek | verbosity ftw? |
14:44:43 | Araq | writing a spec first ftw |
14:45:01 | disruptek | !rfc concepts author:araq |
14:45:01 | disbot | https://github.com/nim-lang/RFCs/issues/168 -- 3Concepts and type-checking generics 7& 6 more... |
14:52:44 | FromDiscord | <Varriount> Zevv: Ouch. But you are correct. 😛 |
14:57:23 | shashlick | @Ricky Spanish - what's up |
15:02:36 | * | hnOsmium0001 joined #nim |
15:04:06 | FromDiscord | <Ricky Spanish> sent a code paste, see https://play.nim-lang.org/#ix=2vMJ |
15:06:13 | * | FromDiscord quit (Remote host closed the connection) |
15:12:13 | * | FromDiscord joined #nim |
15:13:48 | shashlick | set outdir to an absolute path |
15:13:53 | shashlick | use getProjectCacheDir() |
15:15:36 | * | def- joined #nim |
15:16:13 | Araq | hi def-, thanks for merging my PR so quickly |
15:17:20 | FromDiscord | <Ricky Spanish> awesome thanks for the tips @shashlick |
15:31:19 | FromDiscord | <Varriount> Araq: Are these the concepts as outlined in RFC 168, or something different? |
15:33:04 | Araq | I follow my RFC |
15:33:14 | disruptek | yuk. |
15:33:54 | Araq | but I'm not implementing 'each T' nor 'either orelse' |
15:34:23 | disruptek | so the impl is incomplete and poorly specified. |
15:34:40 | Araq | I'm only working on what https://github.com/nim-lang/RFCs/issues/247 needs |
15:34:41 | disbot | ➥ Flexible serialization with a mild focus on JSON ; snippet at 12https://play.nim-lang.org/#ix=2vhM |
15:34:46 | disruptek | /home/adavidoff/git/gram/gram/graph.nim(11, 53) Error: type expected |
15:34:58 | disruptek | Graph*[N, E; F: static[int]] = ref GraphObj[N, E, F] ## |
15:36:26 | Araq | disruptek, maybe once I'm done I'll update the spec |
15:36:32 | disruptek | order-sensitive type section ftw. |
15:36:48 | disruptek | Araq: writing the spec after the impl ftw? |
15:36:54 | Araq | it's an iterative process |
15:42:16 | * | PMunch joined #nim |
15:49:17 | * | bouzu_ joined #nim |
15:51:13 | * | maier joined #nim |
15:56:05 | * | maier quit (Ping timeout: 240 seconds) |
15:58:36 | FromDiscord | <Kiloneie> Man if you try googling most innovative programming languages, easiest to learn, new and emerging, fun, etc... you can't find Nim almost anywhere. Only by using python like can you find it. This is quite sad. |
16:00:15 | FromDiscord | <Recruit_main707> a lot of us came looking for static python and found nim (i think) |
16:00:26 | * | audiofile joined #nim |
16:00:29 | FromDiscord | <Kiloneie> that's how i found it too D:... |
16:00:38 | Prestige | I was looking for a better C alternative |
16:00:55 | FromDiscord | <Kiloneie> before that, all i could find was D and the other already quite popular new ones. |
16:01:33 | FromDiscord | <Kiloneie> yeah it is here: https://alternativeto.net/software/c-programming-language-/ |
16:02:51 | FromDiscord | <Kiloneie> Probably the only way people find Nim really, alternative to C and Python. |
16:03:16 | PMunch | Or word of mouth |
16:03:32 | FromDiscord | <Kiloneie> That as well, but it is a drop in the ocean... |
16:03:43 | PMunch | Don't underestimate HN articles, YouTube videos, presentations, or just talking to people about it |
16:05:03 | FromDiscord | <Kiloneie> I need to step up my game xD... if i can get enough views going, maybe the algorithm picks me up, then i might contribute there. |
16:05:25 | FromDiscord | <Kiloneie> Hmmm... shouldn't i add keywords such as alternative to C and Python to my video tags ? |
16:20:37 | * | rockcavera joined #nim |
16:23:10 | * | maier joined #nim |
16:25:08 | * | tsujp quit (Ping timeout: 256 seconds) |
16:25:54 | FromGitter | <Knaque> Is there a convenient way of getting a display's refresh rate? |
16:27:20 | narimiran | speaking of HN, now on its frontpage is that nim 1.2.6 and 1.0.8 have been released. lol |
16:28:00 | FromDiscord | <Kiloneie> Whats HN ? hacker news ?... |
16:28:05 | narimiran | yep |
16:28:14 | FromDiscord | <Kiloneie> Thats good |
16:28:44 | FromDiscord | <Kiloneie> im finding quora questions of alternatives to C and python and adding Nim 😛 |
16:29:00 | FromDiscord | <Kiloneie> #selfpromotion |
16:29:13 | FromDiscord | <Kiloneie> i might get banned D: |
16:29:28 | narimiran | probably |
16:32:44 | PMunch | narimiran, now? That's a bit late isn't it? :P |
16:32:44 | * | tsujp joined #nim |
16:33:01 | FromGitter | <Knaque> I frequently promote Nim on r/programmerhumor, I even asked them to add a Nim flair but I don't think that ever got done. |
16:34:02 | narimiran | PMunch: hacker olds |
16:34:12 | PMunch | Haha :P |
16:34:37 | * | maier quit (Ping timeout: 246 seconds) |
16:43:52 | * | audiofile quit (Quit: Default Quit Message) |
16:52:10 | FromDiscord | <Kiloneie> I should do this more often as by promoting Nim i promote myself, synergetic relationship D: |
16:53:40 | FromDiscord | <lqdev> did you mean symbiotic? |
16:53:50 | FromDiscord | <Kiloneie> Idk how to do it on reddit without getting banned, i can only do it once... |
16:54:02 | FromDiscord | <Kiloneie> Oh yeh that word |
16:54:59 | FromDiscord | <Kiloneie> You should hear my Slovenian, i know the words in english for things, but forget them in my own native language xD... |
16:57:02 | * | solitudesf quit (Remote host closed the connection) |
16:59:06 | * | superbia1 joined #nim |
17:01:57 | * | superbia quit (Ping timeout: 265 seconds) |
17:07:23 | * | tsujp quit (Ping timeout: 240 seconds) |
17:11:07 | alehander92 | please be chill about it |
17:11:08 | alehander92 | :D |
17:11:42 | alehander92 | and yeah this happens with me as well i think :D |
17:12:16 | FromDiscord | <Kiloneie> Im not losing memory, i know how human brains work with memory |
17:12:53 | FromDiscord | <Kiloneie> im mostly on my computer and there everything is english, so it's only logical that my native starts to get replaced, removed. |
17:13:37 | * | ofelas joined #nim |
17:18:18 | FromDiscord | <lqdev> @Kiloneie same here |
17:18:31 | FromDiscord | <lqdev> sometimes i struggle to find an appropriate word or phrase |
17:18:42 | FromDiscord | <lqdev> because my brain is just so used to thinking in english |
17:19:04 | FromDiscord | <Kiloneie> I often just say it in english if i can't figure it out quick xD |
17:21:45 | disruptek | i have that problem, too. |
17:23:07 | disruptek | you know what's worse, though? |
17:23:20 | disruptek | !repo fusion |
17:23:20 | alehander92 | you know only russian |
17:23:22 | disbot | https://github.com/nim-lang/fusion -- 9fusion: 11Fusion is for now an idea about how to grow Nim's ecosystem without the pain points of more traditional approaches. 15 57⭐ 4🍴 7& 1 more... |
17:23:25 | FromDiscord | <Kiloneie> I have integrated "like" into my vocabulary. At my previous job Bosnians had a really hard time understanding me xD... |
17:23:36 | alehander92 | sorry this was fals |
17:23:38 | alehander92 | e |
17:23:59 | alehander92 | you do know english |
17:24:57 | FromDiscord | <Kiloneie> Has reddit been overtaken on google ? I tend to find it very rarely, gotta add reddit at the end to find disscusions on things... |
17:25:16 | disruptek | then i guess google hasn't taken over. |
17:25:42 | Zevv | "Fusion aims to be an immutable code repository, once a module is included it stays". So we will make sure everything always keeps running with all future versions of Nim? |
17:25:59 | disruptek | nah. |
17:26:22 | disruptek | don't believe everything you read on the internet, zevv. |
17:26:28 | Zevv | but it's on the internet |
17:26:47 | disruptek | oh, good point. |
17:27:27 | disruptek | take the blue pill, wake up, and believe whatever you want to believe. |
17:27:29 | FromDiscord | <Kiloneie> My answers have been viewed quite a bit already... answers on quora. I might see a mount everest on my analytics tomorrow xD... |
17:28:11 | FromGitter | <Knaque> Why is this (https://play.nim-lang.org/#ix=2vNQ) throwing a type mismatch? |
17:29:29 | FromDiscord | <Kiloneie> can't get traceback since the first traceback is from gradient... |
17:30:43 | FromGitter | <Knaque> You'll need to run it on your machine. `nimble install gradient` |
17:30:48 | Zevv | PMunch: these elifs should really be whens |
17:31:04 | Zevv | I don't want these branches ending up in the code, the types should enforce this |
17:31:19 | Zevv | oh dang |
17:31:26 | Zevv | it *is* whens. 'when' 'elif' |
17:31:29 | Zevv | that's nasty |
17:31:41 | Zevv | I was looking for 'elwhen', but couldn't find it :) |
17:32:19 | disruptek | noob. |
17:32:23 | Zevv | soo noob |
17:32:52 | Zevv | so, let's take a bet. I want to make a generic type with 5 things in the brackets, of which 2 are actually *used* in the type, and the rest are ignored |
17:33:04 | Zevv | but should be *part of* the type to make them unique |
17:33:11 | Zevv | will that work? [ ] Yes [ ] Np |
17:33:13 | Zevv | No |
17:33:39 | disruptek | yes. |
17:33:59 | disruptek | but, they can't be completely ignored. |
17:34:45 | Zevv | hmm but I only need them to 'when' and dispatch on |
17:34:51 | alehander92 | Yes |
17:34:58 | disruptek | i do this in gram. |
17:35:04 | Zevv | now what's gram |
17:35:12 | alehander92 | oh i remember |
17:35:12 | Zevv | how many projects are you actually making up |
17:35:14 | alehander92 | a stream about it |
17:35:15 | Zevv | and how many are real |
17:35:17 | alehander92 | it was the graph right |
17:35:21 | alehander92 | no i remember stuff |
17:35:24 | disruptek | my graph types are composed with a set of flags that get baked into the type. |
17:35:25 | alehander92 | finally i am relevant |
17:35:46 | disruptek | !repo gram |
17:35:47 | disbot | https://github.com/disruptek/gram -- 9gram: 11Generic graphs in Nim 15 7⭐ 0🍴 7& 4 more... |
17:35:49 | FromDiscord | <Clyybber> hello relevant |
17:35:52 | FromDiscord | <Clyybber> I'm clyybber |
17:36:05 | disruptek | dad? |
17:36:13 | FromDiscord | <Clyybber> sup son |
17:36:47 | Zevv | so, can frosty serialize your gram graphs then |
17:36:52 | disruptek | yeah. |
17:36:55 | Zevv | good boi |
17:36:58 | zedeus | love the work you guys are doing, keep it up |
17:37:11 | FromDiscord | <Clyybber> "work" |
17:37:14 | alehander92 | <3 |
17:37:16 | Zevv | I shall now star gram |
17:37:18 | FromDiscord | <Clyybber> :p |
17:37:23 | Zevv | I have just starred gram |
17:37:26 | alehander92 | guys i want to write a feature history app |
17:37:32 | alehander92 | i'll ask questions |
17:37:34 | Zevv | I only write future history apps |
17:37:39 | disruptek | it's not special or fast, it's just supposed to be useful. |
17:37:54 | disruptek | i'm merging skiplists into it now. |
17:38:06 | FromDiscord | <Clyybber> are your skiplists finally skiplists? |
17:38:15 | disruptek | yeah. |
17:38:18 | FromDiscord | <Clyybber> nice |
17:38:47 | disruptek | i might make a clyybber version for you. it will force me to conceptualize everything, which will be good. |
17:38:57 | FromDiscord | <Clyybber> lol |
17:38:59 | disruptek | assuming araq's concepts don't suck, i mean. |
17:39:11 | FromDiscord | <Clyybber> I'm making a macro to have araqs concepts on the old ones |
17:39:15 | alehander92 | hmm |
17:39:19 | disruptek | SimpLists ## clyybber version of skiplists |
17:39:20 | FromDiscord | <Clyybber> because apparently nobody did that yet |
17:39:23 | alehander92 | oh new concepts |
17:39:25 | alehander92 | i wonder |
17:39:30 | alehander92 | can we just .. remove functons |
17:39:34 | alehander92 | like guys |
17:39:41 | alehander92 | can we simulate functions with macros |
17:39:46 | alehander92 | and special case for recursion |
17:39:48 | disruptek | actually, we do need a featureset lib. |
17:39:50 | alehander92 | with auto stack |
17:40:05 | disruptek | we already have that in cps. |
17:40:06 | alehander92 | and a loop |
17:40:12 | alehander92 | if we need to use a concept less |
17:40:25 | disruptek | wut |
17:40:34 | alehander92 | can we remove functions |
17:40:37 | alehander92 | and have a normal language |
17:40:39 | FromDiscord | <Clyybber> no |
17:40:40 | disruptek | no. |
17:40:45 | alehander92 | basically something like |
17:40:49 | alehander92 | everything inline |
17:40:50 | FromDiscord | <Clyybber> well, you would just be implementing a inliner |
17:40:52 | alehander92 | expand instead of call |
17:40:55 | FromDiscord | <Clyybber> yeah |
17:41:02 | alehander92 | but without recursion |
17:41:06 | alehander92 | what *is* the problem |
17:41:10 | disruptek | no goto. |
17:41:12 | alehander92 | except of course size/speed and everything |
17:41:21 | alehander92 | why no goto? |
17:41:26 | FromDiscord | <Clyybber> I don't understand how the new concepts are supposed to replace the old ones, but afaict they aren't? |
17:41:33 | FromDiscord | <Clyybber> but then, why do we call it concepts |
17:41:34 | alehander92 | you can have goto |
17:41:43 | disruptek | i mean, you can if you want. |
17:42:02 | alehander92 | but you don't need it |
17:42:09 | alehander92 | as the control still can return |
17:42:15 | alehander92 | if you have the right primitives |
17:42:28 | disruptek | it's a limitation to do it without functions. |
17:42:40 | alehander92 | but isn't macros enough |
17:42:42 | alehander92 | my point is |
17:42:47 | disruptek | not really, no. |
17:42:55 | alehander92 | can we have a language with macros + 1-2 niceties => instead of functions |
17:43:05 | alehander92 | because functions only can't replace macros |
17:43:08 | alehander92 | it seems |
17:43:09 | disruptek | lol |
17:43:17 | disruptek | what are these "niceties" of which you speak? |
17:43:33 | alehander92 | a return |
17:43:41 | alehander92 | which returns to the expr after the expansion |
17:43:42 | disruptek | a return from what? |
17:43:42 | alehander92 | beginning |
17:43:50 | alehander92 | you still have expand stack |
17:43:53 | alehander92 | instead of call stack |
17:43:56 | disruptek | sounds like goto. |
17:44:03 | alehander92 | return is goto |
17:44:11 | alehander92 | almost |
17:44:16 | alehander92 | like, nothing wrong with goto |
17:44:30 | alehander92 | if it's not used direvtly |
17:44:36 | alehander92 | but in an abstraction |
17:44:48 | FromDiscord | <Clyybber> alehander92: Sure you can |
17:44:50 | disruptek | well, sure. you write it. it can be made in nim trivially. |
17:45:03 | FromDiscord | <Clyybber> You can have a lang without functions |
17:45:09 | FromDiscord | <Clyybber> only macros/templates |
17:46:04 | Zevv | why can't I shl with a negative amount |
17:46:06 | Zevv | this is so silly |
17:46:18 | Araq | you can shr it instead |
17:46:24 | Zevv | Yeah but now I need a branch |
17:46:31 | Zevv | and two lines |
17:46:51 | Araq | not sure what's silly about an explicit "I need a div, wait no, a mul" |
17:46:58 | Zevv | :) |
17:46:59 | disruptek | lol |
17:47:16 | alehander92 | hm |
17:47:21 | disruptek | that quote is a keeper. |
17:47:29 | Zevv | I need to shift left by (W1-W2) when W1 > W2, or shift right by (W2-W1) when W2 > W1 |
17:47:31 | alehander92 | but i suspect something might be not there |
17:47:39 | alehander92 | like, it seems easy |
17:47:41 | FromDiscord | <Clyybber> Araq: How can the tests pass in your concept branch? |
17:47:49 | FromDiscord | <Clyybber> Do we not test the old concepts at all? |
17:47:57 | Araq | we do |
17:48:14 | Araq | I figured out how to evolve Nim without breaking anybody's code ;-) |
17:48:24 | disruptek | everyone is afraid to use them so they don't show up in any code. |
17:48:30 | alehander92 | maybe the problem is that it's almost always lazy evaluation |
17:48:57 | Araq | disruptek, tests/concepts, it's totally a thing |
17:49:19 | disruptek | clyybber: my skiplists exist for use in cps. |
17:49:31 | disruptek | what you may not appreciate is that every operation is atomic. |
17:49:32 | FromDiscord | <Clyybber> Araq: Why not do it with a macro though? |
17:49:39 | Araq | alehander92, removing functions is backwards even CPUs have quite a good idea about them |
17:49:54 | disruptek | it's very hard to break my impl with multiple threads accessing the same structure. |
17:49:55 | alehander92 | i know , i am just wondering if it's possible for fun |
17:49:59 | Araq | Clyybber: I don't see how we could |
17:50:13 | alehander92 | like, how easy would it be to make a lang with only templates |
17:50:19 | FromDiscord | <Clyybber> Araq: I'm working on one, will see how it turns out |
17:50:23 | alehander92 | which supports many concepts: generics/functions/templates |
17:50:49 | Araq | alehander92, it's always "possible" for some super hand wavy definition of "possible" that you seem to be happy with |
17:50:57 | FromDiscord | <Clyybber> Basically transforming proc cmp(a, b: self): bool into cmp(a, b) is bool |
17:50:59 | Zevv | god I love this language so much, sometimes it makes me cry |
17:51:06 | alehander92 | i am happy for "it doesn't seem impossible ?? " |
17:51:12 | FromDiscord | <Clyybber> Zevv: which one/ |
17:51:16 | Zevv | french |
17:51:18 | alehander92 | so it goes to "maybe try that one day" |
17:51:19 | disruptek | lol |
17:51:27 | Araq | when I tell you in which ways it's "impossible" you wouldn't listen anyway |
17:51:35 | alehander92 | that's not true |
17:51:43 | Araq | you don't care about "Impossible" ;-) |
17:52:03 | alehander92 | sounds like a Nike ad :D :D :D |
17:52:08 | FromDiscord | <Clyybber> Araq: No, tell me :) |
17:52:19 | alehander92 | "sashko trying to solve the halting problem" |
17:52:25 | alehander92 | "NOTHING IMPOSSIBLE" |
17:52:31 | Araq | alright how about we start with the nasty detail that you don't know if it's recursive or not when you have function pointers in your language |
17:52:47 | FromDiscord | <Clyybber> Oh, I thought you were talking about the macro :D |
17:53:19 | alehander92 | Araq well, i can just not support function pointers |
17:53:24 | Zevv | disruptek: you're a generic man, think with my. I have a proc taking two ints of possible different size ('8, '16, etc), and I want the return type to be the largest of the two. Can that be genericized |
17:53:44 | alehander92 | but it was mostly a thought experiment guys |
17:53:51 | disruptek | of course. |
17:54:10 | Zevv | how does one express that then |
17:54:20 | disruptek | measure the size with sizeof in a when cond. |
17:54:22 | FromDiscord | <Clyybber> Zevv: When sizeof(T1) > sizeof(T2): T1 else: T2 |
17:54:30 | alehander92 | and i am not sure about mutual recursion |
17:54:36 | alehander92 | if it's possible to easily simulate it |
17:55:00 | Zevv | But I can't put a when cond in the return type, can I? |
17:55:05 | Zevv | can I? |
17:55:06 | FromDiscord | <Clyybber> sure you can |
17:55:08 | disruptek | sure. |
17:55:11 | Zevv | dude |
17:55:12 | Zevv | dudes |
17:55:12 | alehander92 | can we put a man on the spoon |
17:55:27 | Araq | Clyybber: is my RFC not convincing? |
17:55:42 | disruptek | who cares, i'm waiting for the impl to finish iterating. |
17:55:45 | FromDiscord | <Clyybber> Not for me :P |
17:55:47 | Araq | why would you want the old concepts when you can have the new ones? |
17:55:54 | disruptek | the old ones are nicer to use. |
17:55:58 | FromDiscord | <Clyybber> Because the old ones are far more powerful |
17:56:12 | alehander92 | why have functions dudes when you can have alehander92 lng design |
17:56:23 | disruptek | clyybber: that was one of the "non-goals." |
17:56:42 | disruptek | i guess i've just gotten attached to functions. |
17:56:57 | FromDiscord | <Clyybber> And sometimes its nicer to express stuff with the old ones, like in andreaferettis example |
17:57:24 | alehander92 | we can autotranslate between them |
17:57:27 | alehander92 | maybe |
17:57:38 | disruptek | that's what he's working on. |
17:57:41 | alehander92 | but this would fragment things more |
17:57:55 | FromDiscord | <Clyybber> no, a macro can support the new syntax |
17:58:06 | alehander92 | yeah but then you have 2 syntaxes |
17:58:17 | FromDiscord | <Clyybber> so? |
17:58:24 | Zevv | disruptek: I think you are lying to me. https://play.nim-lang.org/#ix=2vNY |
17:58:24 | FromDiscord | <Clyybber> thats not a problem |
17:58:25 | alehander92 | this is not cool in general imho |
17:58:30 | FromDiscord | <Clyybber> huh? |
17:58:38 | FromDiscord | <Clyybber> it is very cool in general |
17:58:38 | alehander92 | like, imagine having a non-trivial language feature |
17:58:41 | Araq | I fail to see how the Monoids look worse with my syntax |
17:58:41 | alehander92 | and 2 syntaxes for it |
17:58:57 | disruptek | https://play.nim-lang.org/#ix=2vNZ |
17:59:07 | Zevv | so noob |
17:59:07 | alehander92 | well i mean it's not super desirablee, now with an existing language it's harder to change stuff |
17:59:14 | * | thomasross joined #nim |
17:59:21 | FromDiscord | <Clyybber> alehander92: What are you talking about? |
17:59:22 | alehander92 | but you have a "learning budget" |
17:59:25 | FromDiscord | <Clyybber> There would be one syntax |
17:59:28 | FromDiscord | <Clyybber> theres a macro |
17:59:29 | disruptek | i blew that budget years ago. |
17:59:33 | alehander92 | so what happens with the old one |
17:59:43 | FromDiscord | <Clyybber> alehander92: Think about it concretely |
17:59:47 | alehander92 | but i do |
18:00:14 | alehander92 | if i have a feature, i prefer reading only one way in codebases how the people use it |
18:00:24 | disruptek | bummer. |
18:00:35 | FromDiscord | <Clyybber> `proc '+'(x, y: self): self` vs `x + y is T` |
18:00:35 | alehander92 | templates and macros are different |
18:00:44 | alehander92 | because macros are more general |
18:00:49 | FromDiscord | <Clyybber> sometimes its nicer to write the left one, sometimes the right one |
18:00:50 | alehander92 | and expose more stuff |
18:01:09 | alehander92 | clyybber and now a new nim user has to learn both |
18:01:15 | FromDiscord | <Clyybber> so what |
18:01:16 | Araq | you're so quickly with everything |
18:01:25 | alehander92 | i mean it's not a problem nvm |
18:01:30 | Araq | right now I see how far my idea can be taken |
18:01:43 | Araq | and already you talk about two ways to do things and shit |
18:01:45 | disruptek | they should just learn the old way and we should just teach araq, a single nim user, to fix his spec. |
18:02:06 | alehander92 | i have no problem with it |
18:02:10 | disruptek | good. |
18:02:12 | disruptek | it's settled, then. |
18:02:15 | alehander92 | sorry, just talking about possible confusion |
18:02:20 | FromDiscord | <Clyybber> alehander92: See, Nim has a lot of ways to write one thing |
18:02:24 | FromDiscord | <Clyybber> but it doesn't hurt it. |
18:02:29 | alehander92 | but .. this is not the saME |
18:02:36 | alehander92 | but let's not really discuss it |
18:02:44 | FromDiscord | <Clyybber> lets do ;) |
18:02:44 | disruptek | way ahead of you. |
18:02:46 | alehander92 | too easy to leave the wrong impression |
18:03:08 | FromDiscord | <Clyybber> alehander92: Sorry, I didn't mean to be dismissive |
18:03:14 | Araq | how can you type check generic code with the old concepts? I claim it's nearly impossible |
18:03:27 | alehander92 | maybe, all i was saying was |
18:03:28 | Araq | now fight over that instead |
18:03:32 | FromDiscord | <Clyybber> I say, we do it how we do it rn |
18:03:37 | alehander92 | that even if the new concepts are super cool |
18:03:46 | disruptek | i claim that it's slow, and that's not the only problem. |
18:03:49 | alehander92 | it would be a bit frustrating for some users to have both |
18:03:53 | alehander92 | but no biggie |
18:04:01 | Araq | I say, the way we do it right now is embarrassing. |
18:04:13 | disruptek | yeah, it's not good enough. |
18:04:16 | FromDiscord | <Clyybber> I say its great |
18:04:21 | FromDiscord | <Clyybber> but it can be improved |
18:04:22 | disruptek | but that doesn't mean it's a syntax issue. |
18:04:31 | Araq | it's a hack and the hack is in the spec |
18:04:32 | alehander92 | i don't know enough |
18:04:40 | alehander92 | so i should go the feature thing |
18:04:51 | FromDiscord | <Clyybber> Araq: What some people call a hack other people call a groundbreaking invention :D |
18:04:54 | alehander92 | do the * |
18:04:57 | Araq | can't "fix" the implementation for a hacky spec |
18:05:07 | FromDiscord | <Clyybber> Whats there to fix? |
18:05:13 | disruptek | he just wants to remove compiles. |
18:05:21 | FromDiscord | <Clyybber> Yeah, but compiles is great |
18:05:33 | Araq | disruptek, I don't mind 'compiles' but it's not a foundation for a type checker |
18:05:35 | disruptek | so you just want to make compiles faster. |
18:05:50 | disruptek | fair enough, so we need typeCompiles. |
18:06:12 | disruptek | this is the concept of a conceptual type. |
18:06:18 | FromDiscord | <Clyybber> I don't see why it can't be a foundation for a type checker? |
18:06:25 | FromDiscord | <Clyybber> clearly it can |
18:06:29 | disruptek | it's too expensive, apparently. |
18:06:31 | FromDiscord | <Clyybber> even if it can be considered hacky |
18:06:35 | FromDiscord | <Clyybber> I would say its quite elegant |
18:06:44 | Araq | well so write a spec for system.compiles |
18:06:47 | disruptek | also, witness nimph, it doesn't work for even simple uses. |
18:06:51 | Araq | we need one anyway |
18:07:03 | FromDiscord | <Clyybber> Yeah |
18:07:05 | alehander92 | it's good to have more |
18:07:11 | Araq | bbl |
18:07:11 | alehander92 | fine-grained primitives? |
18:07:14 | alehander92 | is that the problem |
18:07:18 | disruptek | no. |
18:07:26 | alehander92 | oh so close to being smart |
18:07:40 | disruptek | the problem is that we're using a giant hammer to swat a fly. |
18:07:44 | alehander92 | almost felt the rush from that 7th grade exam |
18:07:51 | alehander92 | yes |
18:07:53 | alehander92 | that's similar |
18:08:03 | alehander92 | you can use some subfunctionality |
18:08:06 | disruptek | what the hell were they teaching in 7th grade? |
18:08:07 | alehander92 | specific for this case |
18:08:11 | alehander92 | math? |
18:08:21 | disruptek | math? |
18:08:30 | disruptek | what does pest control have to do with math? |
18:08:37 | alehander92 | aaaaah |
18:08:52 | alehander92 | uhmm |
18:09:13 | FromDiscord | <Clyybber> disruptek: See, even typed params for macros can be considered hacky |
18:09:25 | * | thomasross quit (Ping timeout: 240 seconds) |
18:09:25 | FromDiscord | <Clyybber> but they work now; and they are pretty fundamental |
18:09:27 | alehander92 | can't we have macros for types |
18:09:28 | FromDiscord | <Clyybber> to what you are doing |
18:09:36 | disruptek | you don't need to convince me. |
18:09:37 | FromDiscord | <Clyybber> alehander92: Guess what I'm doing :) |
18:09:39 | Araq | they are *more* fundamental |
18:09:45 | Araq | than untyped macros. |
18:09:48 | disruptek | i've wanted concepts for a long time and i finally gave up waiting. |
18:09:50 | Araq | we got that one wrong. |
18:09:57 | disruptek | a month later, they are finally being rewritten. |
18:10:08 | Araq | disruptek, yeah, be happy :-) |
18:10:10 | Araq | bbl |
18:10:15 | Zevv | and all within 1 day only |
18:10:22 | alehander92 | disruptek quickly |
18:10:28 | disruptek | they can't be that fundamental if no one ever runs into this shit but us. |
18:10:33 | alehander92 | say you give up X |
18:10:44 | FromDiscord | <Clyybber> disruptek: Tell that to andreaferetti, mratsim, etc |
18:10:46 | disruptek | like, what, mescaline? |
18:10:51 | Zevv | yes please |
18:10:56 | alehander92 | give up all drugs |
18:11:00 | FromDiscord | <Clyybber> They are fundamental in the sense that they are incredibley powerful |
18:11:24 | disruptek | well, it's the empty room problem. |
18:11:34 | Zevv | right |
18:11:41 | disruptek | i just don't understand it. |
18:11:50 | disruptek | i thought i bought a house with two bathrooms. |
18:11:54 | disruptek | this is a fucking closet. |
18:12:03 | FromDiscord | <Clyybber> there is no problem, we gotta fix the bugs, one by one, or three by three |
18:12:05 | disruptek | third time this week i'll have shit in a closet. |
18:12:28 | FromDiscord | <Clyybber> and you gotta report them :) |
18:12:37 | disruptek | c'mon man, i can't report everything. |
18:12:41 | disruptek | minimizing takes forever. |
18:12:55 | FromDiscord | <Clyybber> yeah, but if you want it to get fixed you gotta do it |
18:12:57 | disruptek | and the fucking compiler doesn't help me write code to minimize code faster. |
18:12:59 | FromDiscord | <Clyybber> thats the thing |
18:13:05 | * | natrys joined #nim |
18:13:06 | FromDiscord | <Clyybber> we can reinvent all features |
18:13:10 | FromDiscord | <Clyybber> and reimplement them |
18:13:16 | disruptek | that just means new bugs. |
18:13:21 | disruptek | bugs i don't know about. |
18:13:26 | FromDiscord | <Clyybber> yeah |
18:13:30 | FromDiscord | <Clyybber> exactly |
18:13:46 | FromDiscord | <Clyybber> a new implementation often seems better because you didn't test it as much |
18:14:27 | disruptek | i need more people using testes. |
18:14:35 | disruptek | it's pretty good but it needs to get better. |
18:14:41 | FromDiscord | <Clyybber> it needs less typos |
18:15:42 | disruptek | i'm thinking of making blocks in continuations. then i can run a test and then rewind state. |
18:20:30 | Zevv | How would I make this less repetitive: https://github.com/zevv/fixedpoint/blob/ico/src/fixedpoint.nim#L44 |
18:21:10 | * | thomasross joined #nim |
18:21:23 | Zevv | I tried `template T() = when sizeof(T1) > sizeof(T2): T1 else: T2` but no |
18:21:26 | * | endragor quit (Remote host closed the connection) |
18:21:52 | disruptek | use a template. |
18:22:21 | disruptek | first you answer the question of which is larger, then you call the template with the arguments in a given order. |
18:22:38 | Zevv | aah dang my brain is porridge today |
18:22:56 | disruptek | it kinda seems like you want to case over the cmp. |
18:23:35 | Zevv | wut |
18:23:55 | disruptek | there's no case when, right? |
18:24:01 | Zevv | nope |
18:24:04 | disruptek | that's just what this looks like. |
18:24:30 | * | JohnDeere8530 joined #nim |
18:24:32 | disruptek | in skiplists i went to a lot of trouble to make my own comparison operator and result. |
18:24:57 | disruptek | just because i want undefined comparisons to be a thing. |
18:25:29 | Zevv | much better: https://github.com/zevv/fixedpoint/blob/ico/src/fixedpoint.nim#L43 |
18:25:59 | disruptek | remove the return. |
18:27:02 | Zevv | yeah just did that. Trying to templetize it further still |
18:27:07 | Zevv | I need that pattern in a lot of places |
18:27:21 | * | thomasross quit (Remote host closed the connection) |
18:27:40 | * | gmaggior joined #nim |
18:27:41 | * | thomasross joined #nim |
18:27:48 | disruptek | you can template the insane proc signatures, too. |
18:29:19 | * | endragor joined #nim |
18:31:00 | * | maier joined #nim |
18:32:11 | FromDiscord | <Clyybber> https://play.nim-lang.org/#ix=2vOd |
18:33:30 | Zevv | what's that |
18:33:30 | disruptek | but he wants to go the other way. |
18:33:49 | * | endragor quit (Ping timeout: 258 seconds) |
18:33:49 | * | Kaivo joined #nim |
18:33:55 | disruptek | i mean, he wants /us/ to. |
18:34:14 | FromDiscord | <Clyybber> Zevv: A macro for a different syntax for concepts |
18:34:25 | FromDiscord | <Clyybber> The one outlined in the concept redesign RFC |
18:35:11 | disruptek | but the syntax isn't the part he's trying to address. |
18:35:15 | Zevv | no I see |
18:35:28 | Zevv | interfaces on steroids |
18:36:06 | FromGitter | <ynfle> Is there any difference between `static: let` and `const`? |
18:36:07 | * | maier quit (Ping timeout: 258 seconds) |
18:36:25 | FromGitter | <ynfle> Practically and under the hood |
18:36:41 | FromDiscord | <Clyybber> yeah |
18:36:47 | FromDiscord | <Clyybber> static: let introduces a scope |
18:36:51 | * | thomasross quit (Remote host closed the connection) |
18:37:03 | FromDiscord | <Clyybber> you can't access the symbol outside of the static block |
18:37:08 | FromDiscord | <Clyybber> its stays in static land |
18:37:10 | * | thomasross joined #nim |
18:37:33 | * | JohnDeere8530 quit (Remote host closed the connection) |
18:38:07 | FromGitter | <ynfle> Other than that? In terms of how the bindings work etc. |
18:38:19 | disruptek | the better question is why compileTime vars are so stupid. |
18:42:58 | FromDiscord | <Clyybber> disruptek: It is. |
18:43:04 | * | thomasross quit (Ping timeout: 246 seconds) |
18:43:11 | FromDiscord | <Clyybber> The syntax is different with the new ones |
18:43:43 | FromDiscord | <Clyybber> we can optimize the old ones too |
18:43:48 | disruptek | i might be confused. |
18:43:59 | Araq | typeCompiles misses the point as much as 'compiles' |
18:44:27 | Araq | whether it *compiles* or not is actually the less interesting question. the real question is "how to bind the type variables" |
18:44:47 | disruptek | willItBlend() |
18:44:51 | disruptek | call it whatever you want. |
18:45:09 | Araq | which is why I wrote my concepts in two days and the old ones took months to implement :P |
18:45:37 | FromDiscord | <Clyybber> did zah implement the old ones? |
18:45:47 | disruptek | it might have been the wrong approach, indeed, but the result wasn't perfect either. |
18:45:52 | disruptek | so it's not enough to pass the tests. |
18:45:56 | disruptek | the tests are insufficient. |
18:46:15 | Araq | yeah, give me the example you struggled with |
18:46:18 | FromDiscord | <Clyybber> I wonder how long it took zah to get the first prototype |
18:46:25 | FromDiscord | <Clyybber> and if compiles existed at the time |
18:46:31 | Araq | it did |
18:46:40 | disruptek | my current example is in nimph. |
18:46:47 | Araq | and to be fair, I don't know how long it took him |
18:47:11 | * | thomasross joined #nim |
18:47:42 | Araq | but I've seen the error messages and seen bug reports about exponential compile-times |
18:47:51 | disruptek | https://github.com/disruptek/nimph/blob/denimble/nimph/groups.nim |
18:48:16 | disruptek | https://github.com/disruptek/nimph/pull/140 |
18:48:17 | disbot | ➥ nimph 2.0 |
18:48:21 | * | thomasross quit (Remote host closed the connection) |
18:48:21 | disruptek | no, i don't have a minimal repro. |
18:48:31 | disruptek | http://ix.io/2v3M |
18:48:41 | * | thomasross joined #nim |
18:48:50 | FromDiscord | <Clyybber> yeah the exponential compile-times are interesting |
18:49:23 | disruptek | what's fun is when your compile-time isn't exponential but then you add .explain and now it never returns. |
18:49:58 | alehander92 | but exp time was about caching instantiations |
18:49:58 | alehander92 | iirc |
18:50:21 | * | thomasross quit (Remote host closed the connection) |
18:50:24 | disruptek | here's the current groups output: http://ix.io/2vOl |
18:50:40 | alehander92 | my eyes |
18:50:58 | disruptek | curl it. |
18:52:02 | FromDiscord | <Bo> https://media.discordapp.net/attachments/503656912605151232/680052489990701100/ezgif.com-add-text_1.gif |
18:52:13 | FromDiscord | <Clyybber> lol |
18:52:44 | * | arecacea1 quit (Remote host closed the connection) |
18:53:12 | * | arecacea1 joined #nim |
18:53:15 | FromDiscord | <Clyybber> disruptek: do you think its hard to minimize? |
18:53:50 | * | FromDiscord quit (Remote host closed the connection) |
18:54:07 | * | FromDiscord joined #nim |
18:55:31 | disruptek | i dunno. |
18:55:57 | disruptek | i don't even really know how many bugs are inside there now. |
18:56:12 | disruptek | if you rearrange the order, for example, new ones are born. |
18:56:54 | * | bouzu_ quit (Quit: Leaving) |
18:59:38 | Zevv | I curled it. My eyes |
19:01:38 | disruptek | dust is too stupid about config files to minimize it. |
19:01:52 | disruptek | annoying. |
19:05:15 | disruptek | i guess nimble refuses to install a package that lacks a .nimble. |
19:05:17 | disruptek | annoying. |
19:06:52 | * | endragor joined #nim |
19:08:33 | def- | Araq: sure |
19:14:18 | * | endragor quit (Ping timeout: 260 seconds) |
19:15:48 | Zevv | disruptek: euhm more noob. How would I templetize these `insane proc signatures`? |
19:16:06 | Zevv | because I think I have been underestimating templates over the last few years |
19:18:27 | disruptek | you know, something where you can say genericOperator `+`: ... and have it write the generics for you. |
19:18:45 | * | bung quit (Ping timeout: 240 seconds) |
19:20:30 | * | Jesin quit (Quit: Leaving) |
19:26:42 | Zevv | oh yea sure that's what I do know |
19:26:56 | Zevv | I thought I could make a template X = [A, B, C, D] or something like that |
19:32:58 | disruptek | nah. |
19:35:18 | Zevv | it's becoming a strange thing |
19:36:08 | disruptek | oh yeah? |
19:37:24 | Zevv | yeah |
19:38:28 | disruptek | huh. |
19:41:08 | * | narimiran quit (Ping timeout: 256 seconds) |
19:48:47 | * | superbia1 is now known as superbia |
19:49:00 | disruptek | Zevv: it's time for the moment of truth. |
19:49:17 | disruptek | find out if skiplists are faster, and if so, by how much. |
19:49:41 | disruptek | and if not, by how much. 😁 |
19:49:41 | Araq | skiplists? |
19:49:49 | disruptek | !repo skiplists |
19:49:49 | disbot | https://github.com/disruptek/skiplists -- 9skiplists: 11generic skip list implementations💃 15 5⭐ 0🍴 |
19:50:04 | Araq | why would they be faster than the more commonly used data structures? |
19:50:07 | disruptek | you won't like them because they don't exploit cache locality. |
19:50:19 | Araq | yep |
19:50:21 | * | bung joined #nim |
19:51:01 | disruptek | that's okay. |
19:51:04 | disruptek | they aren't /for/ you. |
19:51:22 | Araq | the problem is that they are not for the CPU either |
19:55:25 | * | bung quit (Ping timeout: 264 seconds) |
19:55:33 | disruptek | roughly 10x faster for adds. |
19:55:47 | * | lritter quit (Ping timeout: 240 seconds) |
19:55:54 | * | superbia quit (Quit: WeeChat 2.9) |
19:56:22 | Araq | than seqs? |
19:56:32 | disruptek | no, silly. |
19:56:38 | disruptek | normal linked lists. |
19:56:54 | Araq | ok well |
19:56:54 | * | lritter joined #nim |
19:56:57 | disruptek | they aren't /for/ you. |
19:58:41 | Zevv | disruptek: faster then what |
19:58:54 | disruptek | doubly linked lists. |
19:59:02 | Zevv | well no wonder |
19:59:38 | disruptek | yes. |
19:59:45 | Araq | lol |
20:00:08 | Zevv | did you make a translation rom an existing C lib, or did you implement from scratch? |
20:00:29 | disruptek | scratch, i couldn't find a design i liked. |
20:00:33 | Zevv | sweet |
20:00:41 | disruptek | why do you think so? |
20:00:52 | Zevv | I implemented one once and it was more work then I expected it to be |
20:01:35 | disruptek | i haven't audited it properly, but these might be sufficiently atomic for multithread use. |
20:02:07 | disruptek | that's the goal, anyway. |
20:02:40 | disruptek | now i have to impl a new version for clyybber. |
20:02:55 | Araq | good night guys |
20:03:41 | Zevv | sleep well araq |
20:03:54 | disruptek | peace |
20:08:13 | disruptek | or we could overhaul golden finally. |
20:08:32 | Zevv | is nimph3 done yet |
20:08:39 | disruptek | i'm waiting for concepts. |
20:08:58 | Zevv | is cps5 done yet |
20:09:19 | disruptek | cps, where do i know that acronym from? |
20:09:24 | disruptek | are you thinking of csp? |
20:09:26 | disruptek | !repo csp |
20:09:27 | disbot | https://github.com/jackvandrunen/nim-csprng -- 9nim-csprng: 11A fast cryptographically secure pseudo-random number generator in pure Nim, using the Salsa20 cipher. 15 1⭐ 0🍴 |
20:10:06 | Zevv | chronic pain syndroem |
20:10:06 | disruptek | clyybber's patch is not merged yet, i guess. |
20:11:00 | Zevv | CPS = Clyybbers Patch Service |
20:11:08 | disruptek | pretty much, yeah. |
20:11:24 | disruptek | imagine if we had a decent language to work with. |
20:12:54 | Zevv | and no religion too |
20:13:23 | disruptek | you may say that i'm a dreamer. |
20:25:30 | Zevv | PMunch: here still? |
20:29:41 | * | bung joined #nim |
20:31:56 | * | maier joined #nim |
20:34:04 | * | bung quit (Ping timeout: 256 seconds) |
20:37:18 | * | maier quit (Ping timeout: 256 seconds) |
20:39:40 | PMunch | Zevv, just got back :) |
20:42:11 | Zevv | missed you *sooo* much |
20:42:22 | PMunch | Haha, missed you too |
20:42:40 | Zevv | I did stuff. The code is less readable now, but still better |
20:42:41 | Zevv | somewhat |
20:42:45 | PMunch | Hmm |
20:42:55 | Zevv | I'm hacking in the 'ico' branch, if you are bored, see if that still works for you |
20:43:09 | Zevv | one of these days |
20:43:22 | gmaggior | Hi. Do you know an article that can point out differences between Python and Nim code cause of dynamic typing vs static typing? |
20:43:40 | PMunch | Zevv, ooh OverflowHandling |
20:43:58 | PMunch | gmaggior, hmm not off the top of my head |
20:44:18 | gmaggior | PMunch, ok |
20:44:27 | PMunch | I wrote this a while back: https://peterme.net/nim-types-originally-a-reddit-reply.html |
20:44:44 | PMunch | Might help somewhat |
20:44:52 | PMunch | But nothing that directly compares it against Python |
20:45:09 | Zevv | PMunch: not there yet, but put it in the type |
20:45:18 | Zevv | it's mostly about less repetition in the code |
20:45:22 | Zevv | lot of template magic |
20:45:55 | PMunch | Aah right |
20:45:58 | PMunch | I'll check it out |
20:46:07 | Zevv | gmaggior: it's not really different from any dynamic vs any static language, you can as well compare javascript and Rust |
20:46:12 | Zevv | it's two different beasts |
20:46:31 | Zevv | biggest difference is that Nim has generics, which can take you a long way giving you the *feel* of a dynamic language |
20:46:40 | Zevv | while still having the benefits of compilation and type checking |
20:47:26 | gmaggior | PMunch, thanks for the link |
20:48:11 | gmaggior | Zevv, yeah thanks. Your words clarified a lot my mind about |
20:49:23 | gmaggior | Zevv, I want to see the thing from the other side: duck typing |
20:51:00 | Zevv | that's where generics come in |
20:51:41 | Zevv | proc something[T](a, b: T): T = a + b |
20:53:29 | gmaggior | <nod> thx |
21:03:04 | * | solitudesf joined #nim |
21:04:01 | * | Vladar quit (Quit: Leaving) |
21:22:25 | * | solitudesf quit (Ping timeout: 240 seconds) |
21:32:29 | * | Jesin joined #nim |
21:34:26 | disruptek | one touch is just too much. |
21:35:09 | PMunch | Ugh, I have to design a level for my game jam game.. |
21:35:44 | Zevv | bwah poor man |
21:39:30 | Zevv | show us some of your stuff |
21:40:25 | Zevv | tomorrow, because now it's time for a nap |
21:41:39 | PMunch | It will all be open source and available by tonight :) |
21:43:02 | * | natrys quit (Ping timeout: 256 seconds) |
21:43:36 | * | lritter quit (Ping timeout: 256 seconds) |
21:52:11 | disruptek | Zevv you are such a sweetheart. |
21:56:15 | Prestige | PMunch: oh sweet. I need to see more nim games |
22:03:37 | * | ForumUpdaterBot quit (Read error: Connection reset by peer) |
22:05:35 | * | bung joined #nim |
22:06:34 | * | ForumUpdaterBot joined #nim |
22:11:45 | * | krux02 quit (Remote host closed the connection) |
22:32:47 | * | maier joined #nim |
22:36:54 | * | oprypin quit (Quit: Bye) |
22:37:01 | * | oprypin joined #nim |
22:37:25 | * | maier quit (Ping timeout: 240 seconds) |
22:42:27 | PMunch | Hmm, this is weird |
22:42:38 | PMunch | When I pick up the 16th item it bugs out.. |
22:42:45 | PMunch | And wont register it as picked up |
22:43:11 | PMunch | No wait, the 17th |
22:43:51 | PMunch | My items are stored as an array of positions, and the way they are registered as "taken" is by including the index in the array in a set |
22:44:09 | PMunch | The set is defined as 0..items.len |
22:44:53 | disruptek | it's /defined/ that way? |
22:45:07 | PMunch | Yeah |
22:45:22 | PMunch | "var takenBearFood: set[0..bearFoods.count]" |
22:45:40 | disruptek | okay. |
22:46:05 | PMunch | Where bearFood is a "type PositionData[count, width: static[int]] = distinct array[count, uint16]" |
22:46:27 | PMunch | I think sets might be broken on AVR.. |
22:51:40 | PMunch | Hmm, indeed |
22:51:53 | PMunch | Including 15 works fine, but including 16 doesn't work |
22:53:03 | disruptek | that makes very little sense. |
22:53:09 | PMunch | Like "takenBearFood.incl 17; if takenBearFood.contains 17" that if is false |
23:00:36 | disruptek | probably better not to take so much food from a bear. |
23:01:04 | PMunch | Well I'm trying to let him pick them up |
23:01:11 | PMunch | But now I have to take food away from the bear |
23:05:17 | * | endragor joined #nim |
23:14:07 | * | endragor quit (Ping timeout: 265 seconds) |
23:15:37 | bung | dotOperator template can't use await ? |
23:16:27 | * | audiofile joined #nim |
23:25:41 | voidpi | someone have a reading suggestion for learning nim? I'm ok in python OOP but memory allocation, and stack and heap usage are kind of alien to me |
23:37:24 | bung | well, that's not first thing you need to know |
23:37:44 | disruptek | ~memory |
23:37:44 | disbot | memory: 11The Nim memory model: https://zevv.nl/nim-memory/ |
23:38:01 | bung | you know object and ref that's fine |
23:40:15 | voidpi | I was just reading about that here: https://peterme.net/nim-types-originally-a-reddit-reply.html |
23:40:36 | kinkinkijkin | gles2 wants the entire shader converted to an ascii cstringarray which you then have to convert into an array of arrays of GlByte apparently |
23:40:59 | kinkinkijkin | every single error i run into with this thing. |
23:42:05 | voidpi | thanks disruptek and bung |
23:59:26 | PMunch | Game's out, enjoy: https://community.arduboy.com/t/manbarschwein-game-jam-5/9229 |