00:10:40 | flaviu | Is there a way to get VLAs in nimrod? |
00:14:54 | * | saml_ joined #nimrod |
00:25:51 | Varriount | flaviu: Variable Length Arrays? |
00:26:19 | flaviu | Yes. I want an array that is stack-allocated with a size I specify at runtime |
00:52:59 | * | hoverbear joined #nimrod |
00:57:19 | Skrylar | flaviu: maybe |
00:57:28 | Skrylar | it compiles to C so you'd need a c-compatible way |
00:57:39 | Skrylar | windows has a way of allocating on the stack with one of the *allocs |
00:57:49 | Skrylar | it'd have to be a special module |
00:58:48 | dom96 | Wow, deja vu. I remember somebody else asking exactly the same thing. |
01:05:51 | * | brson quit (Ping timeout: 244 seconds) |
02:12:07 | * | kemet joined #nimrod |
02:12:36 | * | kemet quit (Client Quit) |
02:46:13 | * | q66 quit (Quit: Leaving) |
03:21:54 | Varriount | flaviu: Why does it have to be on the stack? |
03:24:55 | flaviu | Because I don't want to heap-allocate for what is effectively a glorified integer |
04:03:00 | * | flaviu quit (Ping timeout: 240 seconds) |
04:19:07 | * | darkfusion quit (Ping timeout: 252 seconds) |
04:31:31 | * | darkfusion joined #nimrod |
04:43:02 | * | noam quit (Ping timeout: 264 seconds) |
04:45:03 | * | saml_ quit (Ping timeout: 240 seconds) |
04:47:47 | * | Jehan_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
04:53:41 | * | darkfusion quit (Ping timeout: 264 seconds) |
05:00:16 | * | darkfusion joined #nimrod |
05:34:49 | * | Dingba quit (Ping timeout: 246 seconds) |
06:03:09 | * | eigenlicht quit (Ping timeout: 255 seconds) |
06:07:01 | * | hoverbear quit () |
07:17:47 | * | gkoller joined #nimrod |
07:31:52 | * | btiffin joined #nimrod |
07:43:12 | * | gkoller quit (Ping timeout: 276 seconds) |
07:47:52 | btiffin | I'm always sad to see good technical pages yanked off wikipedia. I have a 700 ish page COBOL book. GNU Cobol, generates intermediate C, so, it'll play Nimrod. I'm going to try and write up a sample for a SourceForge discussion. Would mentioning Nimrod in a COBOL book (free mind you), grant it a sliver of 'notable', at least enough to protest the delete? |
07:54:50 | btiffin | And while I'm here... The plan is to integrate a Nimrod subprogram called from GNU Cobol. Compile and link envisioned as cobc -x callnim.cob nimrodian.c |
07:55:50 | btiffin | I see --noMain, wondering what to expect for entry point name. (COBOL will want to generate the main). |
07:58:00 | btiffin | and ... just saw --mainmodule, so off to explore now. |
08:08:39 | * | Trixar_za quit (Ping timeout: 252 seconds) |
08:09:01 | * | Trixar_za joined #nimrod |
08:14:41 | * | f0wl joined #nimrod |
08:44:11 | * | BitPuffin joined #nimrod |
08:44:23 | Skrylar | hrm |
08:44:52 | Skrylar | i might have to brew some coffee later; having to track down if png is segfaulting because of an internal error, because a nimrod interaction, or because of user error |
08:55:09 | * | joelmo joined #nimrod |
08:57:12 | joelmo | hi all, does this discard statement mean anything here https://github.com/Araq/Nimrod/blob/7778e79f24a1da4dccfeacc0e9936b171fd1eb74/tests/async/tasyncudp.nim#L24-L36 |
09:05:26 | f0wl | joelmo, its a block comment |
09:06:09 | joelmo | f0wl: ok thanks |
09:16:47 | EXetoC | it's just like any other value, but some have suggested to make this an exception |
09:17:53 | * | kunev joined #nimrod |
09:20:21 | EXetoC | so it's not strictly a comment |
09:24:27 | joelmo | i think it looks weird to use a keyword to make a block comment, wouldnt it be better to maybe have something like three ### to start a block |
09:24:59 | EXetoC | http://build.nimrod-lang.org/docs/manual.html#triple-quoted-string-literals |
09:27:53 | EXetoC | something like that has been suggested. # or 'when false' is fine with me |
09:46:22 | * | kunev quit (Quit: leaving) |
09:49:29 | * | gsingh93_ quit (Quit: Connection closed for inactivity) |
10:17:16 | * | vendethiel quit (Remote host closed the connection) |
10:18:49 | * | vendethiel joined #nimrod |
10:24:33 | * | BitPuffin quit (Ping timeout: 240 seconds) |
10:25:55 | * | vendethiel quit (Ping timeout: 244 seconds) |
10:27:03 | * | vendethiel joined #nimrod |
10:56:12 | dom96 | btiffin: It certainly can't hurt. |
10:56:31 | dom96 | btiffin: But the wikipedia guys are the best to ask I guess. |
11:06:58 | * | noam joined #nimrod |
11:44:40 | * | q66 joined #nimrod |
11:58:02 | * | saml_ joined #nimrod |
12:02:36 | * | EXetoC quit (Quit: WeeChat 0.4.3) |
12:02:57 | * | exirctest joined #nimrod |
12:12:19 | * | BitPuffin joined #nimrod |
12:21:27 | * | untitaker quit (Ping timeout: 245 seconds) |
12:26:53 | * | untitaker joined #nimrod |
12:41:33 | * | exirctest quit (Remote host closed the connection) |
12:44:30 | * | darkf quit (Quit: Leaving) |
14:06:02 | * | saml_ quit (Ping timeout: 245 seconds) |
14:16:21 | * | BitPuffin quit (Ping timeout: 244 seconds) |
14:19:50 | * | BitPuffin joined #nimrod |
14:22:36 | * | goobles joined #nimrod |
14:25:02 | * | BitPuffin quit (Ping timeout: 264 seconds) |
14:25:53 | * | askatasuna joined #nimrod |
15:04:18 | * | exirctest joined #nimrod |
15:04:58 | * | eximiusw1staken quit (Ping timeout: 240 seconds) |
15:18:46 | * | eximiuswastaken joined #nimrod |
15:41:28 | flyx | hm. I figure I can't get Nimrod to parse a proc declaration as proc declaration if I substitute "proc" with a macro I define |
15:43:18 | * | hoverbear joined #nimrod |
15:43:24 | * | hoverbear quit (Max SendQ exceeded) |
15:43:55 | * | hoverbear joined #nimrod |
15:55:23 | * | hoverbear quit () |
15:58:50 | * | hoverbear joined #nimrod |
16:02:35 | * | hoverbear quit (Client Quit) |
16:43:55 | * | mal`` quit (Ping timeout: 240 seconds) |
16:45:12 | * | musicalchair quit (Ping timeout: 245 seconds) |
16:46:03 | * | eximiuswastaken quit (Ping timeout: 272 seconds) |
16:48:43 | joelmo | is there any difference in performance between the async io interfaces with callback or await/future? or should i prefer to use one over the other in some cases, maybe this is just a matter of taste? |
16:52:24 | * | eximiuswastaken joined #nimrod |
16:55:54 | * | mal`` joined #nimrod |
16:57:29 | * | eximiuswastaken quit (Remote host closed the connection) |
17:03:16 | * | superfunc joined #nimrod |
17:05:27 | Araq | joelmo: in theory the callbacks should be a bit faster since the async is built on top of these |
17:05:37 | Araq | but I haven't done any measurements |
17:06:14 | Araq | and we definitely aim for optimizing the whole async stack |
17:08:24 | * | superfunc quit (Quit: leaving) |
17:08:59 | * | superfunc joined #nimrod |
17:10:54 | joelmo | Araq: ok thanks |
17:31:08 | * | BitPuffin joined #nimrod |
17:41:01 | * | springbok quit (Ping timeout: 240 seconds) |
17:42:45 | superfunc | Do you guys know if any one has made some libraries to deal with sprite sheets yet? I don't think SDL handles that directly |
17:44:39 | exirctest | allegro? |
17:46:13 | * | musicalchair joined #nimrod |
17:46:20 | superfunc | It might, though I don't really wanna bring in the whole library for that |
17:52:33 | * | Jesin quit (Quit: Leaving) |
18:02:54 | * | brson joined #nimrod |
18:34:41 | * | brson quit (Quit: leaving) |
18:34:49 | * | brson joined #nimrod |
18:36:25 | * | brson_ joined #nimrod |
18:36:28 | * | brson quit (Client Quit) |
18:40:30 | * | brson_ quit (Client Quit) |
18:40:37 | * | brson joined #nimrod |
18:42:07 | OrionPK | you could use horde:-) |
18:45:05 | exirctest | there's probably more to pull in then |
18:51:46 | superfunc | It's all good. I'll make some standalone stuff for it |
19:10:31 | * | superfunc quit (Ping timeout: 240 seconds) |
19:15:50 | goobles | NIMRODDDDDDDDDD |
19:19:12 | dom96 | hi goobles |
19:20:38 | goobles | HI dom96 |
19:27:59 | Araq | hi goobles welcome |
19:29:27 | Varriount | Meep |
19:30:54 | dom96 | Varriount: I have a task for you |
19:31:01 | dom96 | interested? |
19:35:09 | goobles | brson is a rust spy |
19:35:33 | Araq | we know |
19:46:58 | goobles | is nimrod your favorite language araq |
19:47:22 | Araq | of course |
19:47:27 | goobles | germany what r u doing |
19:48:48 | Araq | 2nd match is always a problem for germany :P |
20:03:26 | * | exirctest quit (Read error: No route to host) |
20:04:26 | goobles | you can't overload functions in Rust, and D is abit boring, so Nimrod wins |
20:05:46 | Araq | yay |
20:06:04 | Araq | and we haven't even shown you our upcoming new concurrency suff ;-) |
20:06:11 | dom96 | hell yeah Nimrod wins. |
20:06:14 | * | exirctest joined #nimrod |
20:06:56 | * | vendethiel quit (Quit: q+) |
20:08:18 | goobles | you have some good ideas in this language, look forward to seeing it |
20:08:46 | Araq | 1:0 !!! |
20:08:58 | goobles | someone score? |
20:09:04 | Araq | germany |
20:09:16 | goobles | my feed doesn't show it hum |
20:09:25 | goobles | i must be be delayed |
20:09:41 | goobles | ok they scored |
20:09:51 | goobles | goood job germany |
20:10:04 | dom96 | who are they playing against? |
20:10:13 | goobles | ghana |
20:11:11 | goobles | naked guy? |
20:11:11 | goobles | wtf |
20:12:08 | Araq | 1:1 :-( |
20:12:12 | Araq | fuck |
20:12:21 | goobles | noo |
20:13:13 | goobles | ghana isn't bad not that suprising, hope germany wins though |
20:13:39 | dom96 | damn you, not I have to watch it |
20:13:42 | dom96 | *now |
20:13:55 | dom96 | Didn't the US win against Ghana? |
20:14:03 | goobles | yea |
20:14:16 | joelmo | 2 - 1, in that match |
20:14:52 | dom96 | Surely Germany is much better than the US? |
20:15:00 | goobles | they are yah |
20:15:07 | goobles | but seems to be sucking in this game |
20:15:13 | goobles | well not scoring;0 |
20:15:17 | joelmo | but they are much worse if they loose this game :o |
20:15:59 | goobles | the US won against ghana but didn't look too hot |
20:16:09 | goobles | mostly defending |
20:16:18 | goobles | and getting injured |
20:21:14 | dom96 | ooh, another score for Ghana |
20:21:24 | goobles | really? |
20:21:35 | goobles | shit.. |
20:22:40 | joelmo | just above the head and between the hands on the goal keeper |
20:22:49 | goobles | hum well if the US beats Portugal maybe they will be top in the group hah |
20:24:34 | goobles | germany clobbered portugal can't belive they are loosing now |
20:26:11 | Araq | oh well |
20:26:25 | Araq | germany simply has no balls |
20:27:08 | Araq | whenever the other team scores they act like little girls |
20:27:31 | Araq | I wonder if I'll ever see a different team |
20:28:43 | Araq | ah, I take it back :P |
20:28:45 | Araq | 2:2 |
20:28:53 | dom96 | lol |
20:29:26 | goobles | was it the kloser |
20:29:33 | goobles | oh ic |
20:29:35 | Araq | Klose, yes |
20:29:38 | goobles | yep |
20:33:24 | * | vendethiel joined #nimrod |
20:39:38 | Araq | argh |
20:39:42 | Araq | why`???? |
20:42:09 | Araq | argh ???? again??? |
20:44:27 | goobles | US is going to top the group;0 |
20:46:26 | dom96 | every time the german coach or whatever is shown he's picking his nose lol |
20:46:42 | Araq | dude |
20:46:48 | Araq | he's giving instructions this way |
20:47:10 | Araq | picking his nose means "we need another goal" |
20:47:15 | dom96 | lol |
20:47:42 | dom96 | I don't think they need to be told that |
20:48:14 | * | Jehan_ joined #nimrod |
20:49:01 | dom96 | Lol, that goal keeper fail |
20:49:31 | Varriount | dom96: I'm currently finishing up the filemonitoring module. |
20:49:40 | Varriount | It should be done by the end of the weekend. |
20:49:55 | dom96 | Varriount: This shouldn't take you long. I need a file locking proc. |
20:50:04 | dom96 | Which is cross-platform |
20:50:20 | dom96 | and preferably today :P |
20:50:34 | Varriount | Eh... |
20:50:39 | Jehan_ | dom96: Have a look at lfs? |
20:50:47 | Varriount | You only wanted me to do the windows side of things. |
20:51:48 | dom96 | Varriount: Meh. Fine I can implement it myself. |
20:51:56 | dom96 | Thought you may find this fun. |
20:52:09 | dom96 | But if you don't want to that's fine |
20:53:28 | Araq | gah |
20:53:33 | Araq | 2:2 final result |
20:53:39 | goobles | that dudes bleeding all over |
20:53:55 | joelmo | the coach didnt pick his nose enough |
20:56:17 | Araq | joelmo: you're right. see dom96 ? he didn't pick enough |
20:58:37 | Jehan_ | ??? |
20:58:50 | dom96 | lol Jehan_ |
20:59:03 | dom96 | We're talking about the World Cup. |
20:59:32 | Jehan_ | dom96: I figured as much. Still doesn't make a whole lot of sense. :) |
21:00:06 | dom96 | Well I noticed that the German coach seems to be picking his nose everytime the camera is on him. |
21:01:41 | Jehan_ | Aha. |
21:01:43 | * | exirctest quit (Remote host closed the connection) |
21:07:38 | * | Jesin joined #nimrod |
21:10:57 | * | perturbation joined #nimrod |
21:21:39 | Varriount | dom96: Should I emulate change notifications for the directory itself on Windows? |
21:22:38 | dom96 | Varriount: Not sure. Do whatever you think is best. |
21:33:58 | * | hoverbear joined #nimrod |
21:36:13 | * | flaviu joined #nimrod |
21:36:21 | Araq | Jehan_: do you feel like implementing the new 'deepCopy' builtin? extra points if it doesn't use a hash table for acyclic data structures |
21:36:46 | * | hoverbear quit (Client Quit) |
21:37:01 | Araq | fixing lambda lifting takes much longer than I thought and so I'm behind my schedule ... |
21:38:09 | Jehan_ | Araq: Umm … I'm honestly too swamped with my day job and the work on Talis right now for any major undertakings. |
21:38:32 | Araq | pff major undertakings ... it's a finger exercise |
21:38:35 | Jehan_ | As an aside, acyclic structures may still need lookups. Tree structures don't. |
21:38:59 | Araq | oh hmm good point |
21:38:59 | Jehan_ | Araq: If I were more familiar with the compiler internals, probably. :) |
21:39:17 | Varriount | Jehan_: Talis? |
21:40:01 | Jehan_ | Varriount: Programming language I've been working on for the past few years. |
21:40:29 | Jehan_ | Thought I'd mentioned it before? |
21:41:00 | Araq | nope |
21:41:22 | Jehan_ | Maybe not by name, but some concepts I'm pretty sure I've discussed. |
21:41:50 | Jehan_ | Different goals than Nimrod (and much, much less maturity), so don't be worried about competition. :) |
21:43:31 | Araq | ha, I'm never worried about competition |
21:43:51 | Jehan_ | Heh. So far, it's mostly been a research testbed for concurrency ideas for me. |
21:44:33 | Araq | everybody should know by now that PL succeed when they're native for some platform |
21:44:43 | Araq | there are exceptions to this rule |
21:44:45 | Jehan_ | I *have* contemplated rewriting the compiler in Nimrod so that I can dump C++, though. :) |
21:46:13 | Araq | that's a good idea but then why did you start in C++? why not Ocaml? |
21:46:18 | Jehan_ | Araq: That's what I mean by different goals (in part). I have not been writing a C++/Java/whatever competitor, I've been writing something that's primarily for research. Widespread adoption is not a major concern. |
21:47:01 | Jehan_ | Araq: Number of reasons, portability being one of them, especially since it's generating C++ already. |
21:47:31 | Jehan_ | Mind you, C++ means a greatly simplified subset with operator new/delete overloaded globally to use the Boehm GC. |
21:47:47 | Araq | ah ok |
21:47:54 | Araq | so C++ with a GC |
21:48:21 | Araq | but still you're left with the most retarted way to do pattern matching |
21:48:26 | Jehan_ | And minus a lot of annoying garbage. |
21:48:47 | Jehan_ | Not a feature I really need. |
21:49:07 | Jehan_ | That I can't do "case 'a'..'z'" for the lexer is a bigger annoyance, to be honest. :) |
21:49:22 | Araq | Gnu supports that |
21:49:54 | Araq | and since gnu supports it, so do LLVM and Intel |
21:49:54 | Jehan_ | Clang also, but not portable. |
21:50:20 | Araq | portable enough. Nimrod happily generates it :-) |
21:50:28 | Jehan_ | I resolved it by having an array that maps characters to character classes. Sort of how Flex does, minus the automation. |
21:50:50 | Jehan_ | Huh, seriously? Does Microsoft's C compiler handle it? |
21:50:58 | goobles | no |
21:51:06 | Araq | no. we don't generate it for Visual C++ |
21:51:14 | Jehan_ | Gotcha. |
21:51:17 | goobles | msvc hates me |
21:51:38 | goobles | and i hate it back |
21:51:42 | flaviu | Araq: I've noticed that bitsets can get pretty big |
21:52:09 | Jehan_ | But yeah, I write a C++ that is more like Eiffel with braces. |
21:52:10 | Araq | flaviu: we have a check for that, can't get bigger than 16K iirc |
21:52:10 | goobles | then u got alot of bits |
21:52:42 | Araq | Jehan_: I smell the visitor pattern ... |
21:52:45 | Jehan_ | To the point of not having explicit header files but generating .h and .cc files via a script from the same source. |
21:53:36 | Jehan_ | flaviu: Capped at 2^16 bits last I tested. |
21:54:11 | Jehan_ | Araq: And why not? :) |
21:54:25 | flaviu | Still quite big. I'm sure that a variant of run length encoding would make it much more reasonable |
21:54:46 | Jehan_ | flaviu: Yeah, but then you'd lose constant lookup time. |
21:54:52 | goobles | why do you have so many bits |
21:55:04 | Jehan_ | Better to write a special type for that. |
21:55:48 | flaviu | With caches and everything, I'm sure that a linear lookup time would be faster than constant |
21:56:10 | flaviu | Especially when n is something like < 5 |
21:56:10 | Araq | rumors exist we have a TSet in the stdlib too |
21:56:36 | Araq | the basic types use a single algorithm, flaviu |
21:57:16 | Jehan_ | flaviu: Well, as soon as you introduce branches, I wouldn't bet on that. |
21:57:33 | joelmo | Jehan_: do you have Tails published? I want to look at it |
21:57:44 | Araq | we don't use fancy trees for strings either |
21:57:53 | flaviu | Hash sets are even worse for large sets. |
21:58:09 | Jehan_ | joelmo: Not yet. That's part of why I'm going to be busy the next few weeks (worst case, months). |
21:58:32 | Araq | there can be better for n < 5 though, flaviu |
21:58:38 | flaviu | Jehan_: With n likely being small, there would be exactly 1 branch |
21:59:09 | Araq | but yes. keep changing your requirements and neither TSet nor set is good enough for you |
21:59:19 | flaviu | Araq: Sorry, I didn't explain in detail what I mean |
21:59:56 | Araq | sqlite is also not good enough when n > 5 billion |
22:00:17 | Araq | maybe we should tell them |
22:01:51 | Araq | I had a Judy array/table implemented in Nimrod but lost the code |
22:02:12 | Araq | the code was very simple thanks to nimrod's iterators |
22:02:38 | goobles | where is my std::vector |
22:02:47 | flaviu | goobles: seq |
22:02:48 | Araq | the Judy implemenation is only hard because C sux |
22:04:00 | flaviu | {1..20,40..1000} would translate to [0, 1, 20, 19, 960] (implementation could be adjusted for signed integers). First, it reads that 0 elements are part of the set. The next 1 element is not part of the set, but the next 20 are. Next 19 are not, next 960 are. |
22:05:42 | flaviu | While I haven't fleshed out implementations of other operations, I feel there are probably some really elegant and fast ways of implementing them |
22:06:31 | Araq | not really |
22:06:54 | Araq | O(lg N) for 'in' when you keep it sorted |
22:07:52 | flaviu | Sure, but I can keep a thousand of these things around in L1 |
22:07:59 | * | superfunc joined #nimrod |
22:08:01 | * | perturbation quit (Quit: Leaving) |
22:08:11 | flaviu | Plus the overhead of binary search is high |
22:08:48 | goobles | if a == 0 || a >1 && a < 20 etc yahhhhhhh |
22:09:20 | flaviu | goobles: Thats an optimization in some cases, but how do I do `or` on that? |
22:09:51 | goobles | what do u mean or? |
22:10:02 | Araq | union I guess |
22:10:08 | * | hoverbear joined #nimrod |
22:10:32 | * | hoverbear quit (Client Quit) |
22:11:40 | goobles | so you have two sets and want the union, or cases that are true for both? |
22:12:15 | Araq | flaviu: if you keep the set as a function you can JIT things and transform data into code |
22:12:28 | Araq | not sure if that's what goobles meant though |
22:12:55 | flaviu | goobles: I mean the union of sets |
22:13:31 | flaviu | Without doing anything clever like modifyin code at runtime |
22:13:52 | * | hoverbear joined #nimrod |
22:14:04 | flaviu | I guess function pointers would work, but that adds overhead |
22:14:10 | * | hoverbear quit (Max SendQ exceeded) |
22:14:27 | goobles | i'm not really sure what u are trying to do, or what this is even for.. but you could just write a for loop that performs the logic you mentioned with no need for a giant bitset |
22:15:00 | * | hoverbear joined #nimrod |
22:15:19 | Araq | flaviu: sets in nimrod are used for: |
22:15:28 | Araq | * set[char] |
22:15:38 | Araq | * set[someEnum] |
22:16:02 | Araq | for both the existing approach via a lookup table is the most efficient way to do it |
22:16:23 | Araq | {0, 1, 4000..8000} is not a realistic example |
22:16:47 | Araq | though you have point for set[UnicodeChar] |
22:16:58 | Araq | (which we don't support) |
22:18:16 | Araq | and your linear search is a good optimization for TIntSet which is used everywhere in the compiler |
22:18:40 | Araq | I never found the time to implement this optimization |
22:18:44 | flaviu | Araq: I'm not trying to convince you, really just brainstorming. You're right that the current implementation is best for 95% of usecases |
22:19:02 | Araq | however, for these the run length encoding doesn't buy you anything |
22:19:21 | Araq | as the integers these store are more random and ranges only exist by chance |
22:22:08 | goobles | i tried const fact = fact(some number) to see how compile time evaluation works, it seems pretty slow? Also it explodes if I make the number very large |
22:22:19 | goobles | though that might just be overflow;0 |
22:22:26 | goobles | idk |
22:22:38 | * | hoverbear quit (Ping timeout: 264 seconds) |
22:22:49 | Araq | should be pretty fast, in fact |
22:23:06 | Araq | do you use 0.9.4? |
22:23:43 | Araq | also overflow should produce an overflow exception |
22:23:49 | Araq | and not an explosion |
22:24:24 | goobles | oh ur right it says overflow or underflow |
22:24:31 | goobles | a nice explosion |
22:27:00 | flaviu | goobles: I'm no where near as familiar with the VM as araq, but it should be pretty fast. Are you using recursion? I'm not really sure how it behaves |
22:27:48 | flaviu | He'll probably jump in about now and tell me that recursion is very optimized, I'm really not that familiar with the VM |
22:28:08 | goobles | actually it is fast now;0 I was confused why I couldn't divide an integer by 50 |
22:28:30 | Araq | recursion is not super fast, but function calls are as efficient as they can get |
22:29:03 | goobles | it compiles my tiny program in 0.268 seconds not bad |
22:29:59 | flaviu | goobles: Since you seem new, I have http://nimrod-by-example.github.io partially completed, read it if you want, and I'd appreciate any feedback possible (especially omissions that have bit you) |
22:30:51 | Araq | oh also our VM is "stack less" lol |
22:31:07 | Araq | no idea how this can even be considered a feature tbh |
22:31:25 | goobles | i'll check it out flav |
22:31:42 | goobles | can i make a proc without having to specify the types it wants(like generic)? |
22:31:54 | goobles | like use var as the arguement |
22:32:04 | Araq | using the C/hw stack for the interpreter's own call stack like Python does it is ridiculous |
22:32:11 | flaviu | goobles: Sure, `proc foo[T](a: T): T` |
22:32:17 | Araq | goobles: yes, it's an implicit generic then |
22:32:25 | Araq | pro foo(a) = ... |
22:32:30 | Araq | *proc |
22:32:56 | Araq | we got this feature from Clay |
22:33:04 | Araq | I'm still not sure I like it |
22:34:07 | goobles | keeps saying invalid indentation but it looks the same as before |
22:36:34 | Jehan_ | Araq: Huh, interesting, I hadn't realized that actually worked. |
22:37:41 | Jehan_ | I'm still in favor of declaring the type. |
22:37:50 | goobles | araq when I use the generic proc you showed it says "undeclared indentifier: result" |
22:37:57 | Jehan_ | Subjective, of course, but it makes things look more consistent. |
22:38:10 | flaviu | goobles: Did you forget a return type? |
22:38:25 | Araq | goobles: well you can't leave out the return type |
22:38:39 | Araq | with a bit of luck 'auto' works as return type though |
22:39:52 | Araq | Jehan_: leaving out the param types would be sweet for the compiler itself but I don't want it to be generic then, I want ML style type inference for these parameters |
22:40:11 | superfunc | goobles: welcome |
22:40:15 | Jehan_ | Araq: I see. |
22:40:35 | goobles | Araq: you mean like : proc fact(x) = 'auto'? |
22:40:37 | Jehan_ | I'm not a big fan of type inference for function arguments and return values myself. |
22:40:40 | goobles | or proc fact(x) = auto |
22:40:50 | flaviu | goobles: proc fact(x): auto |
22:41:04 | flaviu | proc fact(x): auto = ??? |
22:41:05 | Jehan_ | Part of the value of types is that they are documentation. |
22:41:16 | goobles | ok thanks |
22:41:55 | dom96 | What do you guys prefer? remove, uninstall or delete for the command used to remove packages? |
22:42:03 | Jehan_ | Which is why I always specify the return type of a Scala function, even though the compiler let's me omit it. |
22:42:23 | goobles | even C++ lets you avoid specifying types nowadays |
22:42:28 | superfunc | I've always been a fan of purge from debian |
22:42:36 | goobles | for some stuff at least |
22:42:43 | superfunc | goobles: C++ does it because its types are f'ing hideous |
22:43:03 | Jehan_ | goobles: That's something different, that's not for an externally visible API. |
22:43:06 | goobles | ya thats why you don't wana look at them;0 |
22:43:17 | Araq | Jehan_: I think we need to overcome this whole idea. readability is at odds with readability |
22:43:34 | Jehan_ | Araq: Umm? |
22:43:46 | goobles | too much readability? |
22:43:52 | Araq | you need at least 2 *views* for source code |
22:43:52 | dom96 | superfunc: That's something I didn't consider, but I don't really like it. |
22:44:02 | Jehan_ | Readability is at odds with readability? I think you meant a different noun in one case. |
22:44:12 | Araq | no |
22:44:26 | Araq | there is the algorithmic aspect |
22:44:37 | Araq | which is my major interest so I want to read |
22:44:39 | Jehan_ | Araq: So you want a tool to generate the interface from the source? |
22:44:45 | Araq | a[i] += 1 |
22:45:03 | Araq | but *many* want the other view |
22:45:40 | Araq | collections.tables.put(a, i, collections.tables.get(a, i) + 1) |
22:45:44 | dom96 | I'll go for uninstall because it goes well with 'install' |
22:46:16 | Araq | this is the essence of "overloading is bad" etc. which you can find everywhere |
22:46:33 | flaviu | Araq: I'd say that there is a balance in terms of readability and verbosity. |
22:47:02 | Araq | flaviu: yes, but I think people really want these 2 views |
22:47:15 | superfunc | dom96: that seems reasonable |
22:47:26 | Araq | the 2nd view is also called the "confused" view by me |
22:47:28 | Jehan_ | Araq: Hmm, that's not a version of "overloading is bad" that I'm familiar with. |
22:47:49 | Araq | for the people who are constantly confused when programming :P |
22:48:22 | Araq | Jehan_: it looks like writability vs readability but really isn't |
22:49:13 | Araq | I don't want to *read* collections.tables.put |
22:49:19 | goobles | that giant ass thing with collections.tables is not code i want to see;0 |
22:49:30 | flaviu | Araq: But on the other hand, I'm not sure even you want to see code as concise as some regexes |
22:49:46 | Araq | flaviu: been there done that |
22:49:57 | goobles | IDE helps alot, you just hover over any concise stuff to get more description |
22:50:02 | Araq | added some whitespace and after a while it was fine |
22:50:20 | flaviu | goobles: Not everyone has a fancy IDE. Also, fancy IDEs are lots of work |
22:50:52 | Jehan_ | One could also argue that IDEs cover up shortcomings in language design. |
22:51:01 | flaviu | Araq: My experiences are similar in regards with whitespace, but I still wouldn't say that its especially readable. |
22:51:06 | Jehan_ | … can cover up ... |
22:51:10 | goobles | they boost a shitty language into a not so shitty one |
22:51:23 | goobles | but also make a good language into a great one |
22:51:41 | Jehan_ | Hmm. I find that I'm generally more productive without an IDE. |
22:52:04 | Jehan_ | The biggest problem I have with IDEs is that they force me to use their internal editor. |
22:52:36 | Araq | IDEs can be superb but most are crap |
22:52:41 | flaviu | Jehan_: Then you've never used a truly great IDE. Try IntelliJ IDEA |
22:53:05 | Araq | flaviu: lol |
22:53:11 | goobles | most are just terrible text editors |
22:53:20 | Araq | good luck on selling us a Java IDE |
22:53:34 | Jehan_ | flaviu: Well, the thing is that if an IDE lets me use Vim or Emacs or Textmate or ST or whatever, then I can't access half the productivity features of the IDE. |
22:54:03 | goobles | you can a file in both the IDE and VIM |
22:54:03 | Jehan_ | And if you're trying to say that the IDEA editor is good: Umm, no. Just no. It's okayish, but not good. |
22:54:31 | flaviu | The editor is Ok, the vim plugin is Ok, but the tooling it brings is amazing |
22:54:34 | Araq | well an IDE agnostic approach that nimrod idetools tries to provide is surely the way to do it |
22:54:49 | Jehan_ | Araq: I'd agree with that, at least in principle. |
22:54:56 | flaviu | Araq: Yes. And with more emphasis on source-to-source transformations |
22:55:11 | Jehan_ | The caveat because I'm honestly not sure what the best option is. |
22:55:11 | goobles | idetools looks cool i hope it gets lots of polish and makes for easy IDE's |
22:55:56 | Araq | goobles: be our guest and start working on it ;-) |
22:56:14 | Araq | we're underpowered. Sad but true. |
22:56:18 | goobles | i might at some point once i figure out the basics of nimrod |
22:56:28 | flaviu | Unrelated, but I'd like to get feedback on an idea (not a feature request): Structural type inference. If you use methods x(), y(), and z(), then anything that is passed in must have those methods available. It'd allow dynamic looking programs, with static type checking. |
22:56:39 | Jehan_ | Araq: You need to find a nice spider to bite you. :) |
22:57:42 | Jehan_ | flaviu: Structural typing exists? |
22:58:05 | Jehan_ | Technically even in Nimrod for type parameters. |
22:58:15 | flaviu | Jehan_: Yes, haxe as one example. It has "structs" |
22:58:27 | flaviu | Scala does too |
22:58:28 | Jehan_ | OCaml, Scala, Go ... |
22:58:47 | Jehan_ | (Talis, too, but that's still at the vaporware stage.) |
22:59:03 | goobles | can i suggest that forgetting to put an = sign in this code "proc fact(x): auto =" give a better error msg than "invalid indentation" :) |
22:59:56 | Araq | goobles: you can but nobody cares. it's a newbie mistake |
23:00:03 | goobles | :( |
23:00:05 | Jehan_ | Hmm, the error message usually means that you forgot a token at the end of the previous line. |
23:00:21 | Araq | goobles: don't give me that look |
23:00:23 | Jehan_ | Maybe the error message should be adapted to include a hint? |
23:00:36 | goobles | no it really was because of the lack of = |
23:00:47 | Araq | better error messages simply are not a priority right now |
23:00:53 | flaviu | goobles: Its hard to give good error messages |
23:01:28 | Araq | and usually the error message are really good already. ymmv ofc |
23:01:51 | flaviu | Wow, Java is getting specialized generics! |
23:01:59 | flaviu | And structs! |
23:01:59 | goobles | wow? |
23:02:09 | goobles | zz |
23:02:24 | * | darkf joined #nimrod |
23:02:39 | Araq | and they'll suck like C#'s structs suck, i bet |
23:03:08 | flaviu | How do C# structs suck? Besides that unsafe features can break value-typeness |
23:03:09 | goobles | and D's |
23:03:32 | * | hoverbear joined #nimrod |
23:03:38 | goobles | compare C# struct to C++ struct;0 |
23:03:48 | Araq | flaviu: try to put one in a collection and then do ++ on one of its fields |
23:04:11 | joelmo | dom96: apt-get uses 'remove', brew also, and have an alias for uninstall, does not hurt to have both uninstall and remove? i prefer remove |
23:04:18 | Araq | the lack of &T becomes apparent |
23:04:28 | dom96 | joelmo: Sure, I can add aliases. |
23:04:30 | Jehan_ | C++ structs are only classes where members are public by default? |
23:04:40 | Araq | dom96: I vote for 'rm' |
23:04:47 | Araq | Jehan_: correct |
23:04:49 | joelmo | rm is even nicer |
23:04:52 | flaviu | Oh, I see. Well, that's a weird decision. |
23:05:05 | superfunc | dom96: Would it remove any packages that depend on it? |
23:05:13 | flaviu | dom96: I vote for doing things like git: allow aliases |
23:05:25 | Araq | I wasn't serious about 'rm' ... |
23:05:33 | dom96 | superfunc: no |
23:05:34 | Araq | rm doesn't even have a vowel |
23:05:58 | superfunc | dom96: Ok, then uninstall is good. |
23:05:58 | dom96 | superfunc: If there are packages which depend on the package you are removing it will refuse to remove that package |
23:06:17 | Araq | dom96: why not allow all of these? |
23:06:23 | superfunc | dom96: That's the only reason I mentioned purge. Could be an interesting option to have. |
23:06:34 | Araq | I like it that I can currently guess the proper command with babel |
23:06:56 | flaviu | dom96: Clone pacman's commandline |
23:06:58 | dom96 | Yes, well. Removing a package is a destructive operation. |
23:07:10 | dom96 | I don't feel comfortable having too many aliases for it |
23:07:15 | flaviu | Actually, just fork pacman completely, its awesome |
23:07:19 | Araq | only computer scientists think this way |
23:07:35 | dom96 | flaviu: screw pacman |
23:07:43 | dom96 | flaviu: It's not written in Nimrod and therefore sucks |
23:07:49 | Araq | "hell ya, I'll have both remove and delete and they should do different things" |
23:07:59 | joelmo | dont make me have to do: man babel |
23:08:49 | flaviu | dom96: Or, just say "did you mean `remove`" when it matches any of a set of possible operations |
23:08:55 | Araq | uninstall|deinstall|remove|delete|del|rm should all work |
23:09:13 | Araq | flaviu: see? exactly what I mean |
23:09:14 | goobles | flaviu: i'm looking at the example page you linked me |
23:09:24 | joelmo | is deinstall english? |
23:09:29 | Araq | trying to "educate" the user with irrelevant crap |
23:09:38 | dom96 | flaviu: That's just annoying. |
23:09:38 | flaviu | joelmo: no, uninstall is |
23:09:51 | goobles | flaviu: maybe mention the generic procs on when you talk about Procedures? |
23:10:16 | goobles | flaviu:the array/seq stuff is blank page |
23:10:34 | Jehan_ | dom96: Hmm, when I download babel from github it doesn't compile because babelpkg/config is missing? |
23:10:49 | goobles | flaviu: in the procedure it uses result but doesn't explain it |
23:10:52 | dom96 | Jehan_: oh oops. I guess I forgot to commit it. |
23:11:52 | NimBot | nimrod-code/babel master 3f4d8f4 Dominik Picheta [+1 ±0 -0]: Add missing config.nim. |
23:12:01 | dom96 | Jehan_: There you go. |
23:12:10 | flaviu | goobles: several pages aren't completed, but keep the feedback coming. I'll add a link to the result page, thanks |
23:12:48 | Araq | remove # simply removes it from Babel's package list |
23:12:52 | Jehan_ | dom96: Merci! |
23:13:01 | Araq | delete # deletes it from HD completely |
23:13:12 | dom96 | rm # formats your hard drive |
23:13:22 | Araq | purge # deletes it completely plus all of its dependencies |
23:13:51 | Araq | del # like 'delete' but also sends you an email about what has been deleted |
23:14:17 | Araq | rm # like remove but also opens the list of removed files in your $EDITOR |
23:14:28 | Araq | <-- Git styled command line |
23:14:29 | dom96 | I like my rm better |
23:14:37 | Jehan_ | pdel # Like "del" (the p is silent) |
23:14:59 | flaviu | I can't tell if anyones serious |
23:15:13 | Araq | it's a good idea if you wanna sell "support" |
23:15:25 | dom96 | 刪除 # same as 'delete' but in chinese |
23:15:36 | Araq | god I can't take these open source zealots seriously |
23:15:47 | Jehan_ | flaviu: Google: "Leave it to Psmith" |
23:17:01 | flaviu | I don't see why people are confused by git, its very simple and elegant. The parameter word choice is sometimes odd, but google is always very helpful. |
23:17:05 | goobles | flaviu: I'm not entirely sure what a "block" statement is for, is it just like a labeled statement ? |
23:18:03 | flaviu | goobles: Yes, I'll see if I can make that more clear, thanks. |
23:18:59 | dom96 | Better yet, i'll use the Google translate API from Babel to allow multi-language commands. |
23:19:23 | Jehan_ | goobles: block is { … } or begin … end in Pythonesque syntax. |
23:19:37 | Jehan_ | In other words, a block with its own scope. |
23:19:50 | Araq | flaviu: http://stevelosh.com/blog/2013/04/git-koans/ |
23:20:19 | goobles | oh ok just a scope gotcha |
23:21:46 | goobles | flaviu: in the result page you have this proc: proc `**`(number, power: int): Is this a function named **? Why does it have string quotes around it? What does that do |
23:22:57 | joelmo | those quotes means infix, hakell have them too, means number is lhs, power rhs of expression: number ** power |
23:22:58 | flaviu | goobles: The `**` signifies that it is an operator. I should explain that somehow, but I've been having issues coming up with a good order to do things in. |
23:22:58 | Jehan_ | goobles: The `..` backquotes allow you to treat arbitrary character sequences (well, almost arbitrary) like a regular identifier. It defines an infix operator called **. |
23:23:30 | Jehan_ | joelmo: No, the backquotes don't mean infix. |
23:24:11 | flaviu | joelmo: I can do `@[1, 2, 3]`, the `@` operator isn't infix |
23:24:15 | * | hoverbear quit () |
23:24:34 | Araq | flaviu: git lives through the famousness of its creator and its speed. but its interface is just horrible. |
23:25:03 | Jehan_ | >>> 1.`+`(2) |
23:25:04 | Jehan_ | 3 |
23:25:08 | Araq | and I'm not sure its speed is really its selling point either ... |
23:26:06 | superfunc | what is the preffered way to write a while true { ... } block in nimrod |
23:26:09 | Jehan_ | Araq: Also because there aren't universally superior alternatives (some alternatives are situationally superior, but not universally). |
23:26:24 | Jehan_ | superfunc: while true: ... |
23:26:41 | dom96 | Araq: Its selling point right now is Github |
23:26:45 | superfunc | Thanks Jehan, just making sure there wasn't a keyword I was missing |
23:27:12 | dom96 | or at least one of the major ones |
23:27:14 | superfunc | Araq: I agree, i'd be using hg otherwise |
23:27:15 | flaviu | Araq: Some of the criticisms on that page are unfair. a branch is created with `git branch`, a file is reset to the head version with `git reset`, branches are switched with `git checkout` |
23:27:25 | Jehan_ | superfunc: I wouldn't mind if there were a separate keyword/template for a while true loop myself. |
23:27:32 | Araq | I dunno, Jehan_, handling binary files is certainly not a niche problem |
23:27:46 | superfunc | I like the rust keyword "loop" for that |
23:27:50 | Jehan_ | Araq: That's what I mean by situationally superior. |
23:27:53 | Araq | git hardly is a "universal" tool |
23:28:27 | Jehan_ | Araq: What I'm talking about is that git passes the "good enough" test and there's no tool that beats it on all criteria. |
23:28:27 | Araq | superfunc: I agree but wanted to save a keyword here |
23:28:50 | goobles | flaviu: it would be nice if it had something on templates, macros etc |
23:28:55 | Araq | I don't know the others well enough to be able to say for sure |
23:29:02 | superfunc | Araq: Could a macro achieve it? |
23:29:08 | flaviu | Araq: Item 3 doesn't really make sense, that's the way things are, and that information isn't particularly useful. |
23:29:13 | Araq | superfunc: a template even |
23:29:16 | goobles | flaviu: mabye show how to do similiar things in C++ vs nimrod |
23:29:22 | Jehan_ | Araq: My own preference is Mercurial for most use cases, but I do sometimes want to have something that Git has and Mercurial doesn't. |
23:29:25 | goobles | flaviu: that you might use templates for in C++ |
23:31:15 | flaviu | goobles: The fact that templates are missing is an issue of non-completion, they are planned. Comparing with C/C++ is a good idea, it can explain things more concisly and with less ambiguity than words. I'll do that in some places, thanks for the suggestion |
23:31:41 | superfunc | Araq: When you say you wanted to save a keyword, do you mean to make parsing/compiling less slow/complicated, or to reserve it if its needed in the future? |
23:32:26 | Araq | superfunc: I simply didn't want to reserve 'loop' for a shortcut of 'while true' |
23:33:07 | Araq | parsing it is trivial and doesn't slow down anything |
23:34:09 | Araq | nowadays I'd likely do it differently though |
23:34:38 | Araq | and have a "loop while" control flow statement |
23:35:03 | Araq | loop: |
23:35:07 | Araq | foo() |
23:35:13 | Araq | while cond: |
23:35:15 | Araq | bar() |
23:36:36 | Araq | or something like that |
23:37:01 | joelmo | but you always can put the condition at end with if and break |
23:37:11 | * | vendethiel quit (Read error: Connection reset by peer) |
23:37:20 | flaviu | Araq: Item 4 is inaccurate, `git tag`, `git remote`, `git branch`, `git status`, 100% consistent. The last two commands are sort of correct, but `git branch -d` has subtly different semantics from `git remote rm` due to how it works. |
23:37:20 | flaviu | The last point is total crap, it says that what is actually a great feature IMO is weird inconstancy |
23:37:48 | superfunc | Araq: Interesting. Thanks for the explanation |
23:37:57 | Araq | flaviu: "git checkout" already is weird in itself |
23:38:32 | Araq | and it goes downhill from there |
23:38:36 | flaviu | Araq: It makes perfect sense. It checks out the commit you give it. Branches are just a "pointer" to a commit |
23:38:37 | goobles | hg push |
23:38:58 | f0wl | rm -rf |
23:39:37 | flaviu | I'm not sure where the weird part is |
23:39:56 | Araq | flaviu: what if I give a filename? what if I give it nothing? |
23:40:00 | * | vendethiel joined #nimrod |
23:43:06 | goobles | can you call C code in a compile time evaluation(const)? |
23:43:21 | flaviu | That's a bit weird, duplicated functionally between `git reset` and `git checkout` is bad. Just don't use git checkout on file names |
23:44:07 | flaviu | goobles: No, IIRC it was possible at some point, but I think araq decided it wasn't really worth the time investment |
23:46:12 | flaviu | Its in the IRC logs, but I can't be assed to track it down |
23:47:21 | Araq | goobles: you can hack around this limitation via 'gorge' though |
23:47:38 | Araq | people tend to forget about gorge |
23:47:46 | Araq | even though it's a big enabler |
23:47:46 | Jehan_ | goobles: the fundamental problem is that at compile time code is evaluated in an interpreted VM, so you have to generate an external program and run that. |
23:48:36 | Jehan_ | Araq: That's probably because we'd all prefer the name would disappear in favor of staticExec. :) |
23:48:58 | Araq | over my dead body :P |
23:49:18 | Araq | slurp and gorge give nimrod its soul |
23:49:43 | Jehan_ | Out of curiosity, where did the names come from? |
23:49:54 | Araq | slurp comes from perl |
23:50:01 | Araq | gorge is my own addition |
23:50:23 | goobles | whats a gorge? |
23:51:13 | Araq | I can't see how slurp and gorge are worse than, say, "fork" |
23:51:16 | flaviu | Runs a command and gorges itself on that command's output |
23:51:31 | goobles | oh ic |
23:55:14 | Jehan_ | Araq: Hmm, is it intended that gorge/staticExec eats all newlines? |
23:56:03 | Araq | it should 'strip', Jehan_ |
23:56:53 | Araq | oh yay |
23:56:59 | Araq | it's buggy ... |
23:57:20 | Araq | guess that means people only use it for programs that produce 1 line of output |
23:57:41 | Jehan_ | Araq: Yeah, that was my suspicion as well. |
23:57:56 | Araq | who wants to fix it? |
23:58:04 | Araq | 1 line of code |
23:59:44 | Jehan_ | Hmm, what's the semantics that you want? |