<< 02-06-2014 >>

00:45:47fowli put my project on the internets https://bitbucket.org/fowlmouth/alphazone/src/
00:48:39*freezerburnv quit (Quit: freezerburnv)
00:54:50flaviu1fowl: I'm not sure what language that's in
01:00:24fowlits american english
01:01:59flaviu1I dunno, I think you went a bit overboard with the DSL
01:02:38EXetoC^_^
01:06:08*q66 quit (Quit: Leaving)
01:07:19VarriountWow, I really like what BitBucket has done with their interface.
01:07:44fowlflaviu1, which
01:09:25flaviu1fowl: Well, I have no idea what `?int`, `<<`, `>>` are
01:09:56fowloh
01:16:15*hoverbear joined #nimrod
01:16:21*hoverbear quit (Max SendQ exceeded)
01:16:51*hoverbear joined #nimrod
01:16:55*hoverbear quit (Max SendQ exceeded)
01:17:15fowlflaviu1, were you trying to skim it for magic spells or something
01:17:29*hoverbear joined #nimrod
01:19:06flaviu1fowl: I was skimming it to see what's happening. I can't tell whats happening. It might be easier to read if you used longer words and not symbols
01:19:19Varriountfowl: I think you are easily the most prolific programmer in our community.
01:19:56*Jesin joined #nimrod
01:20:20fowlflaviu1, i dunno, ive written a lot of <<s and >>s to change them to words
01:20:59flaviu1for f in ./**.nim; sed -i 's/>>/whatever they mean/g'; done
01:21:04flaviu1in fish
01:21:53fowlthen i have to write those words from then on
01:23:21fowl<< and >> show dataflow and are recognizable from the great c++
01:23:46flaviu1I say its worth it, the best way to write hard to read code is to overuse operators.
01:28:24VarriountPlus, by overusing operator overloading you give credence to all those anti-overloading weenies.
01:30:27fowlill sleep on it
01:30:42fowli think everybody needs to stfu and golf it up
01:30:56fowlbtw ?int is tmaybe[int]
01:31:23fowllike c#s brilliant int? #=> Option<int>
01:34:22flaviu1Sorry, not convinced. Words are better than Symbols. If anything, they're easier for humans to parse
01:37:57*brson joined #nimrod
01:41:43Varriountflaviu1: Well, symbols are good, to a certain extent. It's just that their meaning is often multifaceted and ambiguous, and there are not enough readily available.
01:42:10Varriount(Unicode doesn't count, as keyboards don't have unicode symbols readily available)
01:43:07flaviu1I go even further and say that symbols are bad unless they have a very well defined meaning in their problem domain, where their problem domain isn't programming.
01:43:41Varriountflaviu1: You must not be a big fan of Perl then.
01:46:53flaviu1I guess not, for few reasons: $variables are crap, -> is redundant, and semicolons/braces
01:47:46flaviu1I don't see problems with symbols, except for ~= regex, which is fairly typical
01:52:54flaviu1Sometimes, I even think Java may be right in many ways
01:53:16Varriount*gasp*
01:53:36flaviu1Java has many problems, but over-shorted names is rarely one of them.
01:53:37Varriountflaviu1! What are you saying! It can't be!
01:55:26flaviu1What the programmer wants is different from what he thinks he wants, and even more different from what other programmers want.
01:55:27flaviu1When the programmer is forced into doing things one way, the programmer is slightly less happy, but everyone else is much happier with the results. A bit of a trade off
01:55:44flaviu1I'm sure there are ways to allow integer overloading without a trade-off
01:56:08flaviu1Python's system is interesting, but nowhere near perfect
01:57:07Varriountflaviu1: http://docs.spring.io/spring/docs/2.5.x/api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html
01:57:31flaviu1"Java has many problems, but over-shorted names is rarely one of them"
01:57:58VarriountI know, I just wanted to post that.
01:58:15fowlflaviu1, if i gave << a name it would have to be "st", how is that any better
01:58:24flaviu1what does << mean?
01:58:31fowlstore/write
01:58:44Varriountfowl: Correction, make a *meaningful* name
01:58:56flaviu1ok, so what about `objectToStoreWithin.store(objectToStore)`?
01:59:17flaviu1or `outputStream.write(myObject)`?
02:00:07flaviu1I'm a bit meh on not using parenthesis, but I don't care too much about that
02:01:09flaviu1Araq isn't really the guy you want to be getting naming conventions from, I'd prefer `AbstractSingletonProxyFactoryBean` over `TAbsSingProxFacBn`
02:01:42fowli would go crazy if i had to type it that often
02:02:02flaviu1Varriount: BTW, java actually sort-of has metaclasses!
02:02:22Varriountflaviu1: Well, Araq doesn't really do TAbsSingProxFacBn that often.
02:02:30flaviu1They use some sort of reflection black magic, but it works. They call them proxies
02:02:49VarriountWe try to shame him out of doing such things, where we can.
02:03:13flaviu1fowl: So don't, do wr<Tab>
02:05:14flaviu1IMO, a bit more typing takes an insignificant amount more time, and saves others a lot of time. Its your code of course, do things however you want though
02:05:36Varriount"Code is read more often than it is written"
02:06:41flaviu1pretty much my thoughts
02:07:38flaviu1On unrelated topics, I've noticed some nice effects with the method order being significant!
02:08:45flaviu1You can easily and safely refactor a method that isn't exported and you only need to check the methods below it!
02:13:25flaviu1I wonder how plug-and-play modules might be accomplished in Nimrod. I'm not really satisfied with a tuple of function pointers or dynamic dispach.
02:14:08Varriountflaviu1: What about an object composed of procedure pointers?
02:14:31flaviu1Same thing as a tuple, but its called a different name.
02:14:53flaviu1I'm not a big fan of Nimrod's tuples, I think they do too much
02:16:10fowlgood night
02:16:16flaviu1night
02:17:10flaviu1sorry Araq, I know I complain too much about the language
02:17:41Varriountflaviu1: Don't worry, we all complain about the language. Even Araq does it from time to time.
02:17:59*brson quit (Quit: leaving)
02:18:33flaviu1Well, this isn't the first time I've mentioned tuples. And I still don't have a PR to fix it, so I'm not fully justified in complaining
02:39:25*springbok joined #nimrod
02:39:33*Joe_knock quit (Quit: Leaving)
02:39:36*springbok quit (Changing host)
02:39:36*springbok joined #nimrod
02:52:56*hoverbear quit ()
02:57:45*hoverbear joined #nimrod
03:10:21*BitPuffin quit (Ping timeout: 252 seconds)
03:14:14*def- joined #nimrod
03:17:29*def-_ quit (Ping timeout: 252 seconds)
03:55:42*xenagi quit (Quit: Leaving)
04:12:52*BitPuffin joined #nimrod
04:13:43*brson joined #nimrod
04:14:12*brson quit (Client Quit)
04:22:11*brson joined #nimrod
04:27:45*caioariede quit (Ping timeout: 240 seconds)
04:28:48*caioariede joined #nimrod
04:57:19*ehaliewicz joined #nimrod
05:04:15*caioariede quit (Ping timeout: 240 seconds)
05:39:14*shodan45 quit (Quit: Konversation terminated!)
05:50:43*flaviu1 quit (Ping timeout: 245 seconds)
06:06:41*Demos quit (Read error: Connection reset by peer)
06:19:55*bjz joined #nimrod
06:19:56*bjz_ quit (Read error: Connection reset by peer)
06:27:31*hoverbear quit ()
06:29:27*brson quit (Ping timeout: 252 seconds)
06:29:50*bjz_ joined #nimrod
06:30:43*bjz quit (Ping timeout: 276 seconds)
06:31:30*brson joined #nimrod
06:35:11*bjz_ quit (Ping timeout: 255 seconds)
06:41:55*brson quit (Ping timeout: 252 seconds)
06:43:53*brson joined #nimrod
06:48:56*bjz joined #nimrod
07:13:46NimBotAraq/Nimrod new_spawn b781737 Araq [+1 ±2 -0]: bugfix: codegen for promises
07:22:17*kunev joined #nimrod
07:35:43*OrionPK quit (Ping timeout: 252 seconds)
08:04:16*zahary quit (Quit: Leaving.)
08:09:49*phatypus joined #nimrod
08:10:15*phatypus left #nimrod (#nimrod)
08:12:34*kunev quit (Ping timeout: 240 seconds)
08:13:30*kunev joined #nimrod
08:32:42*io2 joined #nimrod
09:02:41*springbok quit (Ping timeout: 264 seconds)
09:20:58*ehaliewicz quit (Ping timeout: 240 seconds)
09:28:08*brson quit (Quit: leaving)
10:47:16EXetoCis it possible to selectively load OpenGL extensions?
10:56:02*lyro joined #nimrod
11:05:43*silven quit (Ping timeout: 245 seconds)
11:29:22*springbok joined #nimrod
11:29:46*springbok is now known as Guest6173
11:35:10*saml_ joined #nimrod
11:48:14*bjz_ joined #nimrod
11:49:02*kemet joined #nimrod
11:50:53*kemet quit (Client Quit)
11:51:46*bjz quit (Ping timeout: 240 seconds)
12:16:29*untitaker quit (Ping timeout: 264 seconds)
12:21:11*Guest6173 is now known as springbok
12:21:25*springbok quit (Changing host)
12:21:25*springbok joined #nimrod
12:21:46*untitaker joined #nimrod
12:51:25*saml_ quit (Ping timeout: 252 seconds)
12:52:09*eigenlicht quit (Ping timeout: 252 seconds)
13:42:17*BitPuffin quit (Ping timeout: 264 seconds)
13:50:57*darkf quit (Quit: Leaving)
13:52:01*OrionPK joined #nimrod
14:18:49*PortableEXetoC joined #nimrod
14:19:51*PortableEXetoC2 joined #nimrod
14:23:49*PortableEXetoC quit (Ping timeout: 252 seconds)
14:29:48*flaviu1 joined #nimrod
14:32:12*caioariede joined #nimrod
14:56:36*BitPuffin joined #nimrod
15:02:02*olahol quit (Quit: Lost terminal)
15:03:55*kunev quit (Quit: leaving)
15:29:53*caioariede quit (Ping timeout: 245 seconds)
15:39:36*caioariede joined #nimrod
15:42:19*Johz joined #nimrod
15:53:47*PortableEXetoC2 quit (Quit: cake)
15:54:59*nanda` joined #nimrod
16:04:40*nanda` quit (Ping timeout: 276 seconds)
16:11:46*bjz_ quit (Read error: Connection reset by peer)
16:11:53*bjz joined #nimrod
16:14:07*hoverbear joined #nimrod
16:16:22*Johz quit (Quit: Leaving)
16:17:13*bjz quit (Ping timeout: 252 seconds)
16:40:01*brson joined #nimrod
16:51:30*Demos joined #nimrod
17:03:35NimBotAraq/Nimrod new_spawn fbadbb3 Araq [+0 ±1 -0]: hopefully faster barrier implementation
17:03:35NimBotAraq/Nimrod new_spawn 7303c32 Araq [+0 ±1 -0]: fixed codegen for barriers
17:04:53dom96hi
17:04:57AraqEXetoC: it already only loads what you use
17:19:42*q66 joined #nimrod
17:19:42*q66 quit (Changing host)
17:19:42*q66 joined #nimrod
17:29:05*ehaliewicz joined #nimrod
17:33:22*ehaliewicz quit (Ping timeout: 240 seconds)
17:42:33EXetoCAraq: yes but at compile time, right?
17:45:45Araqright
17:46:05*Jehan_ joined #nimrod
17:46:50*Jesin quit (Quit: Leaving)
17:50:29*Johz joined #nimrod
17:56:08EXetoCit's just a matter of not calling loadExtensions I guess, but that should be good enough in most cases
18:00:54EXetoCperhaps I need function pointers then
18:19:36AraqJehan_: already found some bugs
18:20:09Araqstill crashes on linux though, I think
18:22:08Jehan_Araq: Excellent. Not the crashes on Linux, of course.
18:22:17*brson_ joined #nimrod
18:22:31*brson quit (Quit: leaving)
18:23:42AraqI also found out that the barrier that I need is called a "dynamic" barrier ;-)
18:25:10Jehan_I still think that sync() is fundamentally too limited. :)
18:26:02Jehan_Don't get me wrong, it's a nice convenience feature to have, but I'm not expecting to see it used much in performance-critical code.
18:26:35Araq"parallel" doesn't use sync() at all
18:28:33Araqbut I guess you mean the *concept* of sync
18:28:49Jehan_I was under the impression you wanted a barrier for spawn + sync?
18:29:57Araqnot sure what you mean, "parallel" uses a barrier, but not 'sync'
18:29:59Jehan_In general, any place where a lot of threads coordinate their activities is a potential bottleneck.
18:30:24Jehan_Araq: Hmm. Then I must have misunderstood you. Or misremembered.
18:30:29*ehaliewicz joined #nimrod
18:31:11Araqwell check out the tpi test
18:31:52AraqpiU uses spawn + promises, piS uses parallel + spawn
18:32:04Araqneither use 'sync'
18:34:09Araqyou can trade the barrier against promises which imply more heap allocations
18:34:33Araqthe allocations are still thread local though
18:35:07flaviu1Interesting. You can do apparently take the pointer of a label in C, and then call it.
18:36:15Araqflaviu1: that's a GCC extension
18:36:26flaviu1I just saw that a few seconds ago
18:36:45Jehan_Araq: Hmm, I thought the parallel statement waited until all threads were done?
18:37:29AraqJehan_: only until all threads involved in the 'parallel' statement are done
18:37:39Jehan_Yes, that's what I meant.
18:37:49Jehan_But same difference.
18:37:53Araqyes, that's the barrier
18:38:08Araqthis is what OpenMP does too fwiw
18:38:35Jehan_Yup, and any kind of parfor statement ever. :)
18:38:54Jehan_It's okay if that's all you're doing. But not necessarily efficient.
18:39:23Jehan_Consider the case where the computations don't all take the same time.
18:40:15Jehan_Which is pretty common especially when you use big integers, iterative computations, or something like that.
18:40:16Araqagain, the cost of your preferred way is a Promise-like return type
18:40:59Jehan_Not necessarily my "preferred" way.
18:41:32Jehan_But often being able to process results in the order that they are actually finished is pretty important for performance.
18:41:38Jehan_Amdahl's law.
18:44:32Araqwell since we provide both you have nothing to complain about :P
18:44:32Jehan_There's definitely room for the parfor approach. You want to minimize "time spent to write a program" + "time spent executing the code" often enough. And parfor is simple and easy to understand, so that keeps the first part low.
18:45:05Jehan_Araq: Don't misunderstand me, I'm not complaining. Or at least trying not to. :)
18:45:20Araqactually my parfor also proves the absense of race conditions
18:46:00Araqand when all your spawn'ed functions are .noSideEffect it's fully deterministic
18:46:18Jehan_Yes, you mentioned that, and that's really nice if it works for a fair amount of interesting use cases.
18:50:07Jehan_What I was getting at is that most of the time performance is about breaking a computation in reasonably sized jobs and keeping each processor's pipeline of jobs saturated. And yes, that's sadly simplistic.
18:51:05Jehan_Though there are interesting aspects when jobs are to reuse and share each other's work through shared memory.
18:55:46*brson_ quit (Ping timeout: 240 seconds)
19:01:13AraqJehan_: another design problem is that Promise is a 'ptr' and unsafe. We can wrap it another 'ref' to make it safe, but I'm not sure the overhead is justified
19:01:44Jehan_Araq: Yeah, I saw that.
19:02:37Araqwith even more sing-and-dance we can also make it a 'ref' without the 'ptr' indirection
19:03:39AraqI mean sing-and-dance between threads
19:06:48dom96oh look, a new programming language from Apple; https://developer.apple.com/swift/
19:10:41fowlthey knowingly took a name that was used already
19:10:45fowlLooking for the Swift parallel scripting language? Please visit http://swift-lang.org
19:11:49EXetoClame
19:11:52Jehan_Araq: I haven't looked at it in detail yet, but I suspect it's similar to a general problem I'm working on, which is how to efficiently determine the lifetime of an object that may be referenced from multiple (thread-local or shared) heaps.
19:12:51Jehan_fowl: That has happened to more than one programming language.
19:13:04*brson joined #nimrod
19:13:04Jehan_Go and Ruby come to mind immediately.
19:13:58dom96I don't think they can do much about it unless they actually own that name legally.
19:14:51Jehan_dom96: Yeah, a trademark is about the only effective way to stop it.
19:15:23Jehan_On the other hand, too many damn names are already being used by one abandoned language or another.
19:15:27dom96Argh. I need iOS 7 to get that iBook.
19:15:31dom96Screw that.
19:17:03dom96I'd rather wait for the inevitable mass amounts of blog posts discussing how much people love this language.
19:17:26Jehan_Araq: As far as it being expensive is concerned: As long as it takes less than 100 clock cycles or so (which is what you can expect the most basic forms of synchronization to take), I wouldn't worry much about it.
19:17:42*dom96 predicts a "Why Apple's Swift will change how children learn programming" in the next few days
19:17:56dom96Followed by a "Why Apple's Swift changes nothing"
19:18:18Jehan_dom96: Right now it seems to have a pretty narrow target audience.
19:18:53dom96Jehan_: Yeah, right now. Won't be long before people start trying to write web servers in it.
19:18:58dom96And then start comparing it to Go.
19:19:13Johz"Apple's Swift Considered Harmful"?
19:19:14Jehan_dom96: Heh. :)
19:19:39Jehan_I expect at least one blog post titled "A Modest Proposal" or something along these lines. :)
19:20:25fowlproposal: 5 year ban on new programming languages
19:21:19EXetoCfowl: specifically for cocoa? so gay and stuff
19:22:28*xtagon joined #nimrod
19:32:47EXetoClock-in <3
19:33:13*Matthias247 joined #nimrod
19:38:53*caioariede quit (Ping timeout: 252 seconds)
19:39:47*caioariede joined #nimrod
19:44:43flaviu1Well, I've been looking into alternate error mechanisms, and it comes down to Exceptions and Either Monads. Araq's exception stack idea is basically Either, but stored in another area of memory.
19:44:43flaviu1Lisp does some cool things with exceptions and allows you to return control back to the thrower after catching.
19:45:36Araqflaviu1: I disagree. An exception stack is not the Either monad at all
19:45:40Jehan_You mean the condition system?
19:45:56dom96IMO an Either only makes sense for things like `[]` for PJsonNode
19:46:04Araqyeah, that's what flaviu1 is talking about
19:46:16Jehan_flaviu1: Also, there are other approaches.
19:46:31*ehaliewicz quit (Ping timeout: 260 seconds)
19:46:35flaviu1Jehan_: I'd consider C's error flag a rudimentary Either
19:46:35Araqalso a condition system doesn't work well with in an effect system though I don't remember the details really
19:46:55Araq*with an effect system
19:47:29Jehan_flaviu1: Not what I'm talking about.
19:47:36Jehan_flaviu1: E.g. https://www.usenix.org/legacy/event/osdi04/tech/full_papers/candea/candea.pdf
19:49:03Jehan_flaviu1: All of Prolog is also pretty much an alternative approach (i.e., where all functions are partial by design).
19:50:12flaviu1I don't see microreboots being suitable for all purposes
19:50:38Jehan_flaviu1: Neither is any of the existing exception handling mechanisms.
19:53:54flaviu1You can coerce lots of things into Either and exceptions, but microreboots are only useful in very specific areas
19:55:10flaviu1IDK how prolong does it, but using partial function is a good idea, similar to lisp continuations because control flow automatically flows back into the caller of the partial function
19:56:11flaviu1Partial functions seem a lot like a more powerful of Either
19:56:22Jehan_Umm, Prolog is a declarative language. Failure of a predicate is just normal control flow.
19:57:34flaviu1I know that prolog is fancy and finds a solution that meets your constraints, but I was thinking of explicitly specifying partial functions
19:58:17Jehan_What do you mean by that?
19:58:18flaviu1I know what I'm calling partial functions is likely different from what prolog says they are
19:58:23dom96How are partial functions related to Either?
19:58:51Jehan_Well, Prolog calls them predicates, but essentially they're partial functions.
19:58:59flaviu1dom96: Let me write some pseudocode
19:59:12Jehan_Any predicate can either succeed (and instantiate one or more of its arguments with values in the process) or fail.
19:59:38dom96But that reminds me, we need a curry macro in Nimrod.
20:00:04BitPuffindom96: indeed
20:00:14Jehan_The approach I've settled on myself maps to exceptions in a fairly straightforward way, but works cleanly with preconditions and a few other things.
20:03:10Jehan_Essentially, a try expression maps a partial function with result type T into a total function with result type Try[T] (and yes, that's a variant of Either[T,Error], basically). Combined with a rollback mechanism for code that has side effects.
20:04:48Jehan_Also have considered calling it Partial[T] instead of Try[T], but not sure if that makes things clearer at all.
20:07:16dom96Perhaps I am not familiar with partial functions.
20:07:24dom96I'm thinking of partial function application in Haskell.
20:08:11Jehan_dom96: In mathematics, a partial function is simply a function that is not defined for all values of its domain.
20:08:41Jehan_And in this context, an exception is basically telling the caller that it's undefined for this value.
20:09:13flaviu1dom96: https://gist.github.com/flaviut/a89aa20b426018dd0319
20:09:32Jehan_You can also do this by having all functions that may error return Option[T] or something like it.
20:09:35dom96Jehan_: I see. Interesting.
20:09:56flaviu1dom 1 sec, I made a few mistakes
20:10:05Jehan_But that creates a lot of burden for the callers, many of which just want to say: If the function I call is undefined, so am I.
20:10:21dom96I think that in Rust an IoError[T] is essentialy an alias to an Option[IoError, T]
20:10:44Jehan_You mean Either[IoError, T]?
20:11:06dom96I assumed Option is a synonym for Either.
20:11:11Jehan_dom96: One nice thing about this approach is that it works extremely well with preconditions.
20:11:58bstriedom96: dom96 I think you mean IoResult, not IoError. IoResult is just a typedef for Result<T, IoError> where Result is the Rust version of Haskell's Either
20:12:19dom96bstrie: Oh yes. That's it.
20:12:19flaviu1dom96: ok, I updated it
20:12:20bstriedom96: Option is the Rust equivalent of Haskell's Maybe
20:12:21Jehan_dom96: Option[T] is basically a typesafe null pointer, somewhat crudely put.
20:12:32dom96bstrie: Silly me heh.
20:13:08dom96Jehan_: Yeah. I've used Haskell for a bit quite some time ago so i'm familiar with the concept.
20:13:08flaviu1dom96: Option is not a synonym for Either. Option[Something] == Either[Something, void]
20:13:28dom96flaviu1: I see.
20:14:41*brson quit (Ping timeout: 264 seconds)
20:14:44dom96flaviu1: In regards to the gist, that would be nice but it would require some modifications to Nimrod stdlib.
20:14:59dom96actually, not some but a lot.
20:15:15flaviu1Well, obviously. Nimrod would also need to get support for partial functions
20:15:24flaviu1And pattern matching
20:16:17Klaufirwhat are the rules behind that proc what(s:string) can be later called like this: what"asdfa"
20:17:11flaviu1Klaufir: I'm not sure what you're asking, but the manual covers that well. http://build.nimrod-lang.org/docs/manual.html#generalized-raw-string-literals
20:17:39dom96I think Klaufir wants to know what kind of proc names are allowed.
20:17:39Klaufirthanks, thats what i have been looking for
20:26:34dom96https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/GuidedTour.html
20:26:46dom96We should copy the pattern matching :P
20:28:45Jehan_dom96: Umm … :)
20:29:06dom96I know... i'm a hypocrite.
20:29:45*brson joined #nimrod
20:29:53Jehan_I was assuming you were being facetious.
20:29:53*radsoc joined #nimrod
20:29:58flaviu1dom96: Check out Scala pattern matching
20:30:26Jehan_And what flaviu1 said.
20:30:59BitPuffinAraq: you are probably gonna get mad, but it would be cool if you could overload generics. So that I could have type TVector [T, D: static[int]] = ... and after that type TVector[T, B: array[0..TVector.D-1, TVector] or whatever
20:31:01Jehan_If Scala could trim its type system a bit and rid itself of its dependency on the JVM, it'd be one of my favorite languages.
20:31:03dom96I see. Well, like many I am blinded by the Apple logo.
20:31:07BitPuffinthat is, in order to support non-standard basis
20:31:34flaviu1*like many, I
20:31:39BitPuffinAraq: also a minor problem with the TMatrix[T, R, C, O = false] approach is that I wouldn't want O to be visible to the user
20:31:56Araqis your name filwit?
20:32:02flaviu1Jehan_: Don't forget compilation speed
20:32:17BitPuffinmy name?
20:32:27Jehan_flaviu1: Compilation speed with zinc is acceptable these days.
20:32:36Jehan_flaviu1: Well, at least for the stuff I'm doing. :)
20:32:40flaviu1Although nimrod has the same problems to solve in terms of compilation, they're just called typeclasses
20:33:17dom96How would this look in Scala? 'case let x where x.hasSuffix("pepper"):'
20:33:52flaviu1dom96: It wouldn't fit in IRC
20:34:31flaviu1You'd set up a custom extractor, which necessitates a new singleton object, which is already 5 lines of code
20:34:46dom96And yet you still prefer Scala's pattern matching?
20:36:07flaviu1But the important lines of code would come down to `def unapply(a: Suffixable): Option[String] = if(a.hasSuffix("pepper")) return Option(a) else return None`
20:36:29dom96That's not really pattern matching anymore.
20:36:48flaviu1Yeah it is. Thats the boilerplate for the pattern matching
20:37:18dom96In that case I go back to my previous question :P
20:37:30flaviu1Then you can do `a match{ case PepperSufix(a) => do whatever }`
20:38:03flaviu1Where PepperSufix is the name of the singleton object you put the unapply method inside of
20:38:43flaviu1Wait, no, its simpler
20:38:48flaviu1much much simpler
20:39:19flaviu1`a match {case a: Suffixable if a.hasSuffix("pepper") => do stuff }`
20:40:20dom96well then it's pretty similar
20:41:13Jehan_flaviu1: Yup. Scala largely mirrors ML when it comes to basic matching facilities (and then adds the OO stuff on top).
20:41:29BitPuffinML ftw
20:41:57Jehan_dom96: Yes, but the syntax is cleaner and match is more powerful in general.
20:43:17Jehan_BitPuffin: I've written a fair amount of OCaml in my time. :)
20:43:46dom96Fair enough. I unfortunately can't learn much from looking at simple pattern matching examples.
20:43:48Jehan_CIL is a very neat tool in particular if you need to massage C code.
20:44:10dom96I also don't have a strong preference and in fact I do like Scala's syntax.
20:44:16Jehan_And by CIL I don't mean the .NET stuff in this case.
20:44:32dom96I tried to create a pattern matching macro and got stuck because of this bug: https://github.com/Araq/Nimrod/issues/1120
20:45:52Jehan_dom96: Pattern matching is nice, but it's not nearly as important for Nimrod as for a functional language (let alone a declarative one).
20:45:54BitPuffinJehan_: it's great
20:46:20dom96Jehan_: Yeah, but everyone wants functional features nowadays. I think we need them for good adoption.
20:46:40Jehan_dom96: For good adoption or for good press? :)
20:46:48fowldom96, i hit this before, i just made a filter function
20:46:59dom96Jehan_: both
20:47:03fowldom96, it checks if its do with no params or stmt list, returns the stmt list
20:47:16BitPuffinI think it's good to stick to a functional style as long as it is practical
20:47:16dom96Jehan_: I think that the latter improves the former :)
20:47:37BitPuffinbut when there is a way that is easier to maintain you should use that
20:47:43Jehan_dom96: I like functional languages (see my comments about OCaml above and in general), but I'm generally not in favor of turning a horse into a cow.
20:48:29EXetoChow about a horse/cow mutant. that'd be awesome
20:49:01Jehan_dom96: Deconstructing data via pattern matching is pretty essentially for a lot of functional languages because that's their way to work on partial state, but imperative languages have other tools.
20:49:35dom96fowl: That's a nice workaround, will try that once I decide to go back to trying to get this macro to work.
20:49:50flaviu1EXetoC: How about a horse/donkey mutant...
20:49:50Jehan_dom96: For imperative languages it's a nice convenience feature for some use cases.
20:49:55flaviu1Uh, a mule :P
20:50:06Araqactually the deconstruction solves quite some problems when it comes to memory safety but that wasn't obvious to me when I decided to leave them out
20:50:10fowldom96, in the pattern matching, how do you know whether "x" is an enum type (Nothing, Just) or a variable that should be filled with a value?
20:51:15dom96fowl: Good question. I haven't thought about that yet so I don't have an answer.
20:51:41Jehan_Araq: You can alternatively use objects + inheritance. :)
20:51:59Araqlol no way, Jehan_
20:52:18Araqoh you mean for the safety aspects
20:52:25Araqyeah
20:52:34Jehan_Well, an ML variant type is really only a one-level inheritance hierarchy with a rigid structure. :)
20:52:56flaviu1fowl: Scala does it hackashly, uppercase first letter means its a type, lowercase first letter signifies a value
20:53:28Jehan_I note that Scala also uses inheritance (case classes) for that.
20:53:29fowlflaviu1, nimrod cant do it that way
20:53:53flaviu1No, it can't, and its a hack, so if it could, it shouldn't
20:54:09fowlit makes sense, if the language has capitalization rules
20:54:27dom96Nimrod /may/ soon do that though.
20:54:32flaviu1Scala doesn't, but the capitalization conventions are very entrenched.
20:54:37*filwit joined #nimrod
20:55:12Jehan_flaviu1: Interestingly enough, Sather used capitalization to distinguish between classes and other identifiers, as I recall.
20:55:28flaviu1If its enforced, then its good
20:55:34Jehan_Sather was another language that was ahead of its time.
20:56:03Jehan_Interestingly, it also compiled to C (like Nimrod and both ISE Eiffel and SmartEiffel).
20:56:55flaviu1I like the synaptic sugar for operators aspect
20:57:20fowl?
20:57:37flaviu1Using + binds to .add()
20:58:06flaviu1err .plus()
20:58:27Jehan_fowl: Each operator had a normal identifier that it was equivalent to.
20:58:29fowldom96, i dont think a useful match() is possible without compiletime typeinfo
20:58:49Jehan_fowl: And x+y was the same as x.plus(y) as a result.
20:59:15Klaufiris there somewhere an example of using nimrod channels?
20:59:26Jehan_Made operator overloading trivially easy.
21:00:04Jehan_Klaufir: Umm, I've written code with channels, but I'm not sure if I have it in a public place somewhere.
21:02:33*zahary joined #nimrod
21:02:48filwitjust read logs, Swift's syntax looks clean, but screw a non-open dev-lockin.
21:03:23Araqhuh? ofc you can do that in nimrod today
21:03:43BitPuffinSwift?
21:04:05flaviu1BitPuffin: Some language apple came up with to replace objective C
21:04:05filwitwho was that directed too, Araq?
21:04:14BitPuffinflaviu1: thank god
21:04:19Araqa macro can easily decide to be case sensitive
21:04:33Araqthe identifiers are not normalized
21:05:37fowlAraq, i'm in a macro and i want to match the expression x for List(item,next), i can assume the layout is case (somename): discriminant it: T next: List[T]
21:06:21fowlAraq, how can i build code if i dont know (somename), it, next
21:06:55filwitAraq: speaking of macros, have you given anymore thought on the best way to support '*' (export) and {.pragmas.} in macro parameters?
21:06:57fowli can write a macro logtypeinfo: to record info from type defs.. O_O
21:08:49filwitAraq: fowl brought up that `class Foo*: ...` would be a post-fix operator, which i forgot wasn't part of Nimrod. I don't think this situation justifies the need for a post-fix (i don't really know the issues with that), but it would be very nice to be able to write that for OOP support
21:09:15VarriountOhi filwit
21:09:21filwithi Varriount
21:09:30EXetoCmoar ooop!
21:10:35filwitAraq: i was thinking a special-case macro/template-only {.keyword.} pragma (or whatever it would be called) would work well (where it would allow for * postfix and {.prags.})
21:10:51Jehan_OOP support? Nimrod's OO facilities strike me as being just fine.
21:11:14filwitAraq: idk if that would be really ugly to implement or not though, it was just my initial idea.
21:11:15Jehan_Okay, I'd like to be able to write "class" (or anything, really) instead of "ref object", but that's a pretty small thing.
21:12:55filwitJehan_: i'm not talking about built-in OOP in Nimrod.. but OOP through custom macros... and Nimrod's built-in OOP is behind other OOP languages (no multi-inheritance or multi-interfaces).
21:13:23filwitJehan_: thing is, Nimrod's OOP is just fine considering we can just construct our own via macros, so it's whatever
21:13:35EXetoCdon't care for MI
21:14:09filwitMulti-inheritance or Multi-interface?
21:14:14Jehan_filwit: The lack of multiple inheritance is greatly mitigated by having multiple dispatch and parametric polymorphism.
21:14:25Matthias247hmm, while I don't care for multi-inheritance I would really like interfaces
21:14:30Jehan_filwit: multiple interfaces are a crippled form of multiple inheritance.
21:15:00Jehan_But one and the same thing, really.
21:16:22BitPuffinI wouldn't mind either of the MI's
21:16:25Jehan_The thing is that Nimrod uses a multi-method approach and thus is arguably closer to Dylan or CLOS than Eiffel, Java, or C++.
21:16:26BitPuffinthey can be useful
21:16:28BitPuffinnuff said
21:16:30VarriountHm. What is "Parametric Polymorphism"?
21:16:46filwitAgain, we can build our own MI in Nimrod
21:17:25Jehan_BitPuffin: I like MI inheritance, too, but its absence is less crippling than in other languages.
21:17:28Varriountfilwit: Hows the CSS going?
21:17:30Jehan_Varriount: Generics.
21:17:49filwitVarriount: working on it now + something for my own website
21:18:31Jehan_Varriount: People use subtyping polymorphism often where parametric polymorphism is better. Hence what I said about it mitigating the absence of MI.
21:18:47BitPuffinJehan_: perhaps
21:20:04*usr joined #nimrod
21:20:08*usr left #nimrod (#nimrod)
21:20:22filwitJehan_: i don't think the OOP crowd would agree parametric polymorphism is even as good as interfaces in most cases, unless i'm not understanding the term correctly.
21:21:15Jehan_filwit: It's something different. My point was that inheritance is often abused where parametric polymorphism would have been the better choice to begin with.
21:22:29filwitJehan_, this sounds like a religious argument, and isn't a good way to get folks interested in a language. Even if it's true (which i'm not entirely in agreement with).
21:23:05*radsoc quit (Ping timeout: 264 seconds)
21:23:31Jehan_filwit: Not really religious. It's related to composition vs. inheritance.
21:24:28*caioariede quit (Ping timeout: 245 seconds)
21:24:53filwit"don't worry guys, you just have to THINK differently than you always have... then you can actually build stuff" - doesn't matter what you say man, that's a bad advertising position, not matter how you dice it
21:24:53*tinAndi joined #nimrod
21:25:53filwitbut again, i'm not complaining about this, macro's can build any and all OOP forms in Nimrod, which is much better than other languages can boast
21:26:01fowlcomponents are obviously the best way to aggregate data and behavior
21:26:04filwitwe just need to build them, and advertising that ability
21:26:19Jehan_filwit: I'm not talking about advertising here. I was talking about the language design/software engineering aspects.
21:26:47Jehan_Not everyone is here for advocacy.
21:27:14filwitJehan_: okay, well that's fine. I disagree somewhat with you, but would have to start giving code examples and stuff which i don't want to get into ATM.
21:27:19*Johz quit (Ping timeout: 252 seconds)
21:27:28*Kazimuth joined #nimrod
21:27:56Jehan_filwit: Fair enough.
21:31:48*aboutGod joined #nimrod
21:35:24Araqflaviu1: I wrote down my reasons of not having pattern matching built into the language in the DrDobbs article
21:36:09*caioariede joined #nimrod
21:36:55*aboutGod left #nimrod (#nimrod)
21:37:01Matthias247just read the "Swift Tour". Quite impressed. But I'm wondering if this "completly new" or more or a less a new and clean syntax for objective-c
21:38:56*Joe_knock joined #nimrod
21:39:53filwitit's better syntax than ObjC (by a long shot) and memory-safe (so 'better' than C/C++ for common folks).. so I would say it's a win-win for Apple devs... but only for them, which is the problem with it.
21:40:53Jehan_filwit: I think the target audience is AppStore developers who need a more accessible way to write apps.
21:41:12Araqboth Google and Apple would already use and embrace c# if it weren't from Microsoft ...
21:41:40Matthias247Jehan_: I also think so. Objective-C is too complex (or low level) for the majority of app-devs
21:42:04Matthias247Araq: maybe also true. Swift seems to take a lot from objective-c
21:42:08Matthias247ehm, from C#
21:42:09Jehan_Araq: Yeah, Microsoft did burn too many bridges back then.
21:42:23Matthias247properties, nullable types, "safe navigation operator", extension methods
21:42:38Jehan_Which is unfortunate, because C# is a pretty good language.
21:43:14Jehan_Not to mention that the CLR would be a better option than the JVM for many things.
21:43:49Matthias247but mono is now gaining some more traction
21:43:50Jehan_Matthias247: A lot of this stuff is from other languages originally.
21:44:22Matthias247Jehan_: I'm sure. I don't know many of them. But C# made these features popular
21:44:26Jehan_Matthias247: Mono still has some issues. Don't get me wrong, I like Mono, I've used Mono, but ...
21:45:13Jehan_It's probably still one of the first options I'd consider if I had to write a mobile app. :)
21:45:45filwitJehan_: yeah, and for them it's good. I just wouldn't ever use a language I felt was restricting me to a specific, profit-driven platform.
21:46:06Matthias247performance of Swift vs. something like C++ or C# would be interesting. Guess they still usw message dispatching and ARC for everything
21:46:22filwitJehan_: nothing against profit-driven in that statement, just saying I don't like the idea of being restricted due to business politics.
21:46:44Jehan_filwit: Eh, Mono is open source. Xamarin sells mobile platform support (plus the right to link statically).
21:47:01Matthias247but it's quite expensive I think
21:47:22Jehan_The problem is that like any JIT platform, Mono is non-trivial to continue support for if Xamarin disappeared.
21:47:27Matthias247colleague is using Mono/Xamarin as the backend for a cross-plattform tablet-app
21:47:38*tinAndi quit (Quit: ChatZilla 0.9.90.1 [Firefox 29.0.1/20140506152807])
21:47:43Matthias247he's loving it
21:48:36Jehan_In stark contrast with Nimrod. If Araq suddenly gave up programming and decided to study Yoga in India, it could be maintained with comparative ease.
21:49:03Jehan_Matthias247: It does cost quite a bit, but if you do this for a living, the value you get is worth it.
21:49:11Matthias247maybe MS is now also putting support in Mono after they announcced that asp .net vnext can be run on it
21:50:25Jehan_Practical problems with Mono are still speed and occasionally stability.
21:51:39Jehan_And stability wouldn't be as much of an issue if debugging a JIT platform weren't such a pain.
21:53:06Joe_knockIs Mono a language?
21:53:11*superfunc joined #nimrod
21:53:33Jehan_Joe_knock: No, Mono is a portable implementation of the .NET platform, basically.
21:53:45Araqhmm my "parallel" statement now works on Linux too...
21:53:55Jehan_Araq: Congratulations!
21:53:58Araqthat was easy ...
21:53:59superfuncI have emerged from final examinations with most of my sanity in tact; Hello, world.
21:54:36Matthias247no let's see when MS strikes back with M# ;)
21:54:47AraqJehan_: thanks but now I have no choice but to review PRs ...
21:54:53Joe_knockJehan_: aah okay, that would explain why I've heard about "Mono for linux"
21:55:22Jehan_Joe_knock: It's actually pretty impressive what they've accomplished.
21:56:04Joe_knockMatthias247: Did you see their #F?
21:56:08Jehan_Joe_knock: For the longest time, C# + Mono was what I turned to when I needed a compiled language (for at least some resemblance of speed) with batteries included.
21:56:38Matthias247Joe_knock: yes, I know F#. But I'm not a big fan of the functional style
21:57:21dom96superfunc: lucky, I still got two left.
21:57:51superfuncGood luck man. I had all four in one day
21:57:54superfuncIt was awful
21:58:04Araqdom96: tests/parallel/tpi.nim is the port of that Go code that you wanted to see btw
21:58:58dom96superfunc: oh damn. I had two today and it was bad enough, 4 must be absolutely terrible. Also thanks, I wish you all the best too, even though you've already done them :)
21:59:08dom96Araq: cool
21:59:20superfuncI'll have plenty more. Starting my PhD program in the fall
21:59:55dom96superfunc: Awesome. I'm still in high school lol.
22:00:07Jehan_dom96: For some reason, I didn't see the context and thought you were talking about having wisdom teeth pulled.
22:00:11Jehan_:)
22:00:47dom96Jehan_: hah. Maybe that says something about your worst fears.
22:00:49superfuncdom96: You're in a great spot dude. I wish I had starting programming that early
22:01:07Jehan_dom96: Nah, I had them out years ago. :)
22:01:08Varriountdom96: We're all rooting for you!
22:01:33Matthias247superfunc: the bad thing is he will be terribly bored in university ;)
22:01:36Jehan_Varriount: I see what you did there. :)
22:01:37Joe_knockI always wondered what the 96 meant in dom96. I guess it was "year of birth".
22:02:05superfuncMatthias247: True that. Hopefully the theory classes will give him some challenge
22:02:06dom96Joe_knock: Funnily enough it doesn't mean that. It doesn't mean anything really. My year of birth is 95 though.
22:02:34dom96Joe_knock: I can only assume that when I picked out this nick dom95 was taken so I just increased the number, or maybe I didn't remember my year of birth correctly.
22:02:43dom96I've been using this nickname since I was about 8 years old.
22:02:45Matthias247superfunc: I think so. At least here in germany you won't do much programming in university anyway. Its 99% theoretical stuff
22:02:46AraqI thought it was something pornographic :P
22:03:03Jehan_Matthias247: Depends on the university.
22:03:09dom96Matthias247: That is indeed one of my fears.
22:03:11superfuncMatthias247: The US is kind of split, depending on the uni.
22:03:22Jehan_And at the graduate level, what you're specializing in.
22:03:28dom96Matthias247: But for now I'm worrying about getting the grades that I need to get in.
22:03:53Matthias247Jehan_: true, FHs are better than universitys in that regard
22:04:05superfuncMatthias247: Mine was very theoretical, but it had a large set of practical electives, mostly because we are in the silicon valley and every kid wants to make the next iOS app.
22:05:00Jehan_Matthias247: I didn't say it was better to have more programming. :)
22:05:04Joe_knockThe next big app boom is enterprise apps.
22:05:26flaviu1Joe_knock: Isn't it web apps and the cloud?
22:05:32Matthias247dom96: are there special high requirements (apart from not to fail)? Here there are not - because they aren't too much people that want to do computer science anyway. Compared to to Medicine and other stuff
22:06:11Joe_knockflaviu1: Everything is in the cloud already. Maybe "enterprise apps in the enterprise cloud using the enterprise big data analytics software"
22:06:12Jehan_Matthias247: The kind of open admission that Germany does is not all that common (internationally).
22:06:13dom96Matthias247: It depends on the university but the one I am (hopefully) going to wants 3 Bs at A Level.
22:06:40flaviu1dom96: Which two exams did you take today?
22:06:47Matthias247superfunc: I have a colleague from the US and often have to to with US developers. And my impression is that they are on average better then german absolvents for practical stuff
22:06:56Joe_knockMatthias247: You guys prob get more engineer applicants than CS?
22:07:00dom96Matthias247: This university is also a bit different in that the requirements are lower if you are doing Maths at A level. If you are not then the grade requirements are ABB IIRC.
22:07:10dom96flaviu1: ICT and Biology
22:07:22Jehan_Matthias247: Has to do with Germany not really doing the "elite university" thing (the elite stuff is what research institutes in Germany are primarily for).
22:07:52Matthias247dom96: sounds achievable. Anyway - good luck :)
22:08:15Jehan_Joe_knock: It's more that Germany's economy has an insatiable hunger for STEM graduates.
22:08:52Joe_knockJehan_: Does germany import STEM workers too?
22:08:53Matthias247Joe_knock: I think it's the other way. Theres more CS than engineering. But MANY CS students quit quite early
22:09:06dom96Matthias247: Thanks. :) I'm actually doing 4 subjects so hopefully that gives me a better chance. The interesting thing is that if I get AACC the university has no legal obligation to accept me.
22:09:17dom96Which kinda sucks to be honest.
22:09:29Jehan_Joe_knock: Some companies have been doing it, though more for vocational training.
22:09:30dom96But BBB should be doable.
22:10:24superfuncdom96: What country do you reside in?
22:10:35Matthias247i think in my year there about 100 guys doing electrical engineering, 100 mechanical, and > 200 computer science
22:10:37dom96superfunc: UK
22:10:51superfuncAh, explains how I got so lost lulz'
22:10:54flaviu1dom96: It seems that high school computing classes are a joke
22:11:25Joe_knockBased on dom96s skills, I'm surprised you even want to study further.
22:11:29dom96flaviu1: ICT is a joke, yes. Computing is better, but my school does not offer it.
22:11:43superfuncflaviu1: I think it depends if they can get a good teacher. My robotics teacher taught me C which really helped get me started
22:11:47dom96I asked one of my teachers why and they said "it's too difficult"
22:11:53flaviu1dom96: In the US too, you get to learn enough Java to write a couple classes
22:12:02dom96Apparently they will start offering it next year though, so I missed out unfortunately.
22:12:25Matthias247we had only half a year of pascal ;)
22:12:47Matthias247and later on some other useful stuff like prolog and assembly
22:12:52dom96flaviu1: In ICT the most complex thing is database normalisation.
22:13:11dom96Other than that it's a case of remembering a lot of facts which I deem pretty useless.
22:13:31flaviu1I actually don't know much about database normalization, except its important. I thought it was funny you have to learn about input devices
22:14:06dom96Yeah, but that's at AS level so I was learning that a year ago.
22:14:26dom96Another silly thing is that ICT is 40% coursework which you do in class.
22:14:48Joe_knockWhere I live, they teach something called CAT, which is basically teaching people how to use MS word, powerpoint, excel and a little Access.
22:15:07dom96At GCSE level (2 years ago) I coded a game in game maker and got lower marks than people who created the same style of game with slightly different graphics as stated in the teachers instructions.
22:15:22AraqI consider database normalization an academic exercise ... ;-) just learn to use indexes and profiling tools
22:15:41dom96Joe_knock: That's pretty much what ICT is.
22:15:53Matthias247Joe_knock: with powerpoint and excel you are prepared for most of the engineering jobs ;)
22:15:55dom96The strange thing is that the coursework at A level was much easier than at GCSE level.
22:16:19dom96At least I got write some HTML/CSS and fight with the language that game maker uses
22:16:27dom96while also working around the non-pro versions limitations
22:16:34Joe_knockdom96: Aah I think I now figured out where we get most of our ideas from.
22:16:37dom96I should get 100% just for being able to do that :P
22:16:52dom96Joe_knock: Where do you live?
22:17:04Joe_knockMatthias247: I thought engineers used better "tools" ?
22:17:10Joe_knockdom96: South Africa
22:17:26Matthias247Joe_knock: they should ;)
22:17:54dom96Joe_knock: I think we had another person from there in this channel at some point.
22:18:00dom96!seen Trixar_za
22:18:00NimBotTrixar_za was last seen on Fri May 30 21:21:54 2014 joining #nimrod
22:18:13dom96oh wait, he's here.
22:18:14Matthias247but I've seen more than enough 100page slidesets and 5kline excel sheets to know they don't always :)
22:18:49Matthias247especially japanese guys love excel engineering
22:19:37Joe_knockdom96: We south africans don't lurk in the farthest corners of the web, like IRC.
22:22:45NimBotAraq/Nimrod devel 93fa75b Clay Sweetser [+0 ±6 -0]: Fixed #1172 (for real)
22:22:45NimBotAraq/Nimrod devel 0d65550 Andreas Rumpf [+0 ±6 -0]: Merge pull request #1240 from Varriount/fix-1172... 2 more lines
22:23:36AraqKlaufir: I commented on your PR
22:24:21NimBotAraq/Nimrod devel c2b58f3 Reimer Behrends [+0 ±1 -0]: Properly terminate "nimrod i" on end of file.... 5 more lines
22:24:21NimBotAraq/Nimrod devel 67cef1b Andreas Rumpf [+0 ±1 -0]: Merge pull request #1242 from rbehrends/interactive-eof-fix... 2 more lines
22:25:06Araqfowl: I'm still waiting for 'hash' for #1174
22:25:17dom96Araq: Have you benchmarked your Pi thing?
22:25:25fowlAraq, alright
22:25:36flaviu1Araq: Have you considered using something else for reference equality?
22:26:29Araqdom96: no but it's a toy anyway
22:26:43Araqflaviu1: like what?
22:26:50dom96Araq: Still, would be interesting to compare to Go.
22:26:52flaviu1I like `eq` from scala
22:27:26Jehan_dom96: The individual calculations are too short to be meaningful.
22:27:59dom96Jehan_: I see.
22:28:19dom96Araq: The current heavy threads will remain right?
22:28:31Araqright
22:29:07Araqwell actually ... I need to change the API
22:29:43Araqbut I won't anytime soon
22:30:01AraqI have more pressing stuff to do
22:31:12AraqVarriount: if m in c.friendModules works too
22:32:01Araqflaviu1: 'eq' is nice but doesn't play well with nimrod's syntax. unless you consider a.eq(b) perfectly fine
22:32:18flaviu1Looks fine to me
22:32:59flaviu1you could also do a.`==`(b)
22:33:06Araqtemplate eq(a, b): expr = system.`==`(a, b)
22:33:33Araqbut then people dislike aliases
22:33:39Araqoh wait they like them
22:33:58Araqunless it's "gorge" and "inc" ...
22:34:09flaviu1Dislike them if they do the exact same thing, like them if they decrease ambiguity.
22:35:13Jehan_Araq: Is there any specific reason why you can't put arbitrary stuff in between backquotes?
22:35:20flaviu1Its a language's job to be opinionated, code gets unreadable if it isn't consistant.
22:35:33flaviu1Jehan_: You can put arbitrary stuff between backquotes
22:35:52Jehan_flaviu1: Huh, I remember trying it (granted, a loong time ago) and it didn't work.
22:36:03flaviu1everything except `[`, `{`, `(`, `)`, `}`, `]` are valid identifiers
22:36:24flaviu1Jehan_: If the a number came first, there was a bug that caused the cgen to mess up
22:36:35Araqflaviu1: waiting for your PR to change that
22:36:55Araqconditions: update the grammar and the manual too.
22:36:56Jehan_Hmm, I can't recall what went wrong. Anyway, nevermind me then. :)
22:37:43Jehan_I only remember that I was generating code and trying to use it to escape identifiers that may or may not be keywords and something blew up.
22:38:31*ehaliewicz joined #nimrod
22:38:55flaviu1Araq: Sure, I guess I can work on that
22:39:06Araqflaviu1: I still think consistency is vastly overrated ... also nobody ever talks about its costs
22:39:19flaviu1What costs?
22:40:04Araqthe constant battles about styles et al
22:41:26Araqalso making all of your coworkers use the same {} placement is simply barbaric
22:41:51*caioariede quit (Ping timeout: 252 seconds)
22:41:55flaviu1Araq: Automatically format code on checkin and checkout
22:42:31Araqflaviu1: dunno, I prefer if the editor/IDE simply renders it the way I want
22:42:38fowlaraq: https://github.com/Araq/Nimrod/issues/1241
22:42:58Jehan_Araq: Just execute offenders on a regular basis and varying brace styles will stop being a problem. :)
22:43:16flaviu1I think the only way to go is to have the language mandate and enforce a configurable style, and to have the language tooling convert between styles transparently
22:43:46Jehan_Which reminds me that Tcl kinda sorta enforced where you put your braces.
22:43:51Jehan_At least the opening brace.
22:44:00Araqflaviu1: and now you know why Nimrod is style insensitive
22:44:06AraqJehan_: Go does the same
22:44:37Jehan_Araq: Really? It's where I put braces out of habit, hadn't realized Go enforced it.
22:44:54Jehan_But my point was that in the case of Tcl it was an accident of "everything is a string".
22:45:07Jehan_A brace on the next line simply would not be part of the same command.
22:45:30flaviu1Araq: No, my idea is totally different. Have the language literally refuse to compile if you use the wrong style so that the style can be easily be converted to whatever the programmer's preferences are.
22:45:46fowlJehan_, its also about the grammar not requiring look-ahead
22:46:07Araqflaviu1: no, it's really the same idea :P
22:46:09Jehan_flaviu1: Honestly, that's not too big of a problem for a translation tool to automate regardless.
22:46:35flaviu1So you have one guy who writes braces on the next line and uses snake case. Your tooling enforces that formatting, and then it can convert to camelCase with same line braces easily.
22:47:20flaviu1Jehan_: PascalCase -> snake_case: What should HTTPServer be converted to?
22:47:33fowlserver.http
22:47:36Araqflaviu1: your way has the disadvantage that it makes me write your style until good editors come around
22:47:43Araqflaviu1: HttpServer
22:47:53fowlstd.nimrod.copyright.araq.server.http
22:48:34Jehan_From a practical perspective, I'm a bit torn.
22:48:36flaviu1Araq: Well, that's how I'd write it. But some dumbass would write it HTTPServer and cause the tooling to translate it to h_t_t_p_server
22:48:44Araqthat abbrevs are case sensitive is another common misconception ... if they are how come every URL starts with "http" and not HTTP ?
22:49:02Jehan_I like consistency within a project, but integrating third-party libraries with a different style can be annoying.
22:49:17Jehan_If you have enforced case/style-sensitivity.
22:49:28fowlsometimes i like to give my shift key a break
22:49:33VarriountMeep
22:49:57flaviu1Jehan_: Let me see if I can write something out that expresses my thinking a bit better
22:50:35Jehan_flaviu1: You don't need to convince me. I lack a strong opinion with respect to case/style sensitivity. :)
22:50:55Araqfowl: this is the worst PR that I've seen in a while
22:51:01*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
22:51:21Araqin fact it is no PR
22:51:32Araq"The fix is around line 122 of fsmonitor.nim" ...
22:51:48Araqbut ok
22:52:03Araqeverybody is allowed to be lazy once in a while
22:52:37fowlAraq, i want to make sure im not crazy first, why hasnt anybody noticed this before
22:52:55fowl>_>
22:53:52VarriountPossibly because fsmonitor hasn't been used.
22:54:03fowlthere are things that use fsmonitor right? btw im using it so i can do touch server-control/quit to shut it down
22:55:03Araqhmm I don't get it
22:55:36Araqaddr event.name is fine either way?
22:55:50Araqeven if it's a flexible struct member?
22:56:06fowlyeah
22:56:18fowlits one of those char [] things at the end of the struct that gcc allows
22:56:24Araqso what's the bug?
22:56:50fowlcurrent code is wrong, there was an extra \0 at the end of the name
22:57:29Araq mev.name = newString(event.len.int)
22:57:30Araq copyMem(addr(mev.name[0]), addr event.name, event.len.int-1) # what is wrong here?
22:57:46Araqevent.len is lying?
22:59:12Araqah
22:59:24Araq /* Length (including NULs) of name. */
22:59:40Araqwtf
23:00:01flaviu1Jehan_: This is what I mean: https://gist.github.com/flaviut/8ccfddded8a2eadafda5
23:00:08fowli suspected the length was wrong and including the nul after seeing that but when i checked .len it was something weird like 23
23:00:13fowli'll test it again
23:01:20Araqdom96: please test and apply fowl's patch
23:01:34flaviu1Basically, you choose what style to program in, and your tools enforce what you've chosen in order to allow others to convert from your preferences to their own without issues.
23:01:37dom96Araq: I can't, I don't have an operational Linux.
23:01:49flaviu1I can test, what do I checkout?
23:02:42Jehan_flaviu1: Then, how would you express something that actually has multiple capitals that aren't an acronym?
23:03:08fowlJehan_, like, initials?
23:03:29Jehan_Like: LUDecomposition.
23:03:40Jehan_Should be l_u_decomposition in snake case.
23:04:48Jehan_Though the world wouldn't end if it were lu_decomposition. :)
23:05:03Araqflaviu1: https://github.com/Araq/Nimrod/issues/1241
23:05:05flaviu1Jehan_: Actually, the wikipedia page says "LU decomposition", so I'd say to just use LuDecomposition
23:05:44Jehan_flaviu1: Ugh?
23:06:00dom96I say we use a mix in this case. LU_Decomposition :P
23:06:03Araqin retrospect having both upper and lower case letters was a big mistake
23:06:10Jehan_flaviu1: Get prepared to have mathematicians shoot you. :)
23:06:34*vbtt joined #nimrod
23:06:47Jehan_Araq: toUpper("ß")? :)
23:07:32Jehan_Anyhow, once I find my time travel machine again, I'll make sure to let Gutenberg know.
23:07:46Jehan_Nip the problem in the bud and all that. :)
23:08:07Jehan_Anyhow, good night. :)
23:08:12*Jehan_ quit (Quit: Leaving)
23:08:22Araqme too: bye
23:09:43*vbtt quit (Client Quit)
23:10:48flaviu1I just replaced the appropriate lines with fowl's snippet, it doesn't seem to work
23:11:12flaviu1unhandled exception: No such file or directory
23:11:22flaviu1Oh, wait
23:11:23flaviu1sorry
23:13:19dom96I'm away to bed too bye
23:13:20flaviu1(kind: MonitorCreate, fullname: testdir/foo, name: foo, wd: 1)\nlast char is 0 false
23:14:53fowlthats good
23:15:35fowl(last char is str[str.high], not the trailing \0)
23:15:53*Matthias247 quit (Read error: Connection reset by peer)
23:16:04flaviu1And nothing gets cut off either
23:16:16fowlflaviu1, can you test it with the original code
23:16:29flaviu1I have
23:16:41fowlthat works for you?
23:16:49flaviu1Check out the issue page on github
23:17:06flaviu1It gets cut off at testdir/foo
23:17:22fowloh groovy
23:18:16*darkf joined #nimrod
23:20:42VarriountAraq: ping
23:20:48VarriountOh, rats
23:27:55*superfunc quit (Quit: Page closed)
23:29:21*hoverbear quit ()
23:34:11*saml_ joined #nimrod
23:39:10VarriountGah. I very much dislike it when things get more complicated.
23:59:33*caioariede joined #nimrod